editing operator descriptions now works.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 28 Oct 2009 11:55:58 +0000 (11:55 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 28 Oct 2009 11:55:58 +0000 (11:55 +0000)
release/scripts/modules/bpy_ops.py

index 3eeb7f554002306c14f6743a0564e2abea79507a..542f9aabc7e1e6e35e0f56a949a1f3bd7c8bd8b0 100644 (file)
@@ -380,11 +380,13 @@ class WM_OT_doc_edit(bpy.types.Operator):
                class_name, class_prop = self.doc_id.split('.')
                
                if self.doc_new:
+                       op_class = getattr(bpy.types, class_name.upper() + '_OT_' + class_prop, None)
                        
-                       if hasattr(bpy.types, class_name.upper() + '_OT_' + class_prop):
-                               # operator
-                               print("operator - old:'%s' -> new:'%s'" % ('<TODO>', self.doc_new))
-                               self._send_xmlrpc({'title':'OPERATOR %s:%s' % (self.doc_id,doc_orig),'description':self.doc_new})
+                       if op_class:
+                               doc_orig = op_class.__rna__.description
+                               if doc_orig != self.doc_new:
+                                       print("operator - old:'%s' -> new:'%s'" % (doc_orig, self.doc_new))
+                                       self._send_xmlrpc({'title':'OPERATOR %s:%s' % (self.doc_id,doc_orig),'description':self.doc_new})
                        else:
                                doc_orig = getattr(bpy.types, class_name).__rna__.properties[class_prop].description
                                if doc_orig != self.doc_new: