[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [505] trunk/py/scripts/addons/ space_view3d_object_recall_operator.py: * Version 0.1.1

Martin Bürbaum martin.buerbaum at gmx.at
Tue Mar 23 23:04:35 CET 2010


Revision: 505
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=505
Author:   pontiac
Date:     2010-03-23 23:04:32 +0100 (Tue, 23 Mar 2010)

Log Message:
-----------
* Version 0.1.1
* Removed changes to 3D cursor.
* Removed removal of objects (Has to be handled in "Add Mesh" operator now.)

Modified Paths:
--------------
    trunk/py/scripts/addons/space_view3d_object_recall_operator.py

Modified: trunk/py/scripts/addons/space_view3d_object_recall_operator.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_object_recall_operator.py	2010-03-23 21:10:31 UTC (rev 504)
+++ trunk/py/scripts/addons/space_view3d_object_recall_operator.py	2010-03-23 22:04:32 UTC (rev 505)
@@ -24,7 +24,7 @@
 bl_addon_info = {
     'name': 'Recall object operator',
     'author': 'Buerbaum Martin (Pontiac)',
-    'version': '0.1',
+    'version': '0.1.1',
     'blender': (2, 5, 3),
     'location': 'View3D > Tool Shelf > Recall object creation operator',
     'url': '',
@@ -53,6 +53,10 @@
 manually at the location of the exiting object.
 This also means that "align to view" may affect
 rotation of the new object.
+
+v0.1.1 - Removed changes to 3D cursor.
+    Removed removal of objects (Has to be handled in "Add Mesh" operator now.)
+v0.1 - Initial revision
 """
 
 
@@ -110,13 +114,6 @@
 
                     print("Recalling operator: " + op_idname)
 
-                    # Move the 3D cursor to the object coordinates
-                    bpy.context.scene.cursor_location = ob.location
-
-                    # Remove existing object.
-                    # This assumes only the obj that is replaced is selected.
-                    bpy.ops.object.delete()
-
                     # Find and recall operator
                     op = get_operator_by_idname(op_idname)
                     if op:
@@ -152,6 +149,7 @@
 
         # Only show this panel if the object has "recall" data.
         if (ob
+            and context.selected_objects
             and len(context.selected_objects) == 1
             and ob == context.selected_objects[0]
             and 'recall' in ob):
@@ -163,12 +161,10 @@
         layout = self.layout
         layout.operator("view3d.recall_object_operator",
             text="Edit (replace)")
-        #description="Replaced the currently selected object with a" \
-        #" new one created with the same parameters."
 
-
 ################################
 
+
 def register():
     # Register the operators/menus.
     bpy.types.register(VIEW3D_OT_recall_object_operator)




More information about the Bf-extensions-cvs mailing list