From aa7545b0ea0920c6ee403d305fc0c0a4af9138ae Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Aug 2011 08:47:48 +0000 Subject: patch [#28320] Small change to trunk needed for Motion Capture Addon - GSoC 2011 - Pepper Branch from Benjy Cook (benjycook) --- release/scripts/startup/bl_operators/nla.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_operators/nla.py b/release/scripts/startup/bl_operators/nla.py index 44ed846e530..714b889da26 100644 --- a/release/scripts/startup/bl_operators/nla.py +++ b/release/scripts/startup/bl_operators/nla.py @@ -84,6 +84,7 @@ def bake(frame_start, do_pose=True, do_object=True, do_constraint_clear=False, + action=None, ): scene = bpy.context.scene @@ -121,7 +122,8 @@ def bake(frame_start, # incase animation data hassnt been created atd = obj.animation_data_create() - action = bpy.data.actions.new("Action") + if action is None: + action = bpy.data.actions.new("Action") atd.action = action if do_pose: -- cgit v1.2.3 From 1324173e99788a168322cd65fb6dc4a3067a3b6a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Aug 2011 09:01:49 +0000 Subject: pep8 edits and change '!= None' to 'is not None' --- release/scripts/modules/bpy_extras/mesh_utils.py | 2 +- .../startup/bl_operators/uvcalc_smart_project.py | 4 ++-- .../scripts/startup/bl_ui/properties_data_camera.py | 2 +- release/scripts/startup/bl_ui/properties_particle.py | 8 ++++---- release/scripts/startup/bl_ui/space_console.py | 2 +- release/scripts/startup/bl_ui/space_dopesheet.py | 2 +- release/scripts/startup/bl_ui/space_image.py | 18 +++++++++--------- release/scripts/startup/bl_ui/space_info.py | 8 ++++---- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 2 +- release/scripts/templates/operator_export.py | 2 +- release/scripts/templates/operator_simple.py | 2 +- 11 files changed, 26 insertions(+), 26 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index c965169ff04..4b5e3eeb066 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -426,7 +426,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True): # See if its flipped the wrong way. flip = None for fi in fill: - if flip != None: + if flip is not None: break for i, vi in enumerate(fi): if vi == 0 and fi[i - 1] == 1: diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 78b68418322..23838588f43 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -178,7 +178,7 @@ def pointInEdges(pt, edges): intersectCount = 0 for ed in edges: xi, yi = lineIntersection2D(x1,y1, x2,y2, ed[0][0], ed[0][1], ed[1][0], ed[1][1]) - if xi != None: # Is there an intersection. + if xi is not None: # Is there an intersection. intersectCount+=1 return intersectCount % 2 @@ -1131,7 +1131,7 @@ class SmartProject(Operator): @classmethod def poll(cls, context): - return context.active_object != None + return context.active_object is not None def execute(self, context): main(context, diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index f484d7b59e1..5255af40951 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -107,7 +107,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel): col = split.column() - if cam.dof_object != None: + if cam.dof_object is not None: col.enabled = False col.prop(cam, "dof_distance", text="Distance") diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 03243d1153b..6f58f060504 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -156,7 +156,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): if part: split = layout.split(percentage=0.65) if part.type == 'HAIR': - if psys != None and psys.is_edited: + if psys is not None and psys.is_edited: split.operator("particle.edited_clear", text="Free Edit") else: row = split.row() @@ -166,12 +166,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): row = split.row() row.enabled = particle_panel_enabled(context, psys) row.prop(part, "hair_step") - if psys != None and psys.is_edited: + if psys is not None and psys.is_edited: if psys.is_global_hair: layout.operator("particle.connect_hair") else: layout.operator("particle.disconnect_hair") - elif psys != None and part.type == 'REACTOR': + elif psys is not None and part.type == 'REACTOR': split.enabled = particle_panel_enabled(context, psys) split.prop(psys, "reactor_target_object") split.prop(psys, "reactor_target_particle_system", text="Particle System") @@ -654,7 +654,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel): if settings is None: return False - if psys != None and psys.point_cache.use_external: + if psys is not None and psys.point_cache.use_external: return False return settings.physics_type == 'BOIDS' and engine in cls.COMPAT_ENGINES diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py index b517e0d86fb..cbbefa01a3c 100644 --- a/release/scripts/startup/bl_ui/space_console.py +++ b/release/scripts/startup/bl_ui/space_console.py @@ -41,7 +41,7 @@ class CONSOLE_MT_console(Menu): def draw(self, context): layout = self.layout - + layout.operator("console.clear") layout.operator("console.copy") layout.operator("console.paste") diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index dfbd7b3ae14..ae55e1373db 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -101,7 +101,7 @@ class DOPESHEET_HT_header(Header): row.menu("DOPESHEET_MT_select") row.menu("DOPESHEET_MT_marker") - if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action != None): + if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action is not None): row.menu("DOPESHEET_MT_channel") elif st.mode == 'GPENCIL': row.menu("DOPESHEET_MT_gpencil_channel") diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 2042fa1729d..97b5d8457e0 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -452,7 +452,7 @@ class IMAGE_PT_game_properties(Panel): split = layout.split() col = split.column() - + col.prop(ima, "use_animation") sub = col.column(align=True) sub.active = ima.use_animation @@ -507,7 +507,7 @@ class IMAGE_PT_view_waveform(Panel): layout = self.layout sima = context.space_data - + layout.template_waveform(sima, "scopes") row = layout.split(percentage=0.75) row.prop(sima.scopes, "waveform_alpha") @@ -544,9 +544,9 @@ class IMAGE_PT_sample_line(Panel): def draw(self, context): layout = self.layout - + sima = context.space_data - + layout.operator("image.sample_line") layout.template_histogram(sima, "sample_histogram") layout.prop(sima.sample_histogram, "mode") @@ -564,9 +564,9 @@ class IMAGE_PT_scope_sample(Panel): def draw(self, context): layout = self.layout - + sima = context.space_data - + row = layout.row() row.prop(sima.scopes, "use_full_resolution") sub = row.row() @@ -613,14 +613,14 @@ class IMAGE_PT_view_properties(Panel): col = layout.column() col.label("Cursor Location:") col.row().prop(uvedit, "cursor_location", text="") - + col.separator() - + col.label(text="UVs:") col.row().prop(uvedit, "edge_draw_type", expand=True) split = layout.split() - + col = split.column() col.prop(uvedit, "show_faces") col.prop(uvedit, "show_smooth_edges", text="Smooth") diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index 38c1e24f27e..5afc5edf6eb 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -194,7 +194,7 @@ class INFO_MT_mesh_add(Menu): def draw(self, context): layout = self.layout - + layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane") layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube") @@ -215,7 +215,7 @@ class INFO_MT_curve_add(Menu): def draw(self, context): layout = self.layout - + layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier") layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle") @@ -246,7 +246,7 @@ class INFO_MT_surface_add(Menu): def draw(self, context): layout = self.layout - + layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve") layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle") @@ -262,7 +262,7 @@ class INFO_MT_armature_add(Menu): def draw(self, context): layout = self.layout - + layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA') diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 864d59f0cdb..b71593add96 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1049,7 +1049,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel): ob = context.active_object col = layout.column() - col.active = ob.vertex_groups.active != None + col.active = ob.vertex_groups.active is not None col.operator("object.vertex_group_normalize_all", text="Normalize All") col.operator("object.vertex_group_normalize", text="Normalize") col.operator("object.vertex_group_invert", text="Invert") diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py index aeda4ce36fb..b1d53e6ee0c 100644 --- a/release/scripts/templates/operator_export.py +++ b/release/scripts/templates/operator_export.py @@ -47,7 +47,7 @@ class ExportSomeData(bpy.types.Operator, ExportHelper): @classmethod def poll(cls, context): - return context.active_object != None + return context.active_object is not None def execute(self, context): return write_some_data(context, self.filepath, self.use_setting) diff --git a/release/scripts/templates/operator_simple.py b/release/scripts/templates/operator_simple.py index 8348c7a95b1..05d9afc0ad1 100644 --- a/release/scripts/templates/operator_simple.py +++ b/release/scripts/templates/operator_simple.py @@ -13,7 +13,7 @@ class SimpleOperator(bpy.types.Operator): @classmethod def poll(cls, context): - return context.active_object != None + return context.active_object is not None def execute(self, context): main(context) -- cgit v1.2.3 From 5394cabe244bea5c01f03bcf9511fd0a54738a67 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Aug 2011 11:54:40 +0000 Subject: remove workaround for bug in python 3.2.0 loading web pages on *nix --- release/scripts/startup/bl_operators/wm.py | 64 ------------------------------ 1 file changed, 64 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 74f125e0ad3..aa09a088c4f 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -738,7 +738,6 @@ class WM_OT_url_open(Operator): def execute(self, context): import webbrowser - _webbrowser_bug_fix() webbrowser.open(self.url) return {'FINISHED'} @@ -830,7 +829,6 @@ class WM_OT_doc_view(Operator): return {'PASS_THROUGH'} import webbrowser - _webbrowser_bug_fix() webbrowser.open(url) return {'FINISHED'} @@ -1181,65 +1179,3 @@ class WM_OT_copy_prev_settings(Operator): return {'FINISHED'} return {'CANCELLED'} - - -def _webbrowser_bug_fix(): - # test for X11 - import os - - if os.environ.get("DISPLAY"): - - # BSD licenced code copied from python, temp fix for bug - # http://bugs.python.org/issue11432, XXX == added code - def _invoke(self, args, remote, autoraise): - # XXX, added imports - import io - import subprocess - import time - - raise_opt = [] - if remote and self.raise_opts: - # use autoraise argument only for remote invocation - autoraise = int(autoraise) - opt = self.raise_opts[autoraise] - if opt: - raise_opt = [opt] - - cmdline = [self.name] + raise_opt + args - - if remote or self.background: - inout = io.open(os.devnull, "r+") - else: - # for TTY browsers, we need stdin/out - inout = None - # if possible, put browser in separate process group, so - # keyboard interrupts don't affect browser as well as Python - setsid = getattr(os, 'setsid', None) - if not setsid: - setsid = getattr(os, 'setpgrp', None) - - p = subprocess.Popen(cmdline, close_fds=True, # XXX, stdin=inout, - stdout=(self.redirect_stdout and inout or None), - stderr=inout, preexec_fn=setsid) - if remote: - # wait five secons. If the subprocess is not finished, the - # remote invocation has (hopefully) started a new instance. - time.sleep(1) - rc = p.poll() - if rc is None: - time.sleep(4) - rc = p.poll() - if rc is None: - return True - # if remote call failed, open() will try direct invocation - return not rc - elif self.background: - if p.poll() is None: - return True - else: - return False - else: - return not p.wait() - - import webbrowser - webbrowser.UnixBrowser._invoke = _invoke -- cgit v1.2.3 From 6a374d266d8213629f74a9f4c9a4984ddf59ef4c Mon Sep 17 00:00:00 2001 From: Morten Mikkelsen Date: Mon, 22 Aug 2011 19:57:54 +0000 Subject: glsl and render support for derivative maps --- release/scripts/startup/bl_ui/properties_texture.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index ead65b92c3f..0172fbcbadd 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -414,6 +414,10 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel): row = col.row() row.active = tex.use_normal_map row.prop(slot, "normal_map_space", text="") + + row = col.row() + row.active = not tex.use_normal_map + row.prop(tex, "use_derivative_map") col.prop(tex, "use_mipmap") row = col.row() @@ -1025,12 +1029,14 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel): # only show bump settings if activated but not for normalmap images row = layout.row() - row.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) - - row.prop(tex, "bump_method", text="Method") + + sub = row.row() + sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and (tex.texture.use_normal_map or tex.texture.use_derivative_map)) + sub.prop(tex, "bump_method", text="Method") + # the space setting is supported for: derivmaps + bumpmaps (DEFAULT,BEST_QUALITY), not for normalmaps sub = row.row() - sub.active = tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'} + sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map)) sub.prop(tex, "bump_objectspace", text="Space") -- cgit v1.2.3 From 4740dce4ecad7eb99597a820e6b5e72a17619997 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Mon, 22 Aug 2011 22:26:25 +0000 Subject: Revert a part of 39385. Vertex Select Button got somehow into the Mesh panel. --- release/scripts/startup/bl_ui/properties_data_mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 896b76c59f6..75df7dad5f2 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -73,7 +73,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, Panel): ob = context.object mesh = context.mesh space = context.space_data - layout.prop(context.scene.tool_settings, "mesh_select_mode", index=0, text="Vertex") + if ob: layout.template_ID(ob, "data") elif mesh: -- cgit v1.2.3 From 9a9513a9f09f5524235e202a095b04863a07a52b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Aug 2011 19:58:15 +0000 Subject: fix for 3 bugs in bone renaming - renaming a bone could crash if the area had to spaces in it (reported by Sebastian Koenig). - renaming bones wouldn't update inactive 3d views locked bone names. - selecting locked bones in the UI didnt work in editmode. --- release/scripts/startup/bl_ui/space_view3d.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index fa22e216ec9..dd705f76feb 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2073,9 +2073,11 @@ class VIEW3D_PT_view3d_properties(Panel): col.prop(view, "lens") col.label(text="Lock to Object:") col.prop(view, "lock_object", text="") - if view.lock_object and view.lock_object.type == 'ARMATURE': - col.prop_search(view, "lock_bone", view.lock_object.data, "bones", text="") - elif not view.lock_object: + lock_object = view.lock_object + if lock_object: + if lock_object.type == 'ARMATURE': + col.prop_search(view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="") + else: col.prop(view, "lock_cursor", text="Lock to Cursor") col = layout.column() -- cgit v1.2.3 From 291ae8822d5ff2fafbb53568c040828058cee0db Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Aug 2011 17:59:37 +0000 Subject: executing operators that changed the context from the console wasnt returning an operator set/flag. --- release/scripts/modules/console_python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release/scripts') diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py index 455eabe377b..425ea210104 100644 --- a/release/scripts/modules/console_python.py +++ b/release/scripts/modules/console_python.py @@ -179,7 +179,7 @@ def execute(context): # special exception. its possible the command loaded a new user interface if hash(sc) != hash(context.space_data): - return + return {'FINISHED'} bpy.ops.console.scrollback_append(text=sc.prompt + line, type='INPUT') -- cgit v1.2.3 From a9dea3afe9ca590e3d2d6788066d52dab3fd872c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 26 Aug 2011 18:48:48 +0000 Subject: correct missing bpy doc references. --- release/scripts/modules/bpy_extras/image_utils.py | 2 +- release/scripts/modules/bpy_extras/io_utils.py | 4 ++-- release/scripts/modules/bpy_extras/mesh_utils.py | 8 ++++---- release/scripts/modules/bpy_extras/object_utils.py | 12 ++++++------ release/scripts/modules/bpy_extras/view3d_utils.py | 18 +++++++++--------- release/scripts/modules/bpy_types.py | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py index eab75c3bd16..02959fae534 100644 --- a/release/scripts/modules/bpy_extras/image_utils.py +++ b/release/scripts/modules/bpy_extras/image_utils.py @@ -58,7 +58,7 @@ def load_image(imagepath, For formats blender can read, simply return the path that is given. :type convert_callback: function :return: an image or None - :rtype: :class:`Image` + :rtype: :class:`bpy.types.Image` """ import os import bpy diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index 6271c1f77b5..3f6a3682e7c 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -252,10 +252,10 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'): def axis_conversion_ensure(operator, forward_attr, up_attr): """ Function to ensure an operator has valid axis conversion settings, intended - to be used from :class:`Operator.check`. + to be used from :class:`bpy.types.Operator.check`. :arg operator: the operator to access axis attributes from. - :type operator: :class:`Operator` + :type operator: :class:`bpy.types.Operator` :arg forward_attr: attribute storing the forward axis :type forward_attr: string :arg up_attr: attribute storing the up axis diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index 4b5e3eeb066..7bc6dae3cc6 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -35,7 +35,7 @@ def mesh_linked_faces(mesh): other mesh elements within 1 mesh datablock. :arg mesh: the mesh used to group with. - :type mesh: :class:`Mesh` + :type mesh: :class:`bpy.types.Mesh` :return: lists of lists containing faces. :rtype: list """ @@ -125,9 +125,9 @@ def edge_loops_from_faces(mesh, faces=None, seams=()): [[(0, 1), (4, 8), (3, 8)], ...] :arg mesh: the mesh used to get edge loops from. - :type mesh: :class:`Mesh` + :type mesh: :class:`bpy.types.Mesh` :arg faces: optional face list to only use some of the meshes faces. - :type faces: :class:`MeshFaces`, sequence or or NoneType + :type faces: :class:`bpy.types.MeshFaces`, sequence or or NoneType :return: return a list of edge vertex index lists. :rtype: list """ @@ -450,7 +450,7 @@ def face_random_points(num_points, faces): :arg num_points: the number of random points to generate on each face. :type int: :arg faces: list of the faces to generate points on. - :type faces: :class:`MeshFaces`, sequence + :type faces: :class:`bpy.types.MeshFaces`, sequence :return: list of random points over all faces. :rtype: list """ diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py index 790f5ba48cb..3081e6f172e 100644 --- a/release/scripts/modules/bpy_extras/object_utils.py +++ b/release/scripts/modules/bpy_extras/object_utils.py @@ -33,11 +33,11 @@ def add_object_align_init(context, operator): Return a matrix using the operator settings and view context. :arg context: The context to use. - :type context: :class:`Context` + :type context: :class:`bpy.types.Context` :arg operator: The operator, checked for location and rotation properties. - :type operator: :class:`Operator` + :type operator: :class:`bpy.types.Operator` :return: the matrix from the context and settings. - :rtype: :class:`Matrix` + :rtype: :class:`mathutils.Matrix` """ from mathutils import Matrix, Vector, Euler @@ -92,13 +92,13 @@ def object_data_add(context, obdata, operator=None): location, rotation and layer. :arg context: The context to use. - :type context: :class:`Context` + :type context: :class:`bpy.types.Context` :arg obdata: the data used for the new object. :type obdata: valid object data type or None. :arg operator: The operator, checked for location and rotation properties. - :type operator: :class:`Operator` + :type operator: :class:`bpy.types.Operator` :return: the newly created object in the scene. - :rtype: :class:`ObjectBase` + :rtype: :class:`bpy.types.ObjectBase` """ scene = context.scene diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py index 26325633a05..c18a74bbb09 100644 --- a/release/scripts/modules/bpy_extras/view3d_utils.py +++ b/release/scripts/modules/bpy_extras/view3d_utils.py @@ -31,14 +31,14 @@ def region_2d_to_vector_3d(region, rv3d, coord): coordinate. :arg region: region of the 3D viewport, typically bpy.context.region. - :type region: :class:`Region` + :type region: :class:`bpy.types.Region` :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d. - :type rv3d: :class:`RegionView3D` + :type rv3d: :class:`bpy.types.RegionView3D` :arg coord: 2d coordinates relative to the region: (event.mouse_region_x, event.mouse_region_y) for example. :type coord: 2d vector :return: normalized 3d vector. - :rtype: :class:`Vector` + :rtype: :class:`mathutils.Vector` """ from mathutils import Vector @@ -65,9 +65,9 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location): *depth_location*. :arg region: region of the 3D viewport, typically bpy.context.region. - :type region: :class:`Region` + :type region: :class:`bpy.types.Region` :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d. - :type rv3d: :class:`RegionView3D` + :type rv3d: :class:`bpy.types.RegionView3D` :arg coord: 2d coordinates relative to the region; (event.mouse_region_x, event.mouse_region_y) for example. :type coord: 2d vector @@ -75,7 +75,7 @@ def region_2d_to_location_3d(region, rv3d, coord, depth_location): there is no defined depth with a 2d region input. :type depth_location: 3d vector :return: normalized 3d vector. - :rtype: :class:`Vector` + :rtype: :class:`mathutils.Vector` """ from mathutils import Vector from mathutils.geometry import intersect_point_line @@ -114,13 +114,13 @@ def location_3d_to_region_2d(region, rv3d, coord): Return the *region* relative 2d location of a 3d position. :arg region: region of the 3D viewport, typically bpy.context.region. - :type region: :class:`Region` + :type region: :class:`bpy.types.Region` :arg rv3d: 3D region data, typically bpy.context.space_data.region_3d. - :type rv3d: :class:`RegionView3D` + :type rv3d: :class:`bpy.types.RegionView3D` :arg coord: 3d worldspace location. :type coord: 3d vector :return: 2d location - :rtype: :class:`Vector` + :rtype: :class:`mathutils.Vector` """ from mathutils import Vector diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 8766c873dd8..e8c58105d94 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -287,7 +287,7 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup): Transform the the bones head, tail, roll and envalope (when the matrix has a scale component). :arg matrix: 3x3 or 4x4 transformation matrix. - :type matrix: :class:`Matrix` + :type matrix: :class:`mathutils.Matrix` :arg scale: Scale the bone envalope by the matrix. :type scale: bool :arg roll: Correct the roll to point in the same relative direction to the head and tail. -- cgit v1.2.3 From 752cb7485de8d06b261084eac3ab1c259a20ead3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 27 Aug 2011 12:01:01 +0000 Subject: Do not show confirm message when creating text block from menu. --- release/scripts/startup/bl_ui/space_text.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 300211a26bf..12e07c19ca1 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -172,7 +172,9 @@ class TEXT_MT_text(Menu): st = context.space_data text = st.text + layout.operator_context = 'EXEC_AREA' layout.operator("text.new") + layout.operator_context = 'INVOKE_AREA' layout.operator("text.open") if text: -- cgit v1.2.3 From c07bd1439a3f026b8603c52662c3e7ccc364321a Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 28 Aug 2011 14:46:03 +0000 Subject: == Sequencer == This patch adds: * support for proxy building again (missing feature from Blender 2.49) additionally to the way, Blender 2.49 worked, you can select several strips at once and make Blender build proxies in the background (using the job system) Also a new thing: movie proxies are now build into AVI files, and the proxy system is moved into ImBuf-library, so that other parts of blender can also benefit from it. * Timecode support: to fix seeking issues with files, that have a) varying frame rates b) very large GOP lengths c) are broken inbetween d) use different time code tracks the proxy builder can now also build timecode indices, which are used (optionally) for seeking. For the first time, it is possible, to do frame exact seeking on all file types. * Support for different video-streams in one video file (can be selected in sequencer, other parts of blender can also use it, but UI has to be added accordingly) * IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since older versions don't support the pkt_pts field, that is essential for building timecode indices. Windows and Mac libs are already updated, Linux-users have to build their own ffmpeg verions until distros keep up. --- release/scripts/startup/bl_ui/space_sequencer.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 84cc365425e..1902e9345d6 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -60,6 +60,7 @@ class SEQUENCER_HT_header(Header): layout.separator() layout.operator("sequencer.refresh_all") + layout.template_running_jobs() elif st.view_type == 'SEQUENCER_PREVIEW': layout.separator() layout.operator("sequencer.refresh_all") @@ -241,6 +242,7 @@ class SEQUENCER_MT_strip(Menu): layout.operator("sequencer.images_separate") layout.operator("sequencer.offset_clear") layout.operator("sequencer.deinterlace_selected_movies") + layout.operator("sequencer.rebuild_proxy") layout.separator() layout.operator("sequencer.duplicate") @@ -578,6 +580,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel): col = split.column() col.prop(strip, "filepath", text="") col.prop(strip, "mpeg_preseek", text="MPEG Preseek") + col.prop(strip, "streamindex", text="Stream Index") # TODO, sound??? # end drawing filename @@ -746,7 +749,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel): class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): - bl_label = "Proxy" + bl_label = "Proxy / Timecode" @classmethod def poll(cls, context): @@ -772,12 +775,29 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): flow = layout.column_flow() flow.prop(strip, "use_proxy_custom_directory") flow.prop(strip, "use_proxy_custom_file") - if strip.proxy: # TODO - need to add this somehow + if strip.proxy: if strip.use_proxy_custom_directory and not strip.use_proxy_custom_file: flow.prop(strip.proxy, "directory") if strip.use_proxy_custom_file: flow.prop(strip.proxy, "filepath") + row = layout.row() + row.prop(strip.proxy, "build_25") + row.prop(strip.proxy, "build_50") + row.prop(strip.proxy, "build_75") + row.prop(strip.proxy, "build_100") + + col = layout.column() + col.label(text="Build JPEG quality") + col.prop(strip.proxy, "quality") + + if strip.type == "MOVIE": + col = layout.column() + col.label(text="Use timecode index:") + + col.prop(strip.proxy, "timecode") + + class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): bl_label = "Scene Preview/Render" -- cgit v1.2.3