[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43150] trunk/blender/doc/python_api: correct api doc examples and a typo

Campbell Barton ideasman42 at gmail.com
Thu Jan 5 06:43:53 CET 2012


Revision: 43150
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43150
Author:   campbellbarton
Date:     2012-01-05 05:43:35 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
correct api doc examples and a typo

Modified Paths:
--------------
    trunk/blender/doc/python_api/examples/bpy.types.Operator.4.py
    trunk/blender/doc/python_api/examples/bpy.types.Operator.5.py
    trunk/blender/doc/python_api/rst/info_best_practice.rst

Modified: trunk/blender/doc/python_api/examples/bpy.types.Operator.4.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.types.Operator.4.py	2012-01-05 01:03:24 UTC (rev 43149)
+++ trunk/blender/doc/python_api/examples/bpy.types.Operator.4.py	2012-01-05 05:43:35 UTC (rev 43150)
@@ -22,7 +22,7 @@
     my_string = bpy.props.StringProperty(name="String Value")
 
     def execute(self, context):
-        print()
+        print("Test", self)
         return {'FINISHED'}
 
     def invoke(self, context, event):

Modified: trunk/blender/doc/python_api/examples/bpy.types.Operator.5.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.types.Operator.5.py	2012-01-05 01:03:24 UTC (rev 43149)
+++ trunk/blender/doc/python_api/examples/bpy.types.Operator.5.py	2012-01-05 05:43:35 UTC (rev 43150)
@@ -31,6 +31,7 @@
 
     def execute(self, context):
         context.object.location.x = self.value / 100.0
+        return {'FINISHED'}
 
     def modal(self, context, event):
         if event.type == 'MOUSEMOVE':  # Apply

Modified: trunk/blender/doc/python_api/rst/info_best_practice.rst
===================================================================
--- trunk/blender/doc/python_api/rst/info_best_practice.rst	2012-01-05 01:03:24 UTC (rev 43149)
+++ trunk/blender/doc/python_api/rst/info_best_practice.rst	2012-01-05 05:43:35 UTC (rev 43150)
@@ -83,7 +83,7 @@
 
 Modifying Lists
 ^^^^^^^^^^^^^^^
-In python we can add and remove from a list, This is slower when the list length is modifier, especially at the start of the list, since all the data after the index of modification needs to be moved up or down 1 place.
+In python we can add and remove from a list, This is slower when the list length is modified, especially at the start of the list, since all the data after the index of modification needs to be moved up or down 1 place.
 
 The most simple way to add onto the end of the list is to use ``my_list.append(list_item)`` or ``my_list.extend(some_list)`` and the fastest way to remove an item is ``my_list.pop()`` or ``del my_list[-1]``.
 



More information about the Bf-blender-cvs mailing list