[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45708] branches/soc-2011-tomato: Merging r45693 through r45707 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Tue Apr 17 12:09:49 CEST 2012
Revision: 45708
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45708
Author: nazgul
Date: 2012-04-17 10:09:47 +0000 (Tue, 17 Apr 2012)
Log Message:
-----------
Merging r45693 through r45707 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45693
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45707
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_lightmap.py
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2011-tomato/source/blender/blenfont/intern/blf_font.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/customdata.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/editderivedmesh.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/navmesh_conversion.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/node.c
branches/soc-2011-tomato/source/blender/blenlib/BLI_math_vector.h
branches/soc-2011-tomato/source/blender/blenlib/BLI_scanfill.h
branches/soc-2011-tomato/source/blender/blenlib/intern/math_base_inline.c
branches/soc-2011-tomato/source/blender/blenlib/intern/math_vector_inline.c
branches/soc-2011-tomato/source/blender/blenlib/intern/scanfill.c
branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c
branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_polygon.c
branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_mirror.c
branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_bvh.c
branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_tools.c
branches/soc-2011-tomato/source/blender/editors/mesh/mesh_navmesh.c
branches/soc-2011-tomato/source/blender/editors/sound/sound_ops.c
branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_unwrap_ops.c
branches/soc-2011-tomato/source/blender/imbuf/intern/thumbs.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
branches/soc-2011-tomato/source/blender/nodes/composite/node_composite_tree.c
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_image.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_files.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_gesture.c
branches/soc-2011-tomato/source/gameengine/Ketsji/KX_NavMeshObject.cpp
Added Paths:
-----------
branches/soc-2011-tomato/release/scripts/templates/operator_file_export.py
branches/soc-2011-tomato/release/scripts/templates/operator_file_import.py
Removed Paths:
-------------
branches/soc-2011-tomato/release/scripts/templates/operator_export.py
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-45692
+ /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-45707
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_lightmap.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_lightmap.py 2012-04-17 05:49:07 UTC (rev 45707)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_lightmap.py 2012-04-17 10:09:47 UTC (rev 45708)
@@ -550,6 +550,16 @@
bl_idname = "uv.lightmap_pack"
bl_label = "Lightmap Pack"
+ # Disable REGISTER flag for now because this operator might create new
+ # images. This leads to non-proper operator redo because current undo
+ # stack is local for edit mode and can not remove images created by this
+ # oprtator.
+ # Proper solution would be to make undo stack aware of such things,
+ # but for now just disable redo. Keep undo here so unwanted changes to uv
+ # coords might be undone.
+ # This fixes infinite image creation reported there [#30968] (sergey)
+ bl_options = {'UNDO'}
+
PREF_CONTEXT = bpy.props.EnumProperty(
name="Selection",
items=(('SEL_FACES', "Selected Faces", "Space all UVs evently"),
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-04-17 05:49:07 UTC (rev 45707)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_view3d.py 2012-04-17 10:09:47 UTC (rev 45708)
@@ -1680,7 +1680,7 @@
layout.operator("mesh.merge")
layout.operator("mesh.rip_move")
layout.operator("mesh.split")
- layout.operator("mesh.separate")
+ layout.operator_menu_enum("mesh.separate", "type")
layout.operator("mesh.vert_connect")
layout.operator("mesh.vert_slide")
Deleted: branches/soc-2011-tomato/release/scripts/templates/operator_export.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/templates/operator_export.py 2012-04-17 05:49:07 UTC (rev 45707)
+++ branches/soc-2011-tomato/release/scripts/templates/operator_export.py 2012-04-17 10:09:47 UTC (rev 45708)
@@ -1,75 +0,0 @@
-import bpy
-
-
-def write_some_data(context, filepath, use_some_setting):
- print("running write_some_data...")
- f = open(filepath, 'w')
- f.write("Hello World %s" % use_some_setting)
- f.close()
-
- return {'FINISHED'}
-
-
-# ExportHelper is a helper class, defines filename and
-# invoke() function which calls the file selector.
-from bpy_extras.io_utils import ExportHelper
-from bpy.props import StringProperty, BoolProperty, EnumProperty
-
-
-class ExportSomeData(bpy.types.Operator, ExportHelper):
- '''This appears in the tooltip of the operator and in the generated docs.'''
- bl_idname = "export.some_data" # this is important since its how bpy.ops.export.some_data is constructed
- bl_label = "Export Some Data"
-
- # ExportHelper mixin class uses this
- filename_ext = ".txt"
-
- filter_glob = StringProperty(
- default="*.txt",
- options={'HIDDEN'},
- )
-
- # List of operator properties, the attributes will be assigned
- # to the class instance from the operator settings before calling.
- use_setting = BoolProperty(
- name="Example Boolean",
- description="Example Tooltip",
- default=True,
- )
-
- type = EnumProperty(
- name="Example Enum",
- description="Choose between two items",
- items=(('OPT_A', "First Option", "Description one"),
- ('OPT_B', "Second Option", "Description two")),
- default='OPT_A',
- )
-
- @classmethod
- def poll(cls, context):
- return context.active_object is not None
-
- def execute(self, context):
- return write_some_data(context, self.filepath, self.use_setting)
-
-
-# Only needed if you want to add into a dynamic menu
-def menu_func_export(self, context):
- self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator")
-
-
-def register():
- bpy.utils.register_class(ExportSomeData)
- bpy.types.INFO_MT_file_export.append(menu_func_export)
-
-
-def unregister():
- bpy.utils.unregister_class(ExportSomeData)
- bpy.types.INFO_MT_file_export.remove(menu_func_export)
-
-
-if __name__ == "__main__":
- register()
-
- # test call
- bpy.ops.export.some_data('INVOKE_DEFAULT')
Copied: branches/soc-2011-tomato/release/scripts/templates/operator_file_export.py (from rev 45707, trunk/blender/release/scripts/templates/operator_file_export.py)
===================================================================
--- branches/soc-2011-tomato/release/scripts/templates/operator_file_export.py (rev 0)
+++ branches/soc-2011-tomato/release/scripts/templates/operator_file_export.py 2012-04-17 10:09:47 UTC (rev 45708)
@@ -0,0 +1,72 @@
+import bpy
+
+
+def write_some_data(context, filepath, use_some_setting):
+ print("running write_some_data...")
+ f = open(filepath, 'w', encoding='utf-8')
+ f.write("Hello World %s" % use_some_setting)
+ f.close()
+
+ return {'FINISHED'}
+
+
+# ExportHelper is a helper class, defines filename and
+# invoke() function which calls the file selector.
+from bpy_extras.io_utils import ExportHelper
+from bpy.props import StringProperty, BoolProperty, EnumProperty
+from bpy.types import Operator
+
+
+class ExportSomeData(Operator, ExportHelper):
+ '''This appears in the tooltip of the operator and in the generated docs'''
+ bl_idname = "export_test.some_data" # important since its how bpy.ops.import_test.some_data is constructed
+ bl_label = "Export Some Data"
+
+ # ExportHelper mixin class uses this
+ filename_ext = ".txt"
+
+ filter_glob = StringProperty(
+ default="*.txt",
+ options={'HIDDEN'},
+ )
+
+ # List of operator properties, the attributes will be assigned
+ # to the class instance from the operator settings before calling.
+ use_setting = BoolProperty(
+ name="Example Boolean",
+ description="Example Tooltip",
+ default=True,
+ )
+
+ type = EnumProperty(
+ name="Example Enum",
+ description="Choose between two items",
+ items=(('OPT_A', "First Option", "Description one"),
+ ('OPT_B', "Second Option", "Description two")),
+ default='OPT_A',
+ )
+
+ def execute(self, context):
+ return write_some_data(context, self.filepath, self.use_setting)
+
+
+# Only needed if you want to add into a dynamic menu
+def menu_func_export(self, context):
+ self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator")
+
+
+def register():
+ bpy.utils.register_class(ExportSomeData)
+ bpy.types.INFO_MT_file_export.append(menu_func_export)
+
+
+def unregister():
+ bpy.utils.unregister_class(ExportSomeData)
+ bpy.types.INFO_MT_file_export.remove(menu_func_export)
+
+
+if __name__ == "__main__":
+ register()
+
+ # test call
+ bpy.ops.export_test.some_data('INVOKE_DEFAULT')
Copied: branches/soc-2011-tomato/release/scripts/templates/operator_file_import.py (from rev 45707, trunk/blender/release/scripts/templates/operator_file_import.py)
===================================================================
--- branches/soc-2011-tomato/release/scripts/templates/operator_file_import.py (rev 0)
+++ branches/soc-2011-tomato/release/scripts/templates/operator_file_import.py 2012-04-17 10:09:47 UTC (rev 45708)
@@ -0,0 +1,75 @@
+import bpy
+
+
+def read_some_data(context, filepath, use_some_setting):
+ print("running read_some_data...")
+ f = open(filepath, 'r', encoding='utf-8')
+ data = f.read()
+ f.close()
+
+ # would normally load the data hare
+ print(data)
+
+ return {'FINISHED'}
+
+
+# ImportHelper is a helper class, defines filename and
+# invoke() function which calls the file selector.
+from bpy_extras.io_utils import ImportHelper
+from bpy.props import StringProperty, BoolProperty, EnumProperty
+from bpy.types import Operator
+
+
+class ImportSomeData(Operator, ImportHelper):
+ '''This appears in the tooltip of the operator and in the generated docs'''
+ bl_idname = "import_test.some_data" # important since its how bpy.ops.import_test.some_data is constructed
+ bl_label = "Import Some Data"
+
+ # ImportHelper mixin class uses this
+ filename_ext = ".txt"
+
+ filter_glob = StringProperty(
+ default="*.txt",
+ options={'HIDDEN'},
+ )
+
+ # List of operator properties, the attributes will be assigned
+ # to the class instance from the operator settings before calling.
+ use_setting = BoolProperty(
+ name="Example Boolean",
+ description="Example Tooltip",
+ default=True,
+ )
+
+ type = EnumProperty(
+ name="Example Enum",
+ description="Choose between two items",
+ items=(('OPT_A', "First Option", "Description one"),
+ ('OPT_B', "Second Option", "Description two")),
+ default='OPT_A',
+ )
+
+ def execute(self, context):
+ return read_some_data(context, self.filepath, self.use_setting)
+
+
+# Only needed if you want to add into a dynamic menu
+def menu_func_import(self, context):
+ self.layout.operator(ImportSomeData.bl_idname, text="Text Import Operator")
+
+
+def register():
+ bpy.utils.register_class(ImportSomeData)
+ bpy.types.INFO_MT_file_import.append(menu_func_import)
+
+
+def unregister():
+ bpy.utils.unregister_class(ImportSomeData)
+ bpy.types.INFO_MT_file_import.remove(menu_func_import)
+
+
+if __name__ == "__main__":
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list