forked from bartvdbraak/blender
correct api doc examples and a typo
This commit is contained in:
parent
be025ea319
commit
cce9c43295
@ -22,7 +22,7 @@ class CustomDrawOperator(bpy.types.Operator):
|
||||
my_string = bpy.props.StringProperty(name="String Value")
|
||||
|
||||
def execute(self, context):
|
||||
print()
|
||||
print("Test", self)
|
||||
return {'FINISHED'}
|
||||
|
||||
def invoke(self, context, event):
|
||||
|
@ -31,6 +31,7 @@ class ModalOperator(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
context.object.location.x = self.value / 100.0
|
||||
return {'FINISHED'}
|
||||
|
||||
def modal(self, context, event):
|
||||
if event.type == 'MOUSEMOVE': # Apply
|
||||
|
@ -83,7 +83,7 @@ Even though you're not looping on the list data **python is**, so you need to be
|
||||
|
||||
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]``.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user