diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-10-04 17:44:24 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-10-04 17:45:29 +0300 |
commit | b7046b42ab509c9f0c0928a77435eb9ffd79d3ef (patch) | |
tree | e97cb8e98a0ef1826f3b22706131dc7cba3313be /release/scripts/startup/bl_operators/wm.py | |
parent | e5c32844678e292a084d6d97eb2d4ba6affc217d (diff) |
Cleanup: Update links to online py API doc, and remove old commented stuff.
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 77 |
1 files changed, 2 insertions, 75 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index cc8921f1a8e..1c97d213e05 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1006,10 +1006,10 @@ class WM_OT_doc_view(Operator): doc_id = doc_id if bpy.app.version_cycle == "release": - _prefix = ("http://www.blender.org/documentation/blender_python_api_%s%s_release" % + _prefix = ("https://www.blender.org/api/blender_python_api_%s%s_release" % ("_".join(str(v) for v in bpy.app.version[:2]), bpy.app.version_char)) else: - _prefix = ("http://www.blender.org/documentation/blender_python_api_%s" % + _prefix = ("https://www.blender.org/api/blender_python_api_%s" % "_".join(str(v) for v in bpy.app.version)) def execute(self, context): @@ -1023,79 +1023,6 @@ class WM_OT_doc_view(Operator): return {'FINISHED'} -''' -class WM_OT_doc_edit(Operator): - """Edit online reference docs""" - bl_idname = "wm.doc_edit" - bl_label = "Edit Documentation" - - doc_id = doc_id - doc_new = doc_new - - _url = "http://www.mindrones.com/blender/svn/xmlrpc.php" - - def _send_xmlrpc(self, data_dict): - print("sending data:", data_dict) - - import xmlrpc.client - user = "blenderuser" - pwd = "blender>user" - - docblog = xmlrpc.client.ServerProxy(self._url) - docblog.metaWeblog.newPost(1, user, pwd, data_dict, 1) - - def execute(self, context): - - doc_id = self.doc_id - doc_new = self.doc_new - - class_name, class_prop = doc_id.split('.') - - if not doc_new: - self.report({'ERROR'}, "No input given for '%s'" % doc_id) - return {'CANCELLED'} - - # check if this is an operator - op_name = class_name.upper() + '_OT_' + class_prop - op_class = getattr(bpy.types, op_name, None) - - # Upload this to the web server - upload = {} - - if op_class: - rna = op_class.bl_rna - doc_orig = rna.description - if doc_orig == doc_new: - return {'RUNNING_MODAL'} - - print("op - old:'%s' -> new:'%s'" % (doc_orig, doc_new)) - upload["title"] = 'OPERATOR %s:%s' % (doc_id, doc_orig) - else: - rna = getattr(bpy.types, class_name).bl_rna - doc_orig = rna.properties[class_prop].description - if doc_orig == doc_new: - return {'RUNNING_MODAL'} - - print("rna - old:'%s' -> new:'%s'" % (doc_orig, doc_new)) - upload["title"] = 'RNA %s:%s' % (doc_id, doc_orig) - - upload["description"] = doc_new - - self._send_xmlrpc(upload) - - return {'FINISHED'} - - def draw(self, context): - layout = self.layout - layout.label(text="Descriptor ID: '%s'" % self.doc_id) - layout.prop(self, "doc_new", text="") - - def invoke(self, context, event): - wm = context.window_manager - return wm.invoke_props_dialog(self, width=600) -''' - - rna_path = StringProperty( name="Property Edit", description="Property data_path edit", |