diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-05-22 02:01:47 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-05-22 02:01:47 +0400 |
commit | dbcb73c033fc15fc0df2ab0a05ac0b2c4a9a31b1 (patch) | |
tree | 630247e3c4b18a799545bee8de23ee075cfa5a79 /release | |
parent | f76c3aa3764283918413a50ed9dab079e720ed98 (diff) | |
parent | c0a0f2c43e934e2054eefe5bf90889cf67b736f9 (diff) |
Merged changes in the trunk up to revision 28911.
Diffstat (limited to 'release')
44 files changed, 211 insertions, 89 deletions
diff --git a/release/scripts/io/engine_render_pov.py b/release/scripts/io/engine_render_pov.py index d0f03aee65c..12cb2f61df0 100644 --- a/release/scripts/io/engine_render_pov.py +++ b/release/scripts/io/engine_render_pov.py @@ -545,7 +545,7 @@ def write_pov(filename, scene=None, info_callback=None): mist = world.mist - if mist.enabled: + if mist.use_mist: file.write('fog {\n') file.write('\tdistance %.6f\n' % mist.depth) file.write('\tcolor rgbt<%.3g, %.3g, %.3g, %.3g>\n' % (tuple(world.horizon_color) + (1 - mist.intensity,))) @@ -629,7 +629,7 @@ def write_pov_ini(filename_ini, filename_pov, filename_image): file.write('Output_File_Type=T\n') # TGA, best progressive loading file.write('Output_Alpha=1\n') - if render.antialiasing: + if render.render_antialiasing: aa_mapping = {'5': 2, '8': 3, '11': 4, '16': 5} # method 1 assumed file.write('Antialias=1\n') file.write('Antialias_Depth=%d\n' % aa_mapping[render.antialiasing_samples]) diff --git a/release/scripts/io/import_anim_bvh.py b/release/scripts/io/import_anim_bvh.py index bab692f9daf..4a708d684c8 100644 --- a/release/scripts/io/import_anim_bvh.py +++ b/release/scripts/io/import_anim_bvh.py @@ -458,13 +458,11 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM pose_bone = pose_bones[bone_name] pose_bone.rotation_mode = eul_order_lookup[tuple(bvh_node.rot_order)] - elif ROT_MODE == 'XYZ': - print(2) + elif ROT_MODE != 'QUATERNION': for pose_bone in pose_bones: - pose_bone.rotation_mode = 'XYZ' + pose_bone.rotation_mode = ROT_MODE else: # Quats default - print(3) pass context.scene.update() @@ -520,13 +518,13 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM lx, ly, lz, rx, ry, rz = bvh_node.anim_data[frame_current + 1] if bvh_node.has_rot: - bone_rotation_matrix = Euler(rx, ry, rz).to_matrix().resize4x4() + bone_rotation_matrix = Euler((rx, ry, rz)).to_matrix().resize4x4() bone_rotation_matrix = bone_rest_matrix_inv * bone_rotation_matrix * bone_rest_matrix if ROT_MODE == 'QUATERNION': pose_bone.rotation_quaternion = bone_rotation_matrix.to_quat() else: - euler = bone_rotation_matrix.to_euler('XYZ', prev_euler[i]) # pose_bone.rotation_mode # TODO, XYZ default for now + euler = bone_rotation_matrix.to_euler(pose_bone.rotation_mode, prev_euler[i]) pose_bone.rotation_euler = euler prev_euler[i] = euler @@ -569,17 +567,17 @@ class BvhImporter(bpy.types.Operator): loop = BoolProperty(name="Loop", description="Loop the animation playback", default=False) rotate_mode = EnumProperty(items=( ('QUATERNION', "Quaternion", "Convert rotations to quaternions"), - # ('NATIVE', "Euler (Native)", "Use the rotation order defined in the BVH file"), + ('NATIVE', "Euler (Native)", "Use the rotation order defined in the BVH file"), ('XYZ', "Euler (XYZ)", "Convert rotations to euler XYZ"), - # ('XZY', "Euler (XZY)", "Convert rotations to euler XZY"), - # ('YXZ', "Euler (YXZ)", "Convert rotations to euler YXZ"), - # ('YZX', "Euler (YZX)", "Convert rotations to euler YZX"), - # ('ZXY', "Euler (ZXY)", "Convert rotations to euler ZXY"), - # ('ZYX', "Euler (ZYX)", "Convert rotations to euler ZYX")), + ('XZY', "Euler (XZY)", "Convert rotations to euler XZY"), + ('YXZ', "Euler (YXZ)", "Convert rotations to euler YXZ"), + ('YZX', "Euler (YZX)", "Convert rotations to euler YZX"), + ('ZXY', "Euler (ZXY)", "Convert rotations to euler ZXY"), + ('ZYX', "Euler (ZYX)", "Convert rotations to euler ZYX"), ), name="Rotation", description="Rotation conversion.", - default='QUATERNION') + default='NATIVE') def execute(self, context): # print("Selected: " + context.active_object.name) diff --git a/release/scripts/io/import_shape_mdd.py b/release/scripts/io/import_shape_mdd.py index 884fa92ddd0..8fef7672912 100644 --- a/release/scripts/io/import_shape_mdd.py +++ b/release/scripts/io/import_shape_mdd.py @@ -104,7 +104,7 @@ from bpy.props import * class importMDD(bpy.types.Operator): '''Import MDD vertex keyframe file to shape keys''' - bl_idname = "import.mdd" + bl_idname = "import_shape.mdd" bl_label = "Import MDD" # get first scene to get min and max properties for frames, fps diff --git a/release/scripts/keyingsets/keyingsets_utils.py b/release/scripts/keyingsets/keyingsets_utils.py index 777f5f052e2..77b0f3ebacd 100644 --- a/release/scripts/keyingsets/keyingsets_utils.py +++ b/release/scripts/keyingsets/keyingsets_utils.py @@ -26,7 +26,7 @@ def RKS_POLL_selected_objects(ksi, context): def RKS_POLL_selected_bones(ksi, context): # we must be in Pose Mode, and there must be some bones selected if (context.active_object) and (context.active_object.mode == 'POSE'): - if context.active_pose_bone or len(context.select_pose_bones): + if context.active_pose_bone or len(context.selected_pose_bones): return True; # nothing selected diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py index 28e4e71a627..cab5ee5e684 100644 --- a/release/scripts/modules/bpy/utils.py +++ b/release/scripts/modules/bpy/utils.py @@ -348,7 +348,7 @@ def smpte_from_seconds(time, fps=None): hours = minutes = seconds = frames = 0 if time < 0: - time = -time + time = - time neg = "-" else: neg = "" @@ -361,10 +361,10 @@ def smpte_from_seconds(time, fps=None): time = time % 60.0 seconds = int(time) - frames= int(round(math.floor( ((time - seconds) * fps)))) + frames= int(round(math.floor(((time - seconds) * fps)))) return "%s%02d:%02d:%02d:%02d" % (neg, hours, minutes, seconds, frames) - + def smpte_from_frame(frame, fps=None, fps_base=None): ''' @@ -380,4 +380,3 @@ def smpte_from_frame(frame, fps=None, fps_base=None): fps_base = _bpy.context.scene.render.fps_base return smpte_from_seconds((frame * fps_base) / fps, fps) -
\ No newline at end of file diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 6e4596a1109..edead35dafe 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -410,6 +410,19 @@ class MeshFace(StructRNA): return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[3]), ord_ind(verts[3], verts[0]) +class Text(bpy_types.ID): + __slots__ = () + + def as_string(self): + """Return the text as a string.""" + return "\n".join(line.line for line in self.lines) + + def from_string(self, string): + """Replace text with this string.""" + self.clear() + self.write(string) + + import collections diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py index 80c61e0a6d9..fa1d15a7845 100644 --- a/release/scripts/modules/rna_info.py +++ b/release/scripts/modules/rna_info.py @@ -200,8 +200,8 @@ class InfoPropertyRNA: if self.type == "enum": self.enum_items[:] = rna_prop.items.keys() - - + + if self.array_length: self.default = tuple(getattr(rna_prop, "default_array", ())) else: @@ -245,7 +245,7 @@ class InfoPropertyRNA: type_str += self.type if self.array_length: type_str += " array of %d items" % (self.array_length) - + if self.type in ("float", "int"): type_str += " in [%s, %s]" % (range_str(self.min), range_str(self.max)) elif self.type == "enum": diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py index 8a11ef7aaf6..a6e0930e69c 100644 --- a/release/scripts/op/object.py +++ b/release/scripts/op/object.py @@ -507,6 +507,26 @@ class MakeDupliFace(bpy.types.Operator): return {'FINISHED'} +class IsolateTypeRender(bpy.types.Operator): + '''Select object matching a naming pattern''' + bl_idname = "object.isolate_type_render" + bl_label = "Isolate Render Selection" + bl_options = {'REGISTER', 'UNDO'} + + def execute(self, context): + act_type = context.object.type + + for obj in context.visible_objects: + + if obj.selected: + obj.restrict_render = False + else: + if obj.type == act_type: + obj.restrict_render = True + + return {'FINISHED'} + + classes = [ SelectPattern, SelectCamera, @@ -514,6 +534,7 @@ classes = [ SubdivisionSet, ShapeTransfer, JoinUVs, + IsolateTypeRender, MakeDupliFace] diff --git a/release/scripts/op/sequencer.py b/release/scripts/op/sequencer.py index a542337345c..8715f7eeec5 100644 --- a/release/scripts/op/sequencer.py +++ b/release/scripts/op/sequencer.py @@ -22,6 +22,7 @@ import bpy from bpy.props import * + class SequencerCrossfadeSounds(bpy.types.Operator): '''Do crossfading volume animation of two selected sound strips.''' @@ -95,16 +96,17 @@ class SequencerCutMulticam(bpy.types.Operator): if not s.selected: s.selected = True - + cfra = context.scene.frame_current - bpy.ops.sequencer.cut(frame=cfra,type='HARD',side='RIGHT') + bpy.ops.sequencer.cut(frame=cfra, type='HARD', side='RIGHT') for s in context.scene.sequence_editor.sequences_all: if s.selected and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end: context.scene.sequence_editor.active_strip = s - + context.scene.sequence_editor.active_strip.multicam_source = camera return {'FINISHED'} + class SequencerDeinterlaceSelectedMovies(bpy.types.Operator): '''Deinterlace all selected movie sources.''' @@ -122,14 +124,13 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator): for s in context.scene.sequence_editor.sequences_all: if s.selected and s.type == 'MOVIE': s.de_interlace = True - - return {'FINISHED'} + return {'FINISHED'} def register(): register = bpy.types.register - + register(SequencerCrossfadeSounds) register(SequencerCutMulticam) register(SequencerDeinterlaceSelectedMovies) @@ -137,7 +138,7 @@ def register(): def unregister(): unregister = bpy.types.unregister - + unregister(SequencerCrossfadeSounds) unregister(SequencerCutMulticam) unregister(SequencerDeinterlaceSelectedMovies) diff --git a/release/scripts/templates/operator_modal_view3d.py b/release/scripts/templates/operator_modal_view3d.py new file mode 100644 index 00000000000..2158d9dcc3f --- /dev/null +++ b/release/scripts/templates/operator_modal_view3d.py @@ -0,0 +1,56 @@ +from mathutils import Vector +from bpy.props import FloatVectorProperty + +class ViewOperator(bpy.types.Operator): + '''Translate the view using mouse events.''' + bl_idname = "view3d.modal_operator" + bl_label = "Simple View Operator" + + offset = FloatVectorProperty(name="Offset", size=3) + + + def execute(self, context): + v3d = context.area.spaces[0] + rv3d = v3d.region_3d + + rv3d.view_location = self._initial_location + Vector(self.properties.offset) + + def modal(self, context, event): + v3d = context.area.spaces[0] + rv3d = v3d.region_3d + + if event.type == 'MOUSEMOVE': + self.properties.offset = (self._initial_mouse - Vector((event.mouse_x, event.mouse_y, 0.0))) * 0.02 + self.execute(context) + + elif event.type == 'LEFTMOUSE': + return {'FINISHED'} + + elif event.type in ('RIGHTMOUSE', 'ESC'): + rv3d.view_location = self._initial_location + return {'CANCELLED'} + + return {'RUNNING_MODAL'} + + def invoke(self, context, event): + active_space = context.area.spaces[0] + + if active_space.type == 'VIEW_3D': + v3d = active_space + rv3d = v3d.region_3d + + context.manager.add_modal_handler(self) + + if rv3d.view_perspective == 'CAMERA': + rv3d.view_perspective = 'PERSP' + + self._initial_mouse = Vector((event.mouse_x, event.mouse_y, 0.0)) + self._initial_location = rv3d.view_location.copy() + + return {'RUNNING_MODAL'} + else: + self.report({'WARNING'}, "Active space must be a View3d") + return {'CANCELLED'} + + +bpy.types.register(ViewOperator) diff --git a/release/scripts/ui/properties_animviz.py b/release/scripts/ui/properties_animviz.py index 311a8b119cf..9eb046cc2c8 100644 --- a/release/scripts/ui/properties_animviz.py +++ b/release/scripts/ui/properties_animviz.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check ################################################ # Generic Panels (Independent of DataType) @@ -61,6 +61,8 @@ class MotionPathButtonsPanel(bpy.types.Panel): col.label(text="Display:") col.prop(mps, "show_frame_numbers", text="Frame Numbers") col.prop(mps, "highlight_keyframes", text="Keyframes") + if bones: + col.prop(mps, "search_all_action_keyframes", text="+ Non-Grouped Keyframes") col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers") diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 953ab5e5abd..805a21b3be2 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_armature_rigify.py b/release/scripts/ui/properties_data_armature_rigify.py index ba012368def..5ec50973ea4 100644 --- a/release/scripts/ui/properties_data_armature_rigify.py +++ b/release/scripts/ui/properties_data_armature_rigify.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class PoseTemplateSettings(bpy.types.IDPropertyGroup): diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index 982572b62a3..b6b638ef380 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class BoneButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py index 4ce124a279e..3abd460c427 100644 --- a/release/scripts/ui/properties_data_camera.py +++ b/release/scripts/ui/properties_data_camera.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py index 62c81df2ece..5f1dc662b97 100644 --- a/release/scripts/ui/properties_data_curve.py +++ b/release/scripts/ui/properties_data_curve.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_empty.py b/release/scripts/ui/properties_data_empty.py index a0999fb9d4a..577e32ed840 100644 --- a/release/scripts/ui/properties_data_empty.py +++ b/release/scripts/ui/properties_data_empty.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py index 26f4b158c90..4338489ac5a 100644 --- a/release/scripts/ui/properties_data_lamp.py +++ b/release/scripts/ui/properties_data_lamp.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class LAMP_MT_sunsky_presets(bpy.types.Menu): diff --git a/release/scripts/ui/properties_data_lattice.py b/release/scripts/ui/properties_data_lattice.py index 2a78d329223..2aa719437a7 100644 --- a/release/scripts/ui/properties_data_lattice.py +++ b/release/scripts/ui/properties_data_lattice.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py index 5321c76679c..44d3d19e793 100644 --- a/release/scripts/ui/properties_data_mesh.py +++ b/release/scripts/ui/properties_data_mesh.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class MESH_MT_vertex_group_specials(bpy.types.Menu): diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py index b751a9f9059..e0155059b98 100644 --- a/release/scripts/ui/properties_data_metaball.py +++ b/release/scripts/ui/properties_data_metaball.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class DataButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index 888d20cb5e1..a6d6e098812 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check narrowmod = 260 @@ -229,7 +229,7 @@ class DATA_PT_modifiers(DataButtonsPanel): def DECIMATE(self, layout, ob, md, wide_ui): layout.prop(md, "ratio") - layout.prop(md, "face_count") + layout.label(text="Face Count: %s" % str(md.face_count)) def DISPLACE(self, layout, ob, md, wide_ui): split = layout.split() diff --git a/release/scripts/ui/properties_game.py b/release/scripts/ui/properties_game.py index 41af955d9ec..a5b443a461b 100644 --- a/release/scripts/ui/properties_game.py +++ b/release/scripts/ui/properties_game.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class PhysicsButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py index a7d9af9999d..1526bd004a0 100644 --- a/release/scripts/ui/properties_material.py +++ b/release/scripts/ui/properties_material.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check def active_node_mat(mat): diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index 211a7f5c2e9..6dbfe269436 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class ObjectButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py index a81ab2fb4d2..f53bac05a7c 100644 --- a/release/scripts/ui/properties_object_constraint.py +++ b/release/scripts/ui/properties_object_constraint.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class ConstraintButtonsPanel(bpy.types.Panel): diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index a1bc4019c6d..35c1f84cca5 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -25,7 +25,7 @@ from properties_physics_common import effector_weights_ui from properties_physics_common import basic_force_field_settings_ui from properties_physics_common import basic_force_field_falloff_ui -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check def particle_panel_enabled(context, psys): diff --git a/release/scripts/ui/properties_physics_cloth.py b/release/scripts/ui/properties_physics_cloth.py index 67fc79eb4d1..834e3cf2450 100644 --- a/release/scripts/ui/properties_physics_cloth.py +++ b/release/scripts/ui/properties_physics_cloth.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import point_cache_ui @@ -75,7 +75,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel): # add modifier split.operator("object.modifier_add", text="Add").type = 'CLOTH' if wide_ui: - split.column() + split.label() if md: cloth = md.settings diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py index eac2bc60f35..350b17e6e9f 100644 --- a/release/scripts/ui/properties_physics_common.py +++ b/release/scripts/ui/properties_physics_common.py @@ -18,16 +18,18 @@ # <pep8 compliant> -narrowui = 180 - import bpy +narrowui = bpy.context.user_preferences.view.properties_width_check + #cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc + + def point_cache_ui(self, context, cache, enabled, cachetype): layout = self.layout wide_ui = context.region.width > narrowui - layout.set_context_pointer("PointCache", cache) + layout.set_context_pointer("point_cache", cache) row = layout.row() row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2) @@ -68,7 +70,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): sub = col.column() sub.enabled = enabled sub.prop(cache, "quick_cache") - + sub = col.column() sub.enabled = bpy.data.file_is_saved sub.prop(cache, "disk_cache") @@ -103,6 +105,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): col.operator("ptcache.free_bake_all", text="Free All Bakes") col.operator("ptcache.bake_all", text="Update All To Frame").bake = False + def effector_weights_ui(self, context, weights): layout = self.layout diff --git a/release/scripts/ui/properties_physics_field.py b/release/scripts/ui/properties_physics_field.py index 4dfe4f6372e..57fa40e4c5d 100644 --- a/release/scripts/ui/properties_physics_field.py +++ b/release/scripts/ui/properties_physics_field.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import basic_force_field_settings_ui diff --git a/release/scripts/ui/properties_physics_fluid.py b/release/scripts/ui/properties_physics_fluid.py index e3e6e1dbb3d..32acd88654d 100644 --- a/release/scripts/ui/properties_physics_fluid.py +++ b/release/scripts/ui/properties_physics_fluid.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class PhysicButtonsPanel(bpy.types.Panel): @@ -42,7 +42,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel): md = context.fluid wide_ui = context.region.width > narrowui - split = layout.split(percentage=0.5) + split = layout.split() if md: # remove modifier + settings diff --git a/release/scripts/ui/properties_physics_smoke.py b/release/scripts/ui/properties_physics_smoke.py index d4a40dc6788..f362588cd98 100644 --- a/release/scripts/ui/properties_physics_smoke.py +++ b/release/scripts/ui/properties_physics_smoke.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import point_cache_ui diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py index 8e685b8a66c..696f29810a3 100644 --- a/release/scripts/ui/properties_physics_softbody.py +++ b/release/scripts/ui/properties_physics_softbody.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check from properties_physics_common import point_cache_ui diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index f1c8ba0ac62..bcfb34a20ac 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class RENDER_MT_presets(bpy.types.Menu): @@ -215,14 +215,14 @@ class RENDER_PT_shading(RenderButtonsPanel): split = layout.split() col = split.column() - col.prop(rd, "render_textures", text="Textures") - col.prop(rd, "render_shadows", text="Shadows") - col.prop(rd, "render_sss", text="Subsurface Scattering") - col.prop(rd, "render_envmaps", text="Environment Map") + col.prop(rd, "use_textures", text="Textures") + col.prop(rd, "use_shadows", text="Shadows") + col.prop(rd, "use_sss", text="Subsurface Scattering") + col.prop(rd, "use_envmaps", text="Environment Map") if wide_ui: col = split.column() - col.prop(rd, "render_raytracing", text="Ray Tracing") + col.prop(rd, "use_raytracing", text="Ray Tracing") col.prop(rd, "color_management") col.prop(rd, "alpha_mode", text="Alpha") @@ -261,7 +261,7 @@ class RENDER_PT_performance(RenderButtonsPanel): sub.active = rd.use_compositing sub.prop(rd, "free_image_textures") sub = col.column() - sub.active = rd.render_raytracing + sub.active = rd.use_raytracing sub.label(text="Acceleration structure:") sub.prop(rd, "raytrace_structure", text="") if rd.raytrace_structure == 'OCTREE': @@ -347,6 +347,15 @@ class RENDER_PT_output(RenderButtonsPanel): if rd.file_format in ('AVI_JPEG', 'JPEG'): split = layout.split() split.prop(rd, "file_quality", slider=True) + + elif rd.file_format == 'MULTILAYER': + split = layout.split() + + col = split.column() + col.label(text="Codec:") + col.prop(rd, "exr_codec", text="") + if wide_ui: + col = split.column() elif rd.file_format == 'OPEN_EXR': split = layout.split() @@ -506,14 +515,14 @@ class RENDER_PT_antialiasing(RenderButtonsPanel): def draw_header(self, context): rd = context.scene.render - self.layout.prop(rd, "antialiasing", text="") + self.layout.prop(rd, "render_antialiasing", text="") def draw(self, context): layout = self.layout rd = context.scene.render wide_ui = context.region.width > narrowui - layout.active = rd.antialiasing + layout.active = rd.render_antialiasing split = layout.split() diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index 119988f8fa3..5e83fad38a0 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class SceneButtonsPanel(bpy.types.Panel): @@ -89,7 +89,6 @@ class SCENE_PT_keying_sets(SceneButtonsPanel): row = layout.row() col = row.column() - # XXX: this fails because index is not what this expects... col.template_list(scene, "keying_sets", scene, "active_keying_set_index", rows=2) col = row.column(align=True) diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index 07a097cfd3a..39c6bdf1d9f 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class TEXTURE_MT_specials(bpy.types.Menu): @@ -374,7 +374,8 @@ class TEXTURE_PT_influence(TextureSlotPanel): factor_but(col, tex.map_raymir, "map_raymir", "raymir_factor", "Ray Mirror") col.label(text="Geometry:") - factor_but(col, tex.map_normal, "map_normal", "normal_factor", "Normal") + # XXX replace 'or' when displacement is fixed to not rely on normal influence value. + factor_but(col, (tex.map_normal or tex.map_displacement), "map_normal", "normal_factor", "Normal") factor_but(col, tex.map_warp, "map_warp", "warp_factor", "Warp") factor_but(col, tex.map_displacement, "map_displacement", "displacement_factor", "Displace") diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py index 1ee47e942a0..e63d513a4b5 100644 --- a/release/scripts/ui/properties_world.py +++ b/release/scripts/ui/properties_world.py @@ -20,7 +20,7 @@ import bpy from rna_prop_ui import PropertyPanel -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class WorldButtonsPanel(bpy.types.Panel): @@ -111,14 +111,14 @@ class WORLD_PT_mist(WorldButtonsPanel): def draw_header(self, context): world = context.world - self.layout.prop(world.mist, "enabled", text="") + self.layout.prop(world.mist, "use_mist", text="") def draw(self, context): layout = self.layout wide_ui = context.region.width > narrowui world = context.world - layout.active = world.mist.enabled + layout.active = world.mist.use_mist split = layout.split() @@ -142,14 +142,14 @@ class WORLD_PT_stars(WorldButtonsPanel): def draw_header(self, context): world = context.world - self.layout.prop(world.stars, "enabled", text="") + self.layout.prop(world.stars, "use_stars", text="") def draw(self, context): layout = self.layout wide_ui = context.region.width > narrowui world = context.world - layout.active = world.stars.enabled + layout.active = world.stars.use_stars split = layout.split() diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py index be7370302ec..f0a5a3384be 100644 --- a/release/scripts/ui/space_image.py +++ b/release/scripts/ui/space_image.py @@ -19,7 +19,7 @@ # <pep8 compliant> import bpy -narrowui = 180 +narrowui = bpy.context.user_preferences.view.properties_width_check class IMAGE_MT_view(bpy.types.Menu): diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index 0cd92bb91fd..4c504cd69c9 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -245,7 +245,7 @@ class INFO_MT_add(bpy.types.Menu): layout.operator_context = 'INVOKE_DEFAULT' layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY') else: - layout.operator_menu_enum("object.group_instance_add", "type", text="Group Instance", icon='OUTLINER_OB_EMPTY') + layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_EMPTY') class INFO_MT_game(bpy.types.Menu): diff --git a/release/scripts/ui/space_logic.py b/release/scripts/ui/space_logic.py index 07b26fdc862..0dcdbbb1def 100644 --- a/release/scripts/ui/space_logic.py +++ b/release/scripts/ui/space_logic.py @@ -46,9 +46,18 @@ class LOGIC_PT_properties(bpy.types.Panel): row.prop(prop, "debug", text="", toggle=True, icon='INFO') row.operator("object.game_property_remove", text="", icon='X').index = i +class LOGIC_MT_logicbricks_add(bpy.types.Menu): + bl_label = "Add" + + def draw(self, context): + layout = self.layout + + layout.operator_menu_enum("logic.sensor_add", "type", text="Sensor") + layout.operator_menu_enum("logic.controller_add", "type", text="Controller") + layout.operator_menu_enum("logic.actuator_add", "type", text="Actuator") classes = [ - LOGIC_PT_properties] + LOGIC_PT_properties, LOGIC_MT_logicbricks_add] def register(): diff --git a/release/scripts/ui/space_sequencer.py b/release/scripts/ui/space_sequencer.py index 9460905bd85..e300cfd3d32 100644 --- a/release/scripts/ui/space_sequencer.py +++ b/release/scripts/ui/space_sequencer.py @@ -19,6 +19,7 @@ # <pep8 compliant> import bpy + def act_strip(context): try: return context.scene.sequence_editor.active_strip diff --git a/release/scripts/ui/space_text.py b/release/scripts/ui/space_text.py index 8671e67bd87..10740f788f5 100644 --- a/release/scripts/ui/space_text.py +++ b/release/scripts/ui/space_text.py @@ -286,7 +286,7 @@ class TEXT_MT_toolbox(bpy.types.Menu): layout.operator("text.paste") layout.separator() - + layout.operator("text.run_script") diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 21ee0d107f6..ca906ef9a03 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -165,6 +165,13 @@ class USERPREF_PT_interface(bpy.types.Panel): sub.enabled = view.show_mini_axis sub.prop(view, "mini_axis_size", text="Size") sub.prop(view, "mini_axis_brightness", text="Brightness") + + col.separator() + col.separator() + col.separator() + + col.label(text="Properties Window:") + col.prop(view, "properties_width_check") row.separator() row.separator() diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 8be176843fc..538a13536bc 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -32,14 +32,13 @@ class VIEW3D_HT_header(bpy.types.Header): obj = context.active_object toolsettings = context.tool_settings - row = layout.row() + row = layout.row(align=True) row.template_header() - sub = row.row(align=True) - # Menus if context.area.show_menus: - + sub = row.row(align=True) + sub.menu("VIEW3D_MT_view") # Select Menu @@ -54,6 +53,7 @@ class VIEW3D_HT_header(bpy.types.Header): else: sub.menu("VIEW3D_MT_object") + row = layout.row() row.template_header_3D() # do in C for now since these buttons cant be both toggle AND exclusive. @@ -706,14 +706,13 @@ class VIEW3D_MT_object_specials(bpy.types.Menu): def poll(self, context): # add more special types - obj = context.object - return bool(obj and obj.type == 'LAMP') + return context.object def draw(self, context): layout = self.layout obj = context.object - if obj and obj.type == 'LAMP': + if obj.type == 'LAMP': layout.operator_context = 'INVOKE_REGION_WIN' props = layout.operator("wm.context_modal_mouse", text="Spot Size") @@ -736,6 +735,10 @@ class VIEW3D_MT_object_specials(bpy.types.Menu): props.path_item = "data.shadow_buffer_clip_end" props.input_scale = 0.05 + layout.separator() + + props = layout.operator("object.isolate_type_render") + class VIEW3D_MT_object_apply(bpy.types.Menu): bl_label = "Apply" |