Blender 2.61.0 API Reference Guide
Blender 2.61.0 API Reference Guide
Blender Foundation
CONTENTS
ii
Welcome, this document is an API reference for Blender 2.61.0. built Unknown. A PDF version of this document is also available
CONTENTS
CONTENTS
CHAPTER
ONE
BLENDER/PYTHON DOCUMENTATION
1.1 Quickstart Introduction
1.1.1 Intro
This API is generally stable but some areas are still being added and improved. The Blender/Python API can do the following: Edit any data the user interface can (Scenes, Meshes, Particles etc.) Modify user preferences, keymaps and themes Run tools with own settings Create user interface elements such as menus, headers and panels Create new tools Create interactive tools Create new rendering engines that integrate with Blender Dene new settings in existing Blender data Draw in the 3D view using OpenGL commands from Python The Blender/Python API cant (yet)... Create new space types. Assign custom properties to every type. Dene callbacks or listeners to be notied when data is changed.
Right clicking on buttons and menu items directly links to API documentation. For more examples, the text menu has a templates section where some example operators can be found. To examine further scripts distributed with Blender, see ~/.blender/scripts/startup/bl_ui for the user interface and ~/.blender/scripts/startup/bl_op for operators.
Python accesses Blenders data in the same way as the animation system and user interface; this implies that any setting that can be changed via a button can also be changed from Python. Accessing data from the currently loaded blend le is done with the module bpy.data. This gives access to library data. For example:
>>> bpy.data.objects <bpy_collection[3], BlendDataObjects> >>> bpy.data.scenes <bpy_collection[1], BlendDataScenes> >>> bpy.data.materials <bpy_collection[1], BlendDataMaterials>
About Collections
Youll notice that an index as well as a string can be used to access members of the collection. Unlike Pythons dictionaries, both methods are acceptable; however, the index of a member may change while running Blender.
>>> list(bpy.data.objects) [bpy.data.objects["Cube"], bpy.data.objects["Plane"]] >>> bpy.data.objects[Cube] bpy.data.objects["Cube"] >>> bpy.data.objects[0] bpy.data.objects["Cube"]
Accessing attributes
Once you have a data block, such as a material, object, groups etc., its attributes can be accessed much like you would change a setting using the graphical interface. In fact, the tooltip for each button also displays the Python attribute which can help in nding what settings to change in a script.
>>> bpy.data.objects[0].name Camera
For testing what data to access its useful to use the Console, which is its own space type in Blender 2.5. This supports auto-complete, giving you a fast way to dig into different data in your le. Example of a data path that can be quickly found via the console:
>>> bpy.data.scenes[0].render.resolution_percentage 100 >>> bpy.data.scenes[0].objects["Torus"].data.vertices[0].co.x 1.0
Custom Properties
Python can access properties on any datablock that has an ID (data that can be linked in and accessed from bpy.data. When assigning a property, you can make up your own names, these will be created when needed or overwritten if they exist. This data is saved with the blend le and copied with objects. Example:
bpy.context.object["MyOwnProperty"] = 42 if "SomeProp" in bpy.context.object: print("Property found") # Use the get function like a python dictionary # which can have a fallback value. value = bpy.data.scenes["Scene"].get("test_prop", "fallback value") # dictionaries can be assigned as long as they only use basic types. group = bpy.data.groups.new("MyTestGroup") group["GameSettings"] = {"foo": 10, "bar": "spam", "baz": {}} del group["GameSettings"]
Note that these properties can only be assigned basic Python types. int, oat, string array of ints/oats dictionary (only string keys are supported, values must be basic types too) These properties are valid outside of Python. They can be animated by curves or used in driver paths. Context While its useful to be able to access data directly by name or as a list, its more common to operate on the users selection. The context is always available from bpy.context and can be used to get the active object, scene, tool settings along with many other attributes. Common-use cases:
Note that the context is read-only. These values cannot be modied directly, though they may be changed by running API functions or by using the data API. So bpy.context.object = obj will raise an error. But bpy.context.scene.objects.active = obj will work as expected. The context attributes change depending on where they are accessed. The 3D view has different context members than the console, so take care when accessing context attributes that the user state is known. See bpy.context API reference Operators (Tools) Operators are tools generally accessed by the user from buttons, menu items or key shortcuts. From the user perspective they are a tool but Python can run these with its own settings through the bpy.ops module. Examples:
>>> bpy.ops.mesh.flip_normals() {FINISHED} >>> bpy.ops.mesh.hide(unselected=False) {FINISHED} >>> bpy.ops.object.scale_apply() {FINISHED}
Note: The menu item: Help -> Operator Cheat Sheet gives a list of all operators and their default values in Python syntax, along with the generated docs. This is a good way to get an overview of all blenders operators.
Operator Poll()
Many operators have a poll function which may check that the mouse is a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc). When an operators poll function fails within python, an exception is raised. For example, calling bpy.ops.view3d.render_border() from the console raises the following error:
RuntimeError: Operator bpy.ops.view3d.render_border.poll() failed, context is incorrect
In this case the context must be the 3d view with an active camera. To avoid using try/except clauses wherever operators are called you can call the operators own .poll() function to check if it can run in the current context.
if bpy.ops.view3d.render_border.poll(): bpy.ops.view3d.render_border()
1.1.4 Integration
Python scripts can integrate with Blender in the following ways: By dening a rendering engine.
By dening operators. By dening menus, headers and panels. By inserting new buttons into existing menus, headers and panels In Python, this is done by dening a class, which is a subclass of an existing type. Example Operator
import bpy
class SimpleOperator(bpy.types.Operator): Tooltip bl_idname = "object.simple_operator" bl_label = "Simple Object Operator" @classmethod def poll(cls, context): return context.active_object is not None def execute(self, context): main(context) return {FINISHED}
Once this script runs, SimpleOperator is registered with Blender and can be called from the operator search popup or added to the toolbar. To run the script: 1. Highlight the above code then press Ctrl+C to copy it. 2. Start Blender 3. Press Ctrl+Right twice to change to the Scripting layout. 4. Click the button labeled New and the conrmation pop up in order to create a new text block. 5. Press Ctrl+V to paste the code into the text panel (the upper left frame).
6. Click on the button Run Script. 7. Move youre mouse into the 3D view, press spacebar for the operator search menu, and type Simple. 8. Click on the Simple Operator item found in search. See Also: The class members with the bl_ prex are documented in the API reference bpy.types.Operator Note: The output from the main function is sent to the terminal; in order to see this, be sure to use the terminal.
Example Panel Panels register themselves as a class, like an operator. Notice the extra bl_ variables used to set the context they display in.
import bpy
class HelloWorldPanel(bpy.types.Panel): bl_label = "Hello World Panel" bl_idname = "OBJECT_PT_hello" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "object" def draw(self, context): layout = self.layout obj = context.object row = layout.row() row.label(text="Hello world!", icon=WORLD_DATA) row = layout.row() row.label(text="Active object is: " + obj.name) row = layout.row() row.prop(obj, "name")
To run the script: 1. Highlight the above code then press Ctrl+C to copy it 2. Start Blender 3. Press Ctrl+Right twice to change to the Scripting layout 8 Chapter 1. Blender/Python Documentation
4. Click the button labeled New and the conrmation pop up in order to create a new text block. 5. Press Ctrl+V to paste the code into the text panel (the upper left frame) 6. Click on the button Run Script. To view the results: 1. Select the the default cube. 2. Click on the Object properties icon in the buttons panel (far right; appears as a tiny cube). 3. Scroll down to see a panel named Hello World Panel. 4. Changing the object name also updates Hello World Panels Name: eld. Note the row distribution and the label and properties that are available through the code. See Also: bpy.types.Panel
1.1.5 Types
Blender denes a number of Python types but also uses Python native types. Blenders Python API can be split up into 3 categories. Native Types In simple cases returning a number or a string as a custom type would be cumbersome, so these are accessed as normal python types. blender oat/int/boolean -> oat/int/boolean blender enumerator -> string
>>> C.object.rotation_mode = AXIS_ANGLE
Internal Types Used for Blender datablocks and collections: bpy.types.bpy_struct For data that contains its own attributes groups/meshes/bones/scenes... etc. There are 2 main types that wrap Blenders data, one for datablocks (known internally as bpy_struct), another for properties.
>>> bpy.context.object bpy.data.objects[Cube] >>> C.scene.objects bpy.data.scenes[Scene].objects
Note that these types reference Blenders data so modifying them is immediately visible. Mathutils Types Used for vectors, quaternion, eulers, matrix and color types, accessible from mathutils Some attributes such as bpy.types.Object.location, bpy.types.PoseBone.rotation_euler and bpy.types.Scene.cursor_location can be accessed as special math types which can be used together and manipulated in various useful ways. Example of a matrix, vector multiplication:
bpy.context.object.matrix_world * bpy.context.object.data.verts[0].co
Note: mathutils types keep a reference to Blenders internal data so changes can be applied back. Example:
# modifies the Z axis in place. bpy.context.object.location.z += 2.0 # location variable holds a reference to the object too. location = bpy.context.object.location location *= 2.0 # Copying the value drops the reference so the value can be passed to # functions and modified without unwanted side effects. location = bpy.context.object.location.copy()
1.1.6 Animation
There are 2 ways to add keyframes through Python. The rst is through key properties directly, which is similar to inserting a keyframe from the button as a user. You can also manually create the curves and keyframe data, then set the path to the property. Here are examples of both methods. Both examples insert a keyframe on the active objects Z axis. Simple example:
obj = bpy.context.object obj.location[2] = 0.0 obj.keyframe_insert(data_path="location", frame=10.0, index=2) obj.location[2] = 1.0 obj.keyframe_insert(data_path="location", frame=20.0, index=2)
10
This modies Blenders internal data directly. When you run this in the interactive console you will see the 3D viewport update.
copy into one of the directories scripts/startup, where they will be automatically imported on startup. dene as an addon, enabling the addon will load it as a python module. Addons Some of blenders functionality is best kept optional, alongside scripts loaded at startup we have addons which are kept in their own directory scripts/addons, and only load on startup if selected from the user preferences. The only difference between addons and built-in python modules is that addons must contain a bl_info variable which blender uses to read metadata such as name, author, category and URL. The user preferences addon listing uses bl_info to display information about each addon. See Addons for details on the bl_info dictionary.
First note that we subclass a member of bpy.types, this is common for all classes which can be integrated with blender and used so we know if this is an Operator and not a Panel when registering. Both class properties start with a bl_ prex. This is a convention used to distinguish blender properties from those you add yourself.
12
Next see the execute function, which takes an instance of the operator and the current context. A common prex is not used for functions. Lastly the register function is called, this takes the class and loads it into blender. See Class Registration. Regarding inheritance, blender doesnt impose restrictions on the kinds of class inheritance used, the registration checks will use attributes and functions dened in parent classes. class mix-in example:
import bpy class BaseOperator: def execute(self, context): print("Hello World BaseClass") return {FINISHED} class SimpleOperator(bpy.types.Operator, BaseOperator): bl_idname = "object.simple_operator" bl_label = "Tool Name" bpy.utils.register_class(SimpleOperator)
Notice these classes dont dene an __init__(self) function. While __init__() and __del__() will be called if dened, the class instances lifetime only spans the execution. So a panel for example will have a new instance for every redraw, for this reason there is rarely a cause to store variables in the panel instance. Instead, persistent variables should be stored in Blenders data so that the state can be restored when blender is restarted. Note: Modal operators are an exception, keeping their instance variable as blender runs, see modal operator template. So once the class is registered with blender, instancing the class and calling the functions is left up to blender. In fact you cannot instance these classes from the script as you would expect with most python APIs. To run operators you can call them through the operator api, eg:
import bpy bpy.ops.object.simple_operator()
User interface classes are given a context in which to draw, buttons window, le header, toolbar etc, then they are drawn when that area is displayed so they are never called by python scripts directly.
1.2.5 Registration
Module Registration Blender modules loaded at startup require register() and unregister() functions. These are the only functions that blender calls from your code, which is otherwise a regular python module. A simple blender/python module can look like this:
import bpy class SimpleOperator(bpy.types.Operator): """ See example above """ def register(): bpy.utils.register_class(SimpleOperator) def unregister():
13
These functions usually appear at the bottom of the script containing class registration sometimes adding menu items. You can also use them for internal purposes setting up data for your own tools but take care since register wont re-run when a new blend le is loaded. The register/unregister calls are used so its possible to toggle addons and reload scripts while blender runs. If the register calls were placed in the body of the script, registration would be called on import, meaning there would be no distinction between importing a module or loading its classes into blender. This becomes problematic when a script imports classes from another module making it difcult to manage which classes are being loaded and when. The last 2 lines are only for testing:
if __name__ == "__main__": register()
This allows the script to be run directly in the text editor to test changes. This register() call wont run when the script is imported as a module since __main__ is reserved for direct execution. Class Registration Registering a class with blender results in the class denition being loaded into blender, where it becomes available alongside existing functionality. Once this class is loaded you can access it from bpy.types, using the bl_idname rather than the classes original name. When loading a class, blender performs sanity checks making sure all required properties and functions are found, that properties have the correct type, and that functions have the right number of arguments. Mostly you will not need concern yourself with this but if there is a problem with the class denition it will be raised on registering: Using the function arguments def execute(self, context, spam), will raise an exception: ValueError: expected Operator, SimpleOperator class "execute" function to have 2 args, found 3 Using bl_idname = 1 will raise. TypeError: validating class error: type, not int
Multiple-Classes
Loading classes into blender is described above, for simple cases calling bpy.utils.register_class (SomeClass) is sufcient, but when there are many classes or a packages submodule has its own classes it can be tedious to list them all for registration. For more convenient loading/unloading bpy.utils.register_module bpy.utils.unregister_module (module) functions exist. A script which denes many of its own operators, panels menus etc. you only need to write: (module) and
14
Internally blender collects subclasses on registrable types, storing them by the module in which they are dened. By passing the module name to bpy.utils.register_module blender can register all classes created by this module and its submodules.
Inter Classes Dependencies
When customizing blender you may want to group your own settings together, after all, they will likely have to co-exist with other scripts. To group these properties classes need to be dened, for groups within groups or collections within groups you can nd yourself having to deal with order of registration/unregistration. Custom properties groups are themselves classes which need to be registered. Say you want to store material settings for a custom engine.
# Create new property # bpy.data.materials[0].my_custom_props.my_float import bpy class MyMaterialProps(bpy.types.PropertyGroup): my_float = bpy.props.FloatProperty() def register(): bpy.utils.register_class(MyMaterialProps) bpy.types.Material.my_custom_props = bpy.props.PointerProperty(type=MyMaterialProps) def unregister(): del bpy.types.Material.my_custom_props bpy.utils.unregister_class(MyMaterialProps) if __name__ == "__main__": register()
Note: The class must be registered before being used in a property, failing to do so will raise an error: ValueError: bpy_struct "Material" registration error: not register
# Create new property group with a sub property # bpy.data.materials[0].my_custom_props.sub_group.my_float import bpy class MyMaterialSubProps(bpy.types.PropertyGroup): my_float = bpy.props.FloatProperty() class MyMaterialGroupProps(bpy.types.PropertyGroup): sub_group = bpy.props.PointerProperty(type=MyMaterialSubProps) def register(): bpy.utils.register_class(MyMaterialSubProps) bpy.utils.register_class(MyMaterialGroupProps)
my_custom_props could
15
bpy.types.Material.my_custom_props = bpy.props.PointerProperty(type=MyMaterialGroupProps) def unregister(): del bpy.types.Material.my_custom_props bpy.utils.unregister_class(MyMaterialGroupProps) bpy.utils.unregister_class(MyMaterialSubProps) if __name__ == "__main__": register()
Note: The lower most class needs to be registered rst and that unregister() is a mirror of register()
Manipulating Classes
Properties can be added and removed as blender runs, normally happens on register or unregister but for some special cases it may be useful to modify types as the script runs. For example:
# add a new property to an existing type bpy.types.Object.my_float = bpy.props.FloatProperty() # remove del bpy.types.Object.my_float
This works just as well for PropertyGroup subclasses you dene yourself.
class MyPropGroup(bpy.types.PropertyGroup): pass MyPropGroup.my_float = bpy.props.FloatProperty()
In some cases the specier for data may not be in blender, renderman shader denitions for example and it may be useful to dene types and remove them on the y.
for i in range(10): idname = "object.operator_%d" % i def func(self, context): print("Hello World", self.bl_idname) return {FINISHED} opclass = type("DynOp%d" % i, (bpy.types.Operator, ), {"bl_idname": idname, "bl_label": "Test", "execute": func}, ) bpy.utils.register_class(opclass)
16
Note: Notice type() is called to dene the class. This is an alternative syntax for class creation in python, better suited to constructing classes dynamically. Calling these operators:
>>> bpy.ops.object.operator_1() Hello World OBJECT_OT_operator_1 {FINISHED} >>> bpy.ops.object.operator_2() Hello World OBJECT_OT_operator_2 {FINISHED}
As well as pep8 we have other conventions used for blender python scripts. Use single quotes for enums, and double quotes for strings. Both are of course strings but in our internal API enums are unique items from a limited set. eg.
bpy.context.scene.render.image_settings.file_format = PNG bpy.context.scene.render.filepath = "//render_out"
pep8 also denes that lines should not exceed 79 characters, we felt this is too restrictive so this is optional per script. Periodically we run checks for pep8 compliance on blender scripts, for scripts to be included in this check add this line as a comment at the top of the script. # <pep8 compliant> 1.3. Best Practice 17
In Python there are some handy list functions that save you having to search through the list. Even though youre not looping on the list data python is, so you need to be aware of functions that will slow down your script by searching the whole list.
my_list.count(list_item) my_list.index(list_item) my_list.remove(list_item) if list_item in my_list: ...
Modifying Lists
In python we can add and remove from a list, This is slower when the list length is modier, especially at the start of the list, since all the data after the index of modication 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]. To use an index you can use my_list.insert(index, list_item) or list.pop(index) for list removal, but these are slower. Sometimes its faster (but more memory hungry) to just rebuild the list. Say you want to remove all triangle faces in a list. Rather than...
faces = mesh.faces[:] f_idx = len(faces) while f_idx: f_idx -= 1 # make a list copy of the meshes faces # Loop backwards # while the value is not 0
18
If you have a list that you want to add onto another list, rather then...
for l in some_list: my_list.append(l)
Use...
my_list.extend([a, b, c...])
Note that insert can be used when needed, but it is slower than append especially when inserting at the start of a long list. This example shows a very sub-optimal way of making a reversed list.
reverse_list = [] for list_item in some_list: reverse_list.insert(0, list_item)
Use my_list.pop(index) rather than my_list.remove(list_item) This requires you to have the index of the list item but is faster since remove() will search the list. Here is an example of how to remove items in 1 loop, removing the last items rst, which is faster (as explained above).
list_index = len(my_list) while list_index: list_index -= 1 if my_list[list_index].some_test_attribute == 1: my_list.pop(list_index)
This example shows a fast way of removing items, for use in cases were where you can alter the list order without breaking the scripts functionality. This works by swapping 2 list items, so the item you remove is always last.
pop_index = 5 # swap so the pop_index is last. my_list[-1], my_list[pop_index] = my_list[pop_index], my_list[-1] # remove last item (pop_index) my_list.pop()
When removing many items in a large list this can provide a good speedup.
Avoid Copying Lists
When passing a list/dictionary to a function, it is faster to have the function modify the list rather then returning a new list so python doesnt have to duplicate the list in memory. Functions that modify a list in-place are more efcient then functions that create new lists. This is generally slower so only use for functions when it makes sense not to modify the list in place.
19
Also note that passing a sliced list makes a copy of the list in python memory
>>> foobar(my_list[:])
If my_list was a large array containing 10000s of items, a copy could use a lot of extra memory. Writing Strings to a File (Python General) Here are 3 ways of joining multiple strings into 1 string for writing This really applies to any area of your code that involves a lot of string joining. Pythons string addition, dont use if you can help it, especially when writing data in a loop.
>>> file.write(str1 + " " + str2 + " " + str3 + "\n")
String formatting. Use this when youre writing string data from oats and ints
>>> file.write("%s %s %s\n" % (str1, str2, str3))
join is fastest on many strings, string formatting is quite fast too (better for converting data types). String arithmetic is slowest. Parsing Strings (Import/Exporting) Since many le formats are ASCII, the way you parse/export strings can make a large difference in how fast your script runs. When importing strings to make into blender there are a few ways to parse the string.
Parsing Numbers
Use float(string) rather than eval(string), if you know the value will be an int then int(string), oat() will work for an int too but its faster to read ints with int().
Checking String Start/End
Use...
>>> if line.startswith("vert "):
20
Using startswith() is slightly faster (approx 5%) and also avoids a possible error with the slice length not matching the string length. my_string.endswith(foo_bar) can be used for line endings too. if your unsure whether the text is upper or lower case use lower or upper string function.
>>> if line.lower().startswith("vert ")
Use try/except Sparingly The try statement useful to save time writing error checking code. However try is signicantly slower then an if since an exception has to be set each time, so avoid using try in areas of your code that execute in a loop and runs many times. There are cases where using try is faster than checking weather the condition will raise an error, so it is worth experimenting. Value Comparison Python has two ways to compare values a == b and a is b, The difference is that == may run the objects comparison function __cmp__() where as is compares identity, that both variables reference the same item in memory. In cases where you know you are checking for the same value which is referenced from multiple places, is is faster. Time Youre Code While developing a script its good to time it to be aware of any changes in performance, this can be done simply.
import time time_start = time.time() # do something... print("My Script Finished: %.4f sec" % time.time() - time_start)
If the script runs for too long or you accidentally enter an innite loop, Ctrl+C in the terminal (Ctrl+Break on Windows) will quit the script early. Note: For Linux and OSX users this means starting the terminal rst, then running blender from within it. On Windows the terminal can be enabled from the help menu.
Executing Modules This example shows loading a script in as a module and executing a module function.
import myscript import imp imp.reload(myscript) myscript.main()
22
Notice that the script is reloaded every time, this forces use of the modied version, otherwise the cached one in sys.modules would be used until blender was restarted. The important difference between this and executing the script directly is it has to call a function in the module, in this case main() but it can be any function, an advantage with this is you can pass arguments to the function from this small script which is often useful for testing different settings quickly. The other issue with this is the script has to be in pythons module search path. While this is not best practice - for testing you can extend the search path, this example adds the current blend les directory to the search path, then loads the script as a module.
import sys import os import bpy blend_dir = os.path.basename(bpy.data.filepath) if blend_dir not in sys.path: sys.path.append(blend_dir) import myscript import imp imp.reload(myscript) myscript.main()
You might want to run this with a blend le so the script has some data to operate on.
blender myscene.blend --background --python myscript.py
Note: Depending on your setup you might have to enter the full path to the blender executable. Once the script is running properly in background mode, youll want to check the output of the script, this depends completely on the task at hand however here are some suggestions. render the output to an image, use an image viewer and keep writing over the same image each time. save a new blend le, or export the le using one of blenders exporters. if the results can be displayed as text - print them or write them to a le. This can take a little time to setup, but it can be well worth the effort to reduce the time it takes to test changes you can even have blender running the script ever few seconds with a viewer updating the results, so no need to leave youre text editor to see changes.
Using external programs adds an extra dependency and may limit who can use the script but to quickly setup youre own custom pipeline or writing one-off scripts this can be handy. Examples include: Run The Gimp in batch mode to execute custom scripts for advanced image processing. Write out 3D models to use external mesh manipulation tools and read back in the results. Convert les into recognizable formats before reading.
The next example is an equivalent single line version of the script above which is easier to paste into youre code:
__import__(code).interact(local={k: v for ns in (globals(), locals()) for k, v in ns.items()})
code.interact can be added at any line in the script and will pause the script an launch an interactive interpreter in the terminal, when youre done you can quit the interpreter and the script will continue execution. Admittedly this highlights the lack of any python debugging support built into blender, but its still handy to know. Note: This works in the game engine as well, it can be handy to inspect the state of a running game.
24
1.4.8 Advanced
Blender as a module From a python perspective its nicer to have everything as an extension which lets the python script combine many components. Advantages include: you can use external editors/IDEs with blenders python API and execute scripts within the IDE (step over code, inspect variables as the script runs). editors/IDEs can auto complete blender modules & variables. existing scripts can import blender APIs without having to run inside blender. This is marked advanced because to run blender as a python module requires a special build option. For instructions on building see Building blender as a python module Python Safety (Build Option) Since its possible to access data which has been removed (see Gotchas), this can be hard to track down the cause of crashes. To raise python exceptions on accessing freed data (rather then crashing), enable the CMake build option WITH_PYTHON_SAFETY. This enables data tracking which makes data access about 2x slower which is why the option is not enabled in release builds.
1.5 Gotchas
This document attempts to help you work with the Blender API in areas that can be troublesome and avoid practices that are known to give instability.
1.5. Gotchas
25
Which raises the question as to what the correct context might be? Typically operators check for the active area type, a selection or active object they can operate on, but some operators are more picky about when they run. In most cases you can gure out what context an operator needs simply be seeing how its used in Blender and thinking about what it does. Unfortunately if youre still stuck - the only way to really know whats going on is to read the source code for the poll function and see what its checking. For python operators its not so hard to nd the source since its included with Blender and the source le/line is included in the operator reference docs. Downloading and searching the C code isnt so simple, especially if youre not familiar with the C language but by searching the operator name or description you should be able to nd the poll function with no knowledge of C. Note: Blender does have the functionality for poll functions to describe why they fail, but its currently not used much, if youre interested to help improve our API feel free to add calls to CTX_wm_operator_poll_msg_set where its not obvious why poll fails.
>>> bpy.ops.gpencil.draw() RuntimeError: Operator bpy.ops.gpencil.draw.poll() Failed to find Grease Pencil data to draw into
The operator still doesnt work! Certain operators in Blender are only intended for use in a specic context, some operators for example are only called from the properties window where they check the current material, modier or constraint. Examples of this are: bpy.ops.texture.slot_move bpy.ops.constraint.limitdistance_reset bpy.ops.object.modifier_copy bpy.ops.buttons.file_browse Another possibility is that you are the rst person to attempt to use this operator in a script and some modications need to be made to the operator to run in a different context, if the operator should logically be able to run but fails when accessed from a script it should be reported to the bug tracker.
26
parent objects and all of their f-curves, constraints etc. To avoid expensive recalculations every time a property is modied, Blender defers making the actual calculations until they are needed. However, while the script runs you may want to access the updated values. This can be done by calling bpy.types.Scene.update after modifying values which recalculates all data that is tagged to be updated. Can I redraw during the script? The ofcial answer to this is no, or... You dont want to do that. To give some background on the topic... While a script executes Blender waits for it to nish and is effectively locked until its done, while in this state Blender wont redraw or respond to user input. Normally this is not such a problem because scripts distributed with Blender tend not to run for an extended period of time, nevertheless scripts can take ages to execute and its nice to see whats going on in the view port. Tools that lock Blender in a loop and redraw are highly discouraged since they conict with Blenders ability to run multiple operators at once and update different parts of the interface as the tool runs. So the solution here is to write a modal operator, that is - an operator which denes a modal() function, See the modal operator template in the text editor. Modal operators execute on user input or setup their own timers to run frequently, they can handle the events or pass through to be handled by the keymap or other modal operators. Transform, Painting, Fly-Mode and File-Select are example of a modal operators. Writing modal operators takes more effort than a simple for loop that happens to redraw but is more exible and integrates better with Blenders design. Ok, Ok! I still want to draw from python If you insist - yes its possible, but scripts that use this hack wont be considered for inclusion in Blender and any issues with using it wont be considered bugs, this is also not guaranteed to work in future releases.
bpy.ops.wm.redraw_timer(type=DRAW_WIN_SWAP, iterations=1)
1.5. Gotchas
27
With the BMesh API we may expose mesh data to python so we can write useful tools in python which are also fast to execute while in edit-mode. For the time being this limitation just has to be worked around but were aware its frustrating needs to be addressed.
Edit Bones bpy.context.object.data.edit_bones contains a editbones; to access them you must set the armature mode to edit mode rst (editbones do not exist in object or pose mode). Use these to create new bones, set their head/tail or roll, change their parenting relationships to other bones, etc. Example using bpy.types.EditBone in armature editmode: This is only possible in edit mode.
>>> bpy.context.object.data.edit_bones["Bone"].head = Vector((1.0, 2.0, 3.0))
Bones (Object Mode) bpy.context.object.data.bones contains bones. These live in object mode, and have various properties you can change, note that the head and tail properties are read-only. Example using bpy.types.Bone in object or pose mode: Returns a bone (not an editbone) outside of edit mode
>>> bpy.context.active_bone
This works, as with blender the setting can be edited in any mode
>>> bpy.context.object.data.bones["Bone"].use_deform = True
28
Pose Bones bpy.context.object.pose.bones contains pose bones. This is where animation data resides, i.e. animatable transformations are applied to pose bones, as are constraints and ik-settings. Examples using bpy.types.PoseBone in object or pose mode:
# Gets the name of the first constraint (if it exists) bpy.context.object.pose.bones["Bone"].constraints[0].name # Gets the last selected pose bone (pose mode only) bpy.context.active_pose_bone
Note: Notice the pose is accessed from the object rather than the object data, this is why blender can have 2 or more objects sharing the same armature in different poses.
Note: Strictly speaking PoseBones are not bones, they are just the state of the armature, stored in the bpy.types.Object rather than the bpy.types.Armature, the real bones are however accessible from the pose bones - bpy.types.PoseBone.bone
Armature Mode Switching While writing scripts that deal with armatures you may nd you have to switch between modes, when doing so take care when switching out of editmode not to keep references to the edit-bones or their head/tail vectors. Further access to these will crash blender so its important the script clearly separates sections of the code which operate in different modes. This is mainly an issue with editmode since pose data can be manipulated without having to be in pose mode, however for operator access you may still need to enter pose mode.
Data names may not match the assigned values if they exceed the maximum length, are already used or an empty string.
1.5. Gotchas
29
Its better practice not to reference objects by names at all, once created you can store the data in a list, dictionary, on a class etc, there is rarely a reason to have to keep searching for the same data by name. If you do need to use name references, its best to use a dictionary to maintain a mapping between the names of the imported assets and the newly created data, this way you dont run this risk of referencing existing data from the blend le, or worse modifying it.
# typically declared in the main body of the function. mesh_name_mapping = {} mesh = bpy.data.meshes.new(name=meshid) mesh_name_mapping[meshid] = mesh # normally some code, or function calls... # use own dictionary rather then bpy.data mesh = mesh_name_mapping[meshid]
Library Collisions Blender keeps data names unique - bpy.types.ID.name so you cant name two objects, meshes, scenes etc the same thing by accident. However when linking in library data from another blend le naming collisions can occur, so its best to avoid referencing data by name at all. This can be tricky at times and not even blender handles this correctly in some case (when selecting the modier object for eg you cant select between multiple objects with the same name), but its still good to try avoid problems in this area. If you need to select between local and library data, there is a feature in bpy.data members to allow for this.
# typical name lookup, could be local or library. obj = bpy.data.objects["my_obj"] # library object name look up using a pair # where the second argument is the library path matching bpy.types.Library.filepath obj = bpy.data.objects["my_obj", "//my_lib.blend"] # local object name look up using a pair # where the second argument excludes library data from being returned. obj = bpy.data.objects["my_obj", None] # both the examples above also works for get obj = bpy.data.objects.get(("my_obj", None))
30
When using blender data from linked libraries there is an unfortunate complication since the path will be relative to the library rather then the open blend le. When the data block may be from an external blend le pass the library argument from the bpy.types.ID.
>>> bpy.path.abspath(image.filepath, library=image.library)
These returns the absolute path which can be used with native python modules.
>>> print(bpy.data.filepath) UnicodeEncodeError: ascii codec cant encode characters in position 10-21: ordinal not in range(128 >>> bpy.context.object.name = bpy.data.filepath Traceback (most recent call last): File "<blender_console>", line 1, in <module> TypeError: bpy_struct: item.attr= val: Object.name expected a string type, not str
Unicode encoding/decoding is a big topic with comprehensive python documentation, to avoid getting stuck too deep in encoding problems - here are some suggestions: Always use utf-8 encoiding or convert to utf-8 where the input is unknown. Avoid manipulating lepaths as strings directly, use os.path functions instead. Use os.fsencode() / os.fsdecode() rather then the built in string decoding functions when operating on paths. To print paths or to include them in the user interface use repr(path) rst or "%r" % path with string formatting. Possibly - use bytes instead of python strings, when reading some input its less trouble to read it as binary data though you will still need to decide how to treat any strings you want to use with Blender, some importers do this.
1.5. Gotchas
31
print("Starting threads...") for t in threads: t.start() print("Waiting for threads to finish...") for t in threads: t.join()
This an example of a timer which runs many times a second and moves the default cube continuously while Blender runs (Unsupported).
def func(): print("Running...") import bpy bpy.data.objects[Cube].location.x += 0.05 def my_timer(): from threading import Timer t = Timer(0.1, my_timer) t.start() func() my_timer()
Use cases like the one above which leave the thread running once the script nishes may seem to work for a while but end up causing random crashes or errors in Blenders own drawing code. So far, no work has gone into making Blenders python integration thread safe, so until its properly supported, best not make use of this. 32 Chapter 1. Blender/Python Documentation
Note: Pythons threads only allow co-currency and wont speed up your scripts on multi-processor systems, the subprocess and multiprocess modules can be used with blender and make use of multiple CPUs too.
As suggested above, simply not holding references to data when Blender is used interactively by the user is the only way to ensure the script doesnt become unstable. Edit Mode / Memory Access Switching edit-mode bpy.ops.object.mode_set(mode=EDIT) / bpy.ops.object.mode_set(mode=OBJECT) will re-allocate objects data, any references to a meshes vertices/faces/uvs, armatures bones, curves points etc cannot be accessed after switching edit-mode. Only the reference to the data its self can be re-accessed, the following example will crash.
1.5. Gotchas
33
mesh = bpy.context.active_object.data faces = mesh.faces bpy.ops.object.mode_set(mode=EDIT) bpy.ops.object.mode_set(mode=OBJECT) # this will crash print(faces)
So after switching edit-mode you need to re-access any object data variables, the following example shows how to avoid the crash above.
mesh = bpy.context.active_object.data faces = mesh.faces bpy.ops.object.mode_set(mode=EDIT) bpy.ops.object.mode_set(mode=OBJECT) # faces have been re-allocated faces = mesh.faces print(faces)
These kinds of problems can happen for any functions which re-allocate the object data but are most common when switching edit-mode. Array Re-Allocation When adding new points to a curve or verticess/edges/faces to a mesh, internally the array which stores this data is re-allocated.
bpy.ops.curve.primitive_bezier_curve_add() point = bpy.context.object.data.splines[0].bezier_points[0] bpy.context.object.data.splines[0].bezier_points.add() # this will crash! point.co = 1.0, 2.0, 3.0
This can be avoided by re-assigning the point variables after adding the new one or by storing indicess to the points rather then the points themselves. The best way is to sidestep the problem altogether add all the points to the curve at once. This means you dont have to worry about array re-allocation and its faster too since reallocating the entire array for every point added is inefcient. Removing Data Any data that you remove shouldnt be modied or accessed afterwards, this includes f-curves, drivers, render layers, timeline markers, modiers, constraints along with objects, scenes, groups, bones.. etc. This is a problem in the API at the moment that we should eventually solve.
1.5.11 sys.exit
Some python modules will call sys.exit() themselves when an error occurs, while not common behavior this is something to watch out for because it may seem as if blender is crashing since sys.exit() will quit blender immediately. For example, the optparse module will print an error and exit if the arguments are invalid.
34
An ugly way of troubleshooting this is to set sys.exit = None and see what line of python code is quitting, you could of course replace sys.exit/ with your own function but manipulating python in this way is bad practice.
1.5. Gotchas
35
36
CHAPTER
TWO
APPLICATION MODULES
2.1 Context Access (bpy.context)
The context members available depend on the area of blender which is currently being accessed. Note that all context values are readonly, but may be modied through the data api or by running operators
Type sequence of bpy.types.EditBone bpy.context.selected_bones Type sequence of bpy.types.Bone bpy.context.selected_editable_bones Type sequence of bpy.types.Bone bpy.context.visible_pose_bones Type sequence of bpy.types.PoseBone bpy.context.selected_pose_bones Type sequence of bpy.types.PoseBone bpy.context.active_bone Type bpy.types.Bone bpy.context.active_pose_bone Type bpy.types.PoseBone bpy.context.active_base Type bpy.types.ObjectBase bpy.context.active_object Type bpy.types.Object bpy.context.object Type bpy.types.Object bpy.context.edit_object Type bpy.types.Object bpy.context.sculpt_object Type bpy.types.Object bpy.context.vertex_paint_object Type bpy.types.Object bpy.context.weight_paint_object Type bpy.types.Object bpy.context.image_paint_object Type bpy.types.Object bpy.context.particle_edit_object Type bpy.types.Object bpy.context.sequences Type sequence of bpy.types.Sequence bpy.context.selected_sequences Type sequence of bpy.types.Sequence bpy.context.selected_editable_sequences
38
Type bpy.types.Lattice bpy.context.curve Type bpy.types.Curve bpy.context.meta_ball Type bpy.types.MetaBall bpy.context.lamp Type bpy.types.Lamp bpy.context.speaker Type bpy.types.Speaker bpy.context.camera Type bpy.types.Camera bpy.context.material Type bpy.types.Material bpy.context.material_slot Type bpy.types.MaterialSlot bpy.context.texture Type bpy.types.Texture bpy.context.texture_slot Type bpy.types.MaterialTextureSlot bpy.context.texture_user Type bpy.types.ID bpy.context.bone Type bpy.types.Bone bpy.context.edit_bone Type bpy.types.EditBone bpy.context.pose_bone Type bpy.types.PoseBone bpy.context.particle_system Type bpy.types.ParticleSystem bpy.context.particle_system_editable Type bpy.types.ParticleSystem bpy.context.cloth Type bpy.types.ClothModifier bpy.context.soft_body Type bpy.types.SoftBodyModifier bpy.context.fluid
40
Type bpy.types.FluidSimulationModifier bpy.context.smoke Type bpy.types.SmokeModifier bpy.context.collision Type bpy.types.CollisionModifier bpy.context.brush Type bpy.types.Brush bpy.context.dynamic_paint Type bpy.types.DynamicPaintModifier
41
# remove mesh Cube if "Cube" in bpy.data.meshes: mesh = bpy.data.meshes["Cube"] print("removing mesh", mesh) bpy.data.meshes.remove(mesh)
# write images into a file next to the blend import os file = open(os.path.splitext(bpy.data.filepath)[0] + ".txt", w) for image in bpy.data.images: file.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1])) file.close()
42
Action Operators bpy.ops.action.clean(threshold=0.001) Simplify F-Curves by removing closely spaced keyframes Parameters threshold (oat in [0, inf], (optional)) Threshold bpy.ops.action.clickselect(extend=False, column=False) Select keyframes by clicking on them Parameters extend (boolean, (optional)) Extend Select column (boolean, (optional)) Column Select bpy.ops.action.copy() Copy selected keyframes to the copy/paste buffer bpy.ops.action.delete() Remove all selected keyframes bpy.ops.action.duplicate() Make a copy of all selected keyframes bpy.ops.action.duplicate_move(ACTION_OT_duplicate=None, FORM_OT_transform=None) Undocumented (contribute) Parameters ACTION_OT_duplicate (ACTION_OT_duplicate, (optional)) Duplicate Keyframes, Make a copy of all selected keyframes TRANSFORM_OT_transform (TRANSFORM_OT_transform, (optional)) Transform, Transform selected items by mode type bpy.ops.action.extrapolation_type(type=CONSTANT) Set extrapolation mode for selected F-Curves Parameters type (enum in [CONSTANT, LINEAR, MAKE_CYCLIC, CLEAR_CYCLIC], (optional)) Type CONSTANT Constant Extrapolation. LINEAR Linear Extrapolation. MAKE_CYCLIC Make Cyclic (F-Modier), Add Cycles F-Modier if one doesnt exist already. CLEAR_CYCLIC Clear Cyclic (F-Modier), Remove Cycles F-Modier if not needed anymore. bpy.ops.action.frame_jump() Set the current frame to the average frame of the selected keyframes bpy.ops.action.handle_type(type=FREE) Set type of handle for selected keyframes TRANS-
43
Parameters type (enum in [FREE, VECTOR, ALIGNED, AUTO, AUTO_CLAMPED], (optional)) Type FREE Free. VECTOR Vector. ALIGNED Aligned. AUTO Automatic. AUTO_CLAMPED Auto Clamped, Auto handles clamped to not overshoot. bpy.ops.action.interpolation_type(type=CONSTANT) Set interpolation mode for the F-Curve segments starting from the selected keyframes Parameters type (enum in [CONSTANT, LINEAR, BEZIER], (optional)) Type bpy.ops.action.keyframe_insert(type=ALL) Insert keyframes for the specied channels Parameters type (enum in [ALL, SEL, GROUP], (optional)) Type bpy.ops.action.keyframe_type(type=KEYFRAME) Set type of keyframe for the selected keyframes Parameters type (enum in [KEYFRAME, BREAKDOWN, EXTREME, JITTER], (optional)) Type bpy.ops.action.markers_make_local() Move selected scene markers to the active Action as local pose markers bpy.ops.action.mirror(type=CFRA) Flip selected keyframes over the selected mirror line Parameters type (enum in [CFRA, XAXIS, MARKER], (optional)) Type bpy.ops.action.new() Create new action bpy.ops.action.paste(offset=START, merge=MIX) Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame Parameters offset (enum in [START, END, RELATIVE, NONE], (optional)) Offset, Paste time offset of keys START Frame Start, Paste keys starting at current frame. END Frame End, Paste keys ending at current frame. RELATIVE Frame Relative, Paste keys relative to the current frame when copying. NONE No Offset, Paste keys from original time. merge (enum in [MIX, OVER_ALL, OVER_RANGE, OVER_RANGE_ALL], (optional)) Type, Method of merging pasted keys and existing MIX Mix, Overlay existing with new keys. OVER_ALL Overwrite All, Replace all keys. OVER_RANGE Overwrite Range, Overwrite keys in pasted range. OVER_RANGE_ALL Overwrite Entire Range, Overwrite keys in pasted range, using the range of all copied keys.
44
bpy.ops.action.previewrange_set() Set Preview Range based on extents of selected Keyframes bpy.ops.action.sample() Add keyframes on every frame between the selected keyframes bpy.ops.action.select_all_toggle(invert=False) Toggle selection of all keyframes Parameters invert (boolean, (optional)) Invert bpy.ops.action.select_border(gesture_mode=0, xmin=0, xmax=0, tend=True, axis_range=False) Select all keyframes within the specied region Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst axis_range (boolean, (optional)) Axis Range bpy.ops.action.select_column(mode=KEYS) Select all keyframes on the specied frame(s) Parameters mode (enum in [KEYS, CFRA, MARKERS_COLUMN, MARKERS_BETWEEN], (optional)) Mode bpy.ops.action.select_leftright(mode=CHECK, extend=False) Select keyframes to the left or the right of the current frame Parameters mode (enum in [CHECK, LEFT, RIGHT], (optional)) Mode extend (boolean, (optional)) Extend Select bpy.ops.action.select_less() Deselect keyframes on ends of selection islands bpy.ops.action.select_linked() Select keyframes occurring in the same F-Curves as selected ones bpy.ops.action.select_more() Select keyframes beside already selected ones bpy.ops.action.snap(type=CFRA) Snap selected keyframes to the times specied Parameters type (enum in [CFRA, NEAREST_FRAME, NEAREST_SECOND, NEAREST_MARKER], (optional)) Type bpy.ops.action.view_all() Reset viewable area to show full keyframe range bpy.ops.action.view_selected() Reset viewable area to show selected keyframes range 2.3. Operators (bpy.ops) 45 ymin=0, ymax=0, ex-
Anim Operators bpy.ops.anim.change_frame(frame=0) Interactively change the current frame number Parameters frame (int in [-300000, 300000], (optional)) Frame bpy.ops.anim.channels_click(extend=False, children_only=False) Handle mouse-clicks over animation channels Parameters extend (boolean, (optional)) Extend Select children_only (boolean, (optional)) Select Children Only bpy.ops.anim.channels_collapse(all=True) Collapse (i.e. close) all selected expandable animation channels Parameters all (boolean, (optional)) All, Collapse all channels (not just selected ones) bpy.ops.anim.channels_delete() Delete all selected animation channels bpy.ops.anim.channels_editable_toggle(mode=TOGGLE, type=PROTECT) Toggle editability of selected channels Parameters mode (enum in [TOGGLE, DISABLE, ENABLE, INVERT], (optional)) Mode type (enum in [PROTECT, MUTE], (optional)) Type bpy.ops.anim.channels_expand(all=True) Expand (i.e. open) all selected expandable animation channels Parameters all (boolean, (optional)) All, Expand all channels (not just selected ones) bpy.ops.anim.channels_fcurves_enable() Clears disabled tag from all F-Curves to get broken F-Curves working again bpy.ops.anim.channels_move(direction=DOWN) Rearrange selected animation channels Parameters direction (enum in [TOP, UP, DOWN, BOTTOM], (optional)) Direction bpy.ops.anim.channels_rename() Rename animation channel under mouse bpy.ops.anim.channels_select_all_toggle(invert=False) Toggle selection of all animation channels Parameters invert (boolean, (optional)) Invert bpy.ops.anim.channels_select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True) Select all animation channels within the specied region Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min
46
ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.anim.channels_setting_disable(mode=DISABLE, type=PROTECT) Disable specied setting on all selected animation channels Parameters mode (enum in [TOGGLE, DISABLE, ENABLE, INVERT], (optional)) Mode type (enum in [PROTECT, MUTE], (optional)) Type bpy.ops.anim.channels_setting_enable(mode=ENABLE, type=PROTECT) Enable specied setting on all selected animation channels Parameters mode (enum in [TOGGLE, DISABLE, ENABLE, INVERT], (optional)) Mode type (enum in [PROTECT, MUTE], (optional)) Type bpy.ops.anim.channels_setting_toggle(mode=TOGGLE, type=PROTECT) Toggle specied setting on all selected animation channels Parameters mode (enum in [TOGGLE, DISABLE, ENABLE, INVERT], (optional)) Mode type (enum in [PROTECT, MUTE], (optional)) Type bpy.ops.anim.channels_visibility_set() Make only the selected animation channels visible in the Graph Editor bpy.ops.anim.channels_visibility_toggle() Toggle visibility in Graph Editor of all selected animation channels bpy.ops.anim.clear_useless_actions(only_unused=True) Mark actions with no F-Curves for deletion after save+reload of le preserving action libraries Parameters only_unused (boolean, (optional)) Only Unused, Only unused (Fake User only) actions get considered File startup/bl_operators/anim.py:244 bpy.ops.anim.copy_driver_button() Copy the driver for the highlighted button bpy.ops.anim.driver_button_add(all=True) Add driver(s) for the property(s) connected represented by the highlighted button Parameters all (boolean, (optional)) All, Create drivers for all elements of the array bpy.ops.anim.driver_button_remove(all=True) Remove the driver(s) for the property(s) connected represented by the highlighted button Parameters all (boolean, (optional)) All, Delete drivers for all elements of the array bpy.ops.anim.keyframe_delete(type=DEFAULT, conrm_success=True) Delete keyframes on the current frame for all properties in the specied Keying Set Parameters type (enum in [DEFAULT], (optional)) Keying Set, The Keying Set to use
47
conrm_success (boolean, (optional)) Conrm Successful Insert, Show a popup when the keyframes get successfully added bpy.ops.anim.keyframe_delete_button(all=True) Undocumented (contribute) Parameters all (boolean, (optional)) All, Delete keyfames from all elements of the array bpy.ops.anim.keyframe_delete_v3d() Remove keyframes on current frame for selected object bpy.ops.anim.keyframe_insert(type=DEFAULT, conrm_success=True) Insert keyframes on the current frame for all properties in the specied Keying Set Parameters type (enum in [DEFAULT], (optional)) Keying Set, The Keying Set to use conrm_success (boolean, (optional)) Conrm Successful Insert, Show a popup when the keyframes get successfully added bpy.ops.anim.keyframe_insert_button(all=True) Undocumented (contribute) Parameters all (boolean, (optional)) All, Insert a keyframe for all element of the array bpy.ops.anim.keyframe_insert_menu(type=DEFAULT, conrm_success=False, ways_prompt=False) Insert Keyframes for specied Keying Set, with menu of available Keying Sets if undened Parameters type (enum in [DEFAULT], (optional)) Keying Set, The Keying Set to use conrm_success (boolean, (optional)) Conrm Successful Insert, Show a popup when the keyframes get successfully added always_prompt (boolean, (optional)) Always Show Menu bpy.ops.anim.keying_set_active_set(type=0) Undocumented (contribute) Parameters type (int in [-inf, inf], (optional)) Keying Set Number, Index (determined internally) of the Keying Set to use bpy.ops.anim.keying_set_add() Add a new (empty) Keying Set to the active Scene bpy.ops.anim.keying_set_export(lepath=, lter_folder=True, ter_python=True) Export Keying Set to a python script Parameters lter_folder (boolean, (optional)) Filter folders lter_text (boolean, (optional)) Filter text lter_python (boolean, (optional)) Filter python File startup/bl_operators/anim.py:59 bpy.ops.anim.keying_set_path_add() Add empty path to active Keying Set bpy.ops.anim.keying_set_path_remove() Remove active Path from active Keying Set 48 Chapter 2. Application Modules lter_text=True, lal-
bpy.ops.anim.keying_set_remove() Remove the active Keying Set bpy.ops.anim.keyingset_button_add(all=True) Undocumented (contribute) Parameters all (boolean, (optional)) All, Add all elements of the array to a Keying Set bpy.ops.anim.keyingset_button_remove() Undocumented (contribute) bpy.ops.anim.paste_driver_button() Paste the driver in the copy/paste buffer for the highlighted button bpy.ops.anim.previewrange_clear() Clear Preview Range bpy.ops.anim.previewrange_set(xmin=0, xmax=0, ymin=0, ymax=0) Interactively dene frame range used for playback Parameters xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max bpy.ops.anim.time_toggle() Toggle whether timing is displayed in frames or seconds for active timeline view bpy.ops.anim.update_data_paths() Update data paths from 2.56 and previous versions, modifying data paths of drivers and fcurves File startup/bl_operators/anim.py:271 Armature Operators bpy.ops.armature.align() Align selected bones to the active bone (or to their parent) bpy.ops.armature.armature_layers(layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Change the visible armature layers Parameters layers (boolean array of 32 items, (optional)) Layer, Armature layers to make visible bpy.ops.armature.autoside_names(type=XAXIS) Automatically renames the selected bones according to which side of the target axis they fall on Parameters type (enum in [XAXIS, YAXIS, ZAXIS], (optional)) Axis, Axis tag names with XAXIS X-Axis, Left/Right. YAXIS Y-Axis, Front/Back. ZAXIS Z-Axis, Top/Bottom.
49
bpy.ops.armature.bone_layers(layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Change the layers that the selected bones belong to Parameters layers (boolean array of 32 items, (optional)) Layer, Armature layers that bone belongs to bpy.ops.armature.bone_primitive_add(name=Bone) Add a new bone located at the 3D-Cursor Parameters name (string, (optional)) Name, Name of the newly created bone bpy.ops.armature.calculate_roll(type=X, axis_ip=False, axis_only=False) Automatically x alignment of select bones axes Parameters type (enum in [X, Y, Z, ACTIVE, VIEW, CURSOR], (optional)) Type axis_ip (boolean, (optional)) Flip Axis, Negate the alignment axis axis_only (boolean, (optional)) Shortest Rotation, Ignore the axis direction, use the shortest rotation to align bpy.ops.armature.click_extrude() Create a new bone going from the last selected joint to the mouse position bpy.ops.armature.delete() Remove selected bones from the armature bpy.ops.armature.duplicate() Make copies of the selected bones within the same armature bpy.ops.armature.duplicate_move(ARMATURE_OT_duplicate=None, FORM_OT_translate=None) Undocumented (contribute) Parameters ARMATURE_OT_duplicate (ARMATURE_OT_duplicate, (optional)) Duplicate Selected Bone(s), Make copies of the selected bones within the same armature TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.armature.extrude(forked=False) Create new bones from the selected joints Parameters forked (boolean, (optional)) Forked bpy.ops.armature.extrude_forked(ARMATURE_OT_extrude=None, FORM_OT_translate=None) Undocumented (contribute) Parameters ARMATURE_OT_extrude (ARMATURE_OT_extrude, (optional)) Extrude, Create new bones from the selected joints TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items TRANSTRANS-
50
TRANS-
ARMATURE_OT_extrude (ARMATURE_OT_extrude, (optional)) Extrude, Create new bones from the selected joints TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.armature.fill() Add bone between selected joint(s) and/or 3D-Cursor bpy.ops.armature.flip_names() Flips (and corrects) the axis sufxes of the names of selected bones bpy.ops.armature.hide(unselected=False) Tag selected bones to not be visible in Edit Mode Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected bpy.ops.armature.layers_show_all(all=True) Make all armature layers visible Parameters all (boolean, (optional)) All Layers, Enable all layers or just the rst 16 (top row) bpy.ops.armature.merge(type=WITHIN_CHAIN) Merge continuous chains of selected bones Parameters type (enum in [WITHIN_CHAIN], (optional)) Type bpy.ops.armature.parent_clear(type=CLEAR) Remove the parent-child relationship between selected bones and their parents Parameters type (enum in [CLEAR, DISCONNECT], (optional)) ClearType, What way to clear parenting bpy.ops.armature.parent_set(type=CONNECTED) Set the active bone as the parent of the selected bones Parameters type (enum in [CONNECTED, OFFSET], (optional)) ParentType, Type of parenting bpy.ops.armature.reveal() Unhide all bones that have been tagged to be hidden in Edit Mode bpy.ops.armature.select_all(action=TOGGLE) Toggle selection status of all bones Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.armature.select_hierarchy(direction=PARENT, extend=False) Select immediate parent/children of selected bones Parameters
51
direction (enum in [PARENT, CHILD], (optional)) Direction extend (boolean, (optional)) Add to Selection bpy.ops.armature.select_inverse() Flip the selection status of bones (selected -> unselected, unselected -> selected) bpy.ops.armature.select_linked(extend=False) Select bones related to selected ones by parent/child relationships Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.armature.separate() Isolate selected bones into a separate armature bpy.ops.armature.subdivide(number_cuts=1) Break selected bones into chains of smaller bones Parameters number_cuts (int in [1, inf], (optional)) Number of Cuts bpy.ops.armature.switch_direction() Change the direction that a chain of bones points in (head <-> tail swap) Boid Operators bpy.ops.boid.rule_add(type=GOAL) Add a boid rule to the current boid state Parameters type (enum in [GOAL, AVOID, AVOID_COLLISION, SEPARATE, FLOCK, FOLLOW_LEADER, AVERAGE_SPEED, FIGHT], (optional)) Type GOAL Goal, Go to assigned object or loudest assigned signal source. AVOID Avoid, Get away from assigned object or loudest assigned signal source. AVOID_COLLISION Avoid Collision, Manoeuvre to avoid collisions with other boids and deector objects in near future. SEPARATE Separate, Keep from going through other boids. FLOCK Flock, Move to center of neighbors and match their velocity. FOLLOW_LEADER Follow Leader, Follow a boid or assigned object. AVERAGE_SPEED Average Speed, Maintain speed, ight level or wander. FIGHT Fight, Go to closest enemy and attack when in range. bpy.ops.boid.rule_del() Undocumented (contribute) bpy.ops.boid.rule_move_down() Move boid rule down in the list bpy.ops.boid.rule_move_up() Move boid rule up in the list bpy.ops.boid.state_add() Add a boid state to the particle system bpy.ops.boid.state_del() Undocumented (contribute)
52
bpy.ops.boid.state_move_down() Move boid state down in the list bpy.ops.boid.state_move_up() Move boid state up in the list Brush Operators bpy.ops.brush.active_index_set(mode=, index=0) Set active sculpt/paint brush from its number Parameters mode (string, (optional)) mode, Paint mode to set brush for index (int in [-inf, inf], (optional)) number, Brush number File startup/bl_operators/wm.py:161 bpy.ops.brush.add() Add brush by mode type bpy.ops.brush.curve_preset(shape=SMOOTH) Set brush shape Parameters shape (enum in [SHARP, SMOOTH, MAX, LINE, ROUND, ROOT], (optional)) Mode bpy.ops.brush.image_tool_set(tool=DRAW) Set the image tool Parameters tool (enum in [DRAW, SOFTEN, SMEAR, CLONE], (optional)) Tool bpy.ops.brush.reset() Return brush to defaults based on current tool bpy.ops.brush.scale_size(scalar=1.0) Change brush size by a scalar Parameters scalar (oat in [0, 2], (optional)) Scalar, Factor to scale brush size by bpy.ops.brush.sculpt_tool_set(tool=BLOB) Set the sculpt tool Parameters tool (enum in [BLOB, CLAY, CREASE, DRAW, FILL, FLATTEN, GRAB, INFLATE, LAYER, NUDGE, PINCH, ROTATE, SCRAPE, SMOOTH, SNAKE_HOOK, THUMB], (optional)) Tool bpy.ops.brush.vertex_tool_set(tool=MIX) Set the vertex paint tool Parameters tool (enum in [MIX, ADD, SUB, MUL, BLUR, LIGHTEN, DARKEN], (optional)) Tool MIX Mix, Use mix blending mode while painting. ADD Add, Use add blending mode while painting. SUB Subtract, Use subtract blending mode while painting. MUL Multiply, Use multiply blending mode while painting. BLUR Blur, Blur the color with surrounding values. LIGHTEN Lighten, Use lighten blending mode while painting. 2.3. Operators (bpy.ops) 53
DARKEN Darken, Use darken blending mode while painting. bpy.ops.brush.weight_tool_set(tool=MIX) Set the weight paint tool Parameters tool (enum in [MIX, ADD, SUB, MUL, BLUR, LIGHTEN, DARKEN], (optional)) Tool MIX Mix, Use mix blending mode while painting. ADD Add, Use add blending mode while painting. SUB Subtract, Use subtract blending mode while painting. MUL Multiply, Use multiply blending mode while painting. BLUR Blur, Blur the color with surrounding values. LIGHTEN Lighten, Use lighten blending mode while painting. DARKEN Darken, Use darken blending mode while painting. Buttons Operators bpy.ops.buttons.directory_browse(directory=, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=False, lemode=9, relative_path=True) Open a directory browser, Hold Shift to open the le, Alt to browse containing directory Parameters directory (string, (optional)) Directory, Directory of the le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.buttons.file_browse(lepath=, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=False, lemode=9, relative_path=True) Open a le browser, Hold Shift to open the le, Alt to browse containing directory 54 Chapter 2. Application Modules
Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.buttons.toolbox() Display button panel toolbox Camera Operators bpy.ops.camera.preset_add(name=, remove_active=False) Add a Camera Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 Clip Operators bpy.ops.clip.add_marker(location=(0.0, 0.0)) Place new marker at specied location Parameters location (oat array of 2 items in [-1.17549e-38, inf], (optional)) Location, Location of marker on frame bpy.ops.clip.add_marker_move(CLIP_OT_add_marker=None, FORM_OT_translate=None) Undocumented (contribute) Parameters CLIP_OT_add_marker (CLIP_OT_add_marker, (optional)) Add Marker, Place new marker at specied location TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.clip.add_marker_slide(CLIP_OT_add_marker=None, FORM_OT_translate=None) Undocumented (contribute) TRANSTRANS-
55
Parameters CLIP_OT_add_marker (CLIP_OT_add_marker, (optional)) Add Marker, Place new marker at specied location TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.clip.bundles_to_mesh() Create vertex cloud using coordinates of reconstructed tracks File startup/bl_operators/clip.py:128 bpy.ops.clip.camera_preset_add(name=, remove_active=False) Add a Tracking Camera Intrinsics Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 bpy.ops.clip.change_frame(frame=0) Interactively change the current frame number Parameters frame (int in [-300000, 300000], (optional)) Frame bpy.ops.clip.clean_tracks(frames=0, error=0.0, action=SELECT) Clean tracks with high error values or few frames Parameters frames (int in [0, inf], (optional)) Tracked Frames, Effect on tracks which are tracked less than specied amount of frames error (oat in [0, inf], (optional)) Reprojection Error, Effect on tracks with have got larger reprojection error action (enum in [SELECT, DELETE_TRACK, DELETE_SEGMENTS], (optional)) Action, Cleanup action to execute SELECT Select, Select unclean tracks. DELETE_TRACK Delete Track, Delete unclean tracks. DELETE_SEGMENTS Delete Segments, Delete unclean segments of tracks. bpy.ops.clip.clear_solution() Clear all calculated data bpy.ops.clip.clear_track_path(action=REMAINED) Clear tracks after/before current position or clear the whole track Parameters action (enum in [UPTO, REMAINED, ALL], (optional)) Action, Clear action to execute UPTO Clear up-to, Clear path up to current frame. REMAINED Clear remained, Clear path at remaining frames (after current). ALL Clear all, Clear the whole path. bpy.ops.clip.constraint_to_fcurve() Create F-Curves for object which will copy objects movement caused by this constraint File startup/bl_operators/clip.py:341 bpy.ops.clip.delete_marker() Delete marker for current frame from selected tracks
56
bpy.ops.clip.delete_proxy() Delete movie clip proxy les from the hard drive File startup/bl_operators/clip.py:184 bpy.ops.clip.delete_track() Delete selected tracks bpy.ops.clip.detect_features(placement=FRAME, min_distance=120) Automatically detect features and place markers to track Parameters placement (enum in [FRAME, INSIDE_GPENCIL, OUTSIDE_GPENCIL], (optional)) Placement, Placement for detected features FRAME Whole Frame, Place markers across the whole frame. INSIDE_GPENCIL Inside grease pencil, Place markers only inside areas outlined with grease pencil. OUTSIDE_GPENCIL Outside grease pencil, Place markers only outside areas outlined with grease pencil. margin (int in [0, inf], (optional)) Margin, Only corners further than margin pixels from the image edges are considered min_trackability (int in [0, inf], (optional)) Trackability, Minimum trackability score to add a corner min_distance (int in [0, inf], (optional)) Distance, Minimal distance accepted between two corners bpy.ops.clip.disable_markers(action=DISABLE) Disable/enable selected markers Parameters action (enum in [DISABLE, ENABLE, TOGGLE], (optional)) Action, Disable action to execute DISABLE Disable, Disable selected markers. ENABLE Enable, Enable selected markers. TOGGLE Toggle, Toggle disabled ag for selected markers. bpy.ops.clip.frame_jump(position=PATHSTART) Jump to special frame Parameters position (enum in [PATHSTART, PATHEND, FAILEDPREV, FAILNEXT], (optional)) Position, Position to jumo to PATHSTART Path Start, Jump to start of current path. PATHEND Path End, Jump to end of current path. FAILEDPREV Previous Failed, Jump to previous failed frame. FAILNEXT Next Failed, Jump to next failed frame. bpy.ops.clip.graph_delete_curve() Delete selected curves bpy.ops.clip.graph_delete_knot() Delete curve knots margin=16, min_trackability=16,
57
bpy.ops.clip.graph_select(location=(0.0, 0.0), extend=False) Select graph curves Parameters location (oat array of 2 items in [-inf, inf], (optional)) Location, Mouse location to select nearest entity extend (boolean, (optional)) Extend, Extend selection rather than clearing the existing selection bpy.ops.clip.hide_tracks(unselected=False) Hide selected tracks Parameters unselected (boolean, (optional)) Unselected, Hide unselected tracks bpy.ops.clip.hide_tracks_clear() Clear hide selected tracks bpy.ops.clip.join_tracks() Join selected tracks bpy.ops.clip.lock_tracks(action=LOCK) Lock/unlock selected tracks Parameters action (enum in [LOCK, UNLOCK, TOGGLE], (optional)) Action, Lock action to execute LOCK Lock, Lock selected tracks. UNLOCK Unlock, Unlock selected tracks. TOGGLE Toggle, Toggle locked ag for selected tracks. bpy.ops.clip.mode_set(mode=TRACKING, toggle=False) Set the clip interaction mode Parameters mode (enum in [TRACKING, RECONSTRUCTION, DISTORTION], (optional)) Mode TRACKING Tracking, Show tracking and solving tools. RECONSTRUCTION Reconstruction, Show tracking/reconstruction tools. DISTORTION Distortion, Show distortion tools. toggle (boolean, (optional)) Toggle bpy.ops.clip.open(lepath=, lter_blender=False, lter_image=True, lter_movie=True, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True) Load a sequence of frames or a movie le Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les
58
lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.clip.properties() Toggle clip properties panel bpy.ops.clip.rebuild_proxy() Rebuild all selected proxies and timecode indices in the background bpy.ops.clip.reload() Reload clip bpy.ops.clip.select(extend=False, location=(0.0, 0.0)) Select tracking markers Parameters extend (boolean, (optional)) Extend, Extend selection rather than clearing the existing selection location (oat array of 2 items in [-inf, inf], (optional)) Location, Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds bpy.ops.clip.select_all(action=TOGGLE) Change selection of all tracking markers Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.clip.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True) Select markers using border selection Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst
59
bpy.ops.clip.select_circle(x=0, y=0, radius=0, gesture_mode=0) Select markers using circle selection Parameters x (int in [-inf, inf], (optional)) X y (int in [-inf, inf], (optional)) Y radius (int in [-inf, inf], (optional)) Radius gesture_mode (int in [-inf, inf], (optional)) Gesture Mode bpy.ops.clip.select_grouped(group=ESTIMATED) Joint Selected Tracks Parameters group (enum in [KEYFRAMED, ESTIMATED, TRACKED, LOCKED, DISABLED, COLOR, FAILED], (optional)) Action, Clear action to execute KEYFRAMED Keyframed tracks, Select all keyframed tracks. ESTIMATED Estimated tracks, Select all estimated tracks. TRACKED Tracked tracks, Select all tracked tracks. LOCKED Locked tracks, Select all locked tracks. DISABLED Disabled tracks, Select all disabled tracks. COLOR Tracks with same color, Select all tracks with same color as active track. FAILED Failed Tracks, Select all tracks which failed to be reconstructed. bpy.ops.clip.set_axis(axis=X) Set direction of scene axis rotating camera (or its parent if present) and assuming selected track lies on real axis joining it with the origin Parameters axis (enum in [X, Y], (optional)) Axis, Axis to use to align bundle along X X, Align bundle align X axis. Y Y, Align bundle align Y axis. bpy.ops.clip.set_center_principal() Set optical center to center of footage bpy.ops.clip.set_floor() Set oor based on 3 selected bundles by moving camera (or its parent if present) in 3D space bpy.ops.clip.set_origin() Set active marker as origin by moving camera (or its parent if present) in 3D space bpy.ops.clip.set_scale(distance=0.0) Set scale of scene by scaling camera (or its parent if present) Parameters distance (oat in [-inf, inf], (optional)) Distance, Distance between selected tracks bpy.ops.clip.set_viewport_background() Set current movie clip as a camera background in 3D viewport (works only when a 3D viewport is visible) File startup/bl_operators/clip.py:245 bpy.ops.clip.setup_tracking_scene() Prepare scene for compositing 3D objects into this footage File startup/bl_operators/clip.py:776
60
bpy.ops.clip.slide_marker(offset=(0.0, 0.0)) Slide marker areas Parameters offset (oat array of 2 items in [-inf, inf], (optional)) Offset, Offset in oating point units, 1.0 is the width and height of the image bpy.ops.clip.solve_camera() Solve camera motion from tracks bpy.ops.clip.stabilize_2d_add() Add selected tracks to 2D stabilization tool bpy.ops.clip.stabilize_2d_remove() Remove selected track from stabilization bpy.ops.clip.stabilize_2d_select() Select track which are used for stabilization bpy.ops.clip.stabilize_2d_set_rotation() Use active track to compensate rotation when doing 2D stabilization bpy.ops.clip.tools() Toggle clip tools panel bpy.ops.clip.track_color_preset_add(name=, remove_active=False) Add a Clip Track Color Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 bpy.ops.clip.track_copy_color() Copy color to all selected tracks bpy.ops.clip.track_markers(backwards=False, sequence=False) Track selected markers Parameters backwards (boolean, (optional)) Backwards, Do backwards tracking sequence (boolean, (optional)) Track Sequence, Track marker during image sequence rather than single image bpy.ops.clip.track_to_empty() Create an Empty object which will be copying movement of active track File startup/bl_operators/clip.py:105 bpy.ops.clip.tracking_settings_preset_add(name=, remove_active=False) Add a motion tracking settings preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 bpy.ops.clip.view_all() Undocumented (contribute) bpy.ops.clip.view_pan(offset=(0.0, 0.0)) Undocumented (contribute) Parameters offset (oat array of 2 items in [-inf, inf], (optional)) Offset, Offset in oating point units, 1.0 is the width and height of the image
61
bpy.ops.clip.view_selected() Undocumented (contribute) bpy.ops.clip.view_zoom(factor=0.0) Undocumented (contribute) Parameters factor (oat in [0, inf], (optional)) Factor, Zoom factor, values higher than 1.0 zoom in, lower values zoom out bpy.ops.clip.view_zoom_in() Undocumented (contribute) bpy.ops.clip.view_zoom_out() Undocumented (contribute) bpy.ops.clip.view_zoom_ratio(ratio=0.0) Undocumented (contribute) Parameters ratio (oat in [0, inf], (optional)) Ratio, Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out Cloth Operators bpy.ops.cloth.preset_add(name=, remove_active=False) Add a Cloth Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 Console Operators bpy.ops.console.autocomplete() Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one File startup/bl_operators/console.py:51 bpy.ops.console.banner() Print a message when the terminal initializes File startup/bl_operators/console.py:69 bpy.ops.console.clear(scrollback=True, history=False) Clear text by type Parameters scrollback (boolean, (optional)) Scrollback, Clear the scrollback history history (boolean, (optional)) History, Clear the command history bpy.ops.console.copy() Copy selected text to clipboard bpy.ops.console.delete(type=NEXT_CHARACTER) Delete text by cursor position Parameters type (enum in [NEXT_CHARACTER, PREVIOUS_CHARACTER], (optional)) Type, Which part of the text to delete bpy.ops.console.execute() Execute the current console line as a python expression
62
File startup/bl_operators/console.py:31 bpy.ops.console.history_append(text=, current_character=0, remove_duplicates=False) Append history at cursor position Parameters text (string, (optional)) Text, Text to insert at the cursor position current_character (int in [0, inf], (optional)) Cursor, The index of the cursor remove_duplicates (boolean, (optional)) Remove Duplicates, Remove duplicate items in the history bpy.ops.console.history_cycle(reverse=False) Cycle through history Parameters reverse (boolean, (optional)) Reverse, Reverse cycle history bpy.ops.console.insert(text=) Insert text at cursor position Parameters text (string, (optional)) Text, Text to insert at the cursor position bpy.ops.console.language(language=) Set the current language for this console Parameters language (string, (optional)) Language File startup/bl_operators/console.py:97 bpy.ops.console.move(type=LINE_BEGIN) Move cursor position Parameters type (enum in [LINE_BEGIN, LINE_END, PREVIOUS_CHARACTER, NEXT_CHARACTER, PREVIOUS_WORD, NEXT_WORD], (optional)) Type, Where to move cursor to bpy.ops.console.paste() Paste text from clipboard bpy.ops.console.scrollback_append(text=, type=OUTPUT) Append scrollback text by type Parameters text (string, (optional)) Text, Text to insert at the cursor position type (enum in [OUTPUT, INPUT, INFO, ERROR], (optional)) Type, Console output type bpy.ops.console.select_set() Set the console selection Constraint Operators bpy.ops.constraint.childof_clear_inverse(constraint=, owner=OBJECT) Clear inverse correction for ChildOf constraint Parameters constraint (string, (optional)) Constraint, Name of the constraint to edit owner (enum in [OBJECT, BONE], (optional)) Owner, The owner of this constraint
63
OBJECT Object, Edit a constraint on the active object. BONE Bone, Edit a constraint on the active bone. bpy.ops.constraint.childof_set_inverse(constraint=, owner=OBJECT) Set inverse correction for ChildOf constraint Parameters constraint (string, (optional)) Constraint, Name of the constraint to edit owner (enum in [OBJECT, BONE], (optional)) Owner, The owner of this constraint OBJECT Object, Edit a constraint on the active object. BONE Bone, Edit a constraint on the active bone. bpy.ops.constraint.delete() Remove constraint from constraint stack bpy.ops.constraint.limitdistance_reset(constraint=, owner=OBJECT) Reset limiting distance for Limit Distance Constraint Parameters constraint (string, (optional)) Constraint, Name of the constraint to edit owner (enum in [OBJECT, BONE], (optional)) Owner, The owner of this constraint OBJECT Object, Edit a constraint on the active object. BONE Bone, Edit a constraint on the active bone. bpy.ops.constraint.move_down(constraint=, owner=OBJECT) Move constraint down in constraint stack Parameters constraint (string, (optional)) Constraint, Name of the constraint to edit owner (enum in [OBJECT, BONE], (optional)) Owner, The owner of this constraint OBJECT Object, Edit a constraint on the active object. BONE Bone, Edit a constraint on the active bone. bpy.ops.constraint.move_up(constraint=, owner=OBJECT) Move constraint up in constraint stack Parameters constraint (string, (optional)) Constraint, Name of the constraint to edit owner (enum in [OBJECT, BONE], (optional)) Owner, The owner of this constraint OBJECT Object, Edit a constraint on the active object. BONE Bone, Edit a constraint on the active bone. bpy.ops.constraint.stretchto_reset(constraint=, owner=OBJECT) Reset original length of bone for Stretch To Constraint Parameters constraint (string, (optional)) Constraint, Name of the constraint to edit owner (enum in [OBJECT, BONE], (optional)) Owner, The owner of this constraint OBJECT Object, Edit a constraint on the active object.
64
BONE Bone, Edit a constraint on the active bone. Curve Operators bpy.ops.curve.cyclic_toggle(direction=CYCLIC_U) Make active spline closed/opened loop Parameters direction (enum in [CYCLIC_U, CYCLIC_V], (optional)) Direction, Direction to make surface cyclic in bpy.ops.curve.de_select_first() Undocumented (contribute) bpy.ops.curve.de_select_last() Undocumented (contribute) bpy.ops.curve.delete(type=SELECTED) Delete selected control points or segments Parameters type (enum in [SELECTED, SEGMENT, ALL], (optional)) Type, Which elements to delete bpy.ops.curve.duplicate(mode=TRANSLATION) Duplicate selected control points and segments between them Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.curve.extrude(mode=TRANSLATION) Extrude selected control point(s) and move Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.curve.handle_type_set(type=AUTOMATIC) Set type of handles for selected control points Parameters type (enum in [AUTOMATIC, VECTOR, ALIGNED, FREE_ALIGN, TOGGLE_FREE_ALIGN], (optional)) Type, Spline type bpy.ops.curve.hide(unselected=False) Undocumented (contribute) Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected bpy.ops.curve.make_segment() Undocumented (contribute) bpy.ops.curve.primitive_bezier_circle_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) 2.3. Operators (bpy.ops) 65
Construct a Bezier Circle Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.curve.primitive_bezier_curve_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Bezier Curve Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.curve.primitive_nurbs_circle_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs Circle Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer
66
bpy.ops.curve.primitive_nurbs_curve_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs Curve Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.curve.primitive_nurbs_path_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Path Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.curve.radius_set(radius=1.0) Set per-point radius which is used for bevel tapering Parameters radius (oat in [0, inf], (optional)) Radius bpy.ops.curve.reveal() Undocumented (contribute) bpy.ops.curve.select_all(action=TOGGLE) Undocumented (contribute) Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements.
67
bpy.ops.curve.select_inverse() Undocumented (contribute) bpy.ops.curve.select_less() Undocumented (contribute) bpy.ops.curve.select_linked() Undocumented (contribute) bpy.ops.curve.select_linked_pick(deselect=False) Undocumented (contribute) Parameters deselect (boolean, (optional)) Deselect, Deselect linked control points rather than selecting them bpy.ops.curve.select_more() Undocumented (contribute) bpy.ops.curve.select_next() Undocumented (contribute) bpy.ops.curve.select_nth(nth=2) Undocumented (contribute) Parameters nth (int in [2, 100], (optional)) Nth Selection bpy.ops.curve.select_previous() Undocumented (contribute) bpy.ops.curve.select_random(percent=50.0, extend=False) Undocumented (contribute) Parameters percent (oat in [0, 100], (optional)) Percent, Percentage of elements to select randomly extend (boolean, (optional)) Extend Selection, Extend selection instead of deselecting everything rst bpy.ops.curve.select_row() Undocumented (contribute) bpy.ops.curve.separate() Undocumented (contribute) bpy.ops.curve.shade_flat() Undocumented (contribute) bpy.ops.curve.shade_smooth() Undocumented (contribute) bpy.ops.curve.smooth() Flatten angles of selected points bpy.ops.curve.smooth_radius() Flatten radiuses of selected points bpy.ops.curve.spin(center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0)) Undocumented (contribute) Parameters center (oat array of 3 items in [-inf, inf], (optional)) Center, Center in global view space axis (oat array of 3 items in [-1, 1], (optional)) Axis, Axis in global view space
68
bpy.ops.curve.spline_type_set(type=POLY) Set type of active spline Parameters type (enum in [POLY, BEZIER, NURBS], (optional)) Type, Spline type bpy.ops.curve.spline_weight_set(weight=1.0) Set softbody goal weight for selected points Parameters weight (oat in [0, 1], (optional)) Weight bpy.ops.curve.subdivide(number_cuts=1) Subdivide selected segments Parameters number_cuts (int in [1, inf], (optional)) Number of cuts bpy.ops.curve.switch_direction() Switch direction of selected splines bpy.ops.curve.tilt_clear() Undocumented (contribute) bpy.ops.curve.vertex_add(location=(0.0, 0.0, 0.0)) Undocumented (contribute) Parameters location (oat array of 3 items in [-inf, inf], (optional)) Location, Location to add new vertex at Dpaint Operators bpy.ops.dpaint.bake() Bake dynamic paint image sequence surface bpy.ops.dpaint.output_toggle(output=A) Add or remove Dynamic Paint output data layer Parameters output (enum in [A, B], (optional)) Output Toggle bpy.ops.dpaint.surface_slot_add() Add a new Dynamic Paint surface slot bpy.ops.dpaint.surface_slot_remove() Remove the selected surface slot bpy.ops.dpaint.type_toggle(type=CANVAS) Toggle whether given type is active or not Parameters type (enum in [CANVAS, BRUSH], (optional)) Type Ed Operators bpy.ops.ed.redo() Redo previous action bpy.ops.ed.undo() Undo previous action bpy.ops.ed.undo_history(item=0) Redo specic action in history Parameters item (int in [0, inf], (optional)) Item
69
bpy.ops.ed.undo_push(message=Add an undo step *function may be moved*) Add an undo state (internal use only) Parameters message (string, (optional)) Undo Message Export Anim Operators bpy.ops.export_anim.bvh(lepath=, check_existing=True, lter_glob=*.bvh, global_scale=1.0, frame_start=0, frame_end=0, rotate_mode=NATIVE, root_transform_only=False) Save a BVH motion capture le from an armature Parameters lepath (string, (optional)) File Path, Filepath used for exporting the le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les global_scale (oat in [0.0001, 1e+06], (optional)) Scale, Scale the BVH by this value frame_start (int in [-inf, inf], (optional)) Start Frame, Starting frame to export frame_end (int in [-inf, inf], (optional)) End Frame, End frame to export rotate_mode (enum in [NATIVE, XYZ, XZY, YXZ, YZX, ZXY, ZYX], (optional)) Rotation, Rotation conversion NATIVE Euler (Native), Use the rotation order dened in the BVH le. XYZ Euler (XYZ), Convert rotations to euler XYZ. XZY Euler (XZY), Convert rotations to euler XZY. YXZ Euler (YXZ), Convert rotations to euler YXZ. YZX Euler (YZX), Convert rotations to euler YZX. ZXY Euler (ZXY), Convert rotations to euler ZXY. ZYX Euler (ZYX), Convert rotations to euler ZYX. root_transform_only (boolean, (optional)) Root Transform Only, Only write out transform channels for the root bone File addons/io_anim_bvh/__init__.py:205 Export Mesh Operators bpy.ops.export_mesh.ply(lepath=, check_existing=True, lter_glob=*.ply, use_modiers=True, use_normals=True, use_uv_coords=True, use_colors=True) Export a single object as a stanford PLY with normals, colours and texture coordinates Parameters lepath (string, (optional)) File Path, Filepath used for exporting the le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les use_modiers (boolean, (optional)) Apply Modiers, Apply Modiers to the exported mesh
70
use_normals (boolean, (optional)) Normals, Export Normals for smooth and hard shaded faces use_uv_coords (boolean, (optional)) UVs, Export the active UV layer use_colors (boolean, (optional)) Vertex Colors, Exort the active vertex color layer File addons/io_mesh_ply/__init__.py:114 bpy.ops.export_mesh.stl(lepath=, check_existing=True, ascii=False, apply_modiers=True) Save STL triangle mesh data from the active object Parameters lepath (string, (optional)) File Path, Filepath used for exporting the le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les ascii (boolean, (optional)) Ascii, Save the le in ASCII le format apply_modiers (boolean, (optional)) Apply Modiers, Apply the modiers before saving File addons/io_mesh_stl/__init__.py:125 Export Scene Operators bpy.ops.export_scene.autodesk_3ds(lepath=, check_existing=True, lter_glob=*.3ds, use_selection=False, axis_forward=Y, axis_up=Z) Export to 3DS le format (.3ds) Parameters lepath (string, (optional)) File Path, Filepath used for exporting the le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les use_selection (boolean, (optional)) Selection Only, Export selected objects only axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up File addons/io_scene_3ds/__init__.py:164 bpy.ops.export_scene.fbx(lepath=, check_existing=True, lter_glob=*.fbx, use_selection=False, global_scale=1.0, axis_forward=Z, axis_up=Y, object_types={ARMATURE, LAMP, CAMERA, MESH, EMPTY}, use_mesh_modiers=True, mesh_smooth_type=FACE, use_mesh_edges=False, use_anim=True, use_anim_action_all=True, use_default_take=True, use_anim_optimize=True, anim_optimize_precision=6.0, path_mode=AUTO, use_rotate_workaround=False, xna_validate=False, batch_mode=OFF, use_batch_own_dir=True, use_metadata=True) Selection to an ASCII Autodesk FBX Parameters lepath (string, (optional)) File Path, Filepath used for exporting the le
71
check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les use_selection (boolean, (optional)) Selected Objects, Export selected objects on visible layers global_scale (oat in [0.01, 1000], (optional)) Scale, Scale all data (Some importers do not support scaled armatures!) axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up object_types (enum set in {EMPTY, CAMERA, LAMP, ARMATURE, MESH}, (optional)) Object Types use_mesh_modiers (boolean, (optional)) Apply Modiers, Apply modiers to mesh objects mesh_smooth_type (enum in [OFF, FACE, EDGE], (optional)) Smoothing OFF Off, Dont write smoothing. FACE Face, Write face smoothing. EDGE Edge, Write edge smoothing. use_mesh_edges (boolean, (optional)) Include Edges, Edges may not be necessary, can cause import pipeline errors with XNA use_anim (boolean, (optional)) Include Animation, Export keyframe animation use_anim_action_all (boolean, (optional)) All Actions, Export all actions for armatures or just the currently selected action use_default_take (boolean, (optional)) Include Default Take, Export currently assigned object and armature animations into a default take from the scene start/end frames use_anim_optimize (boolean, (optional)) Optimize Keyframes, Remove double keyframes anim_optimize_precision (oat in [1, 16], (optional)) Precision, Tolerence for comparing double keyframes (higher for greater accuracy) path_mode (enum in [AUTO, ABSOLUTE, RELATIVE, MATCH, STRIP, COPY], (optional)) Path Mode, Method used to reference paths AUTO Auto, Use Relative paths with subdirectories only. ABSOLUTE Absolute, Always write absolute paths. RELATIVE Relative, Always write relative patsh (where possible). MATCH Match, Match Absolute/Relative setting with input path. STRIP Strip Path, Filename only. COPY Copy, copy the le to the destination path (or subdirectory). use_rotate_workaround (boolean, (optional)) XNA Rotate Animation Hack, Disable global rotation, for XNA compatibility xna_validate (boolean, (optional)) XNA Strict Options, Make sure options are compatible with Microsoft XNA batch_mode (enum in [OFF, SCENE, GROUP], (optional)) Batch Mode
72
OFF Off, Active scene to le. SCENE Scene, Each scene as a le. GROUP Group, Each group as a le. use_batch_own_dir (boolean, (optional)) Batch Own Dir, Create a dir for each exported le use_metadata (boolean, (optional)) Use Metadata File addons/io_scene_fbx/__init__.py:236 bpy.ops.export_scene.obj(lepath=, check_existing=True, lter_glob=*.obj;*.mtl, use_selection=False, use_animation=False, use_apply_modiers=True, use_edges=True, use_normals=False, use_uvs=True, use_materials=True, use_triangles=False, use_nurbs=False, use_vertex_groups=False, use_blen_objects=True, group_by_object=False, group_by_material=False, keep_vertex_order=False, global_scale=1.0, axis_forward=-Z, axis_up=Y, path_mode=AUTO) Save a Wavefront OBJ File Parameters lepath (string, (optional)) File Path, Filepath used for exporting the le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les use_selection (boolean, (optional)) Selection Only, Export selected objects only use_animation (boolean, (optional)) Animation, Write out an OBJ for each frame use_apply_modiers (boolean, (optional)) Apply Modiers, Apply modiers (preview resolution) use_edges (boolean, (optional)) Include Edges use_normals (boolean, (optional)) Include Normals use_uvs (boolean, (optional)) Include UVs, Write out the active UV coordinates use_materials (boolean, (optional)) Write Materials, Write out the MTL le use_triangles (boolean, (optional)) Triangulate Faces, Convert all faces to triangles use_nurbs (boolean, (optional)) Write Nurbs, Write nurbs curves as OBJ nurbs rather then converting to geometry use_vertex_groups (boolean, (optional)) Polygroups use_blen_objects (boolean, (optional)) Objects as OBJ Objects group_by_object (boolean, (optional)) Objects as OBJ Groups group_by_material (boolean, (optional)) Material Groups keep_vertex_order (boolean, (optional)) Keep Vertex Order global_scale (oat in [0.01, 1000], (optional)) Scale, Scale all data axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up path_mode (enum in [AUTO, ABSOLUTE, RELATIVE, MATCH, STRIP, COPY], (optional)) Path Mode, Method used to reference paths 2.3. Operators (bpy.ops) 73
AUTO Auto, Use Relative paths with subdirectories only. ABSOLUTE Absolute, Always write absolute paths. RELATIVE Relative, Always write relative patsh (where possible). MATCH Match, Match Absolute/Relative setting with input path. STRIP Strip Path, Filename only. COPY Copy, copy the le to the destination path (or subdirectory). File addons/io_scene_obj/__init__.py:328 bpy.ops.export_scene.x3d(lepath=, check_existing=True, lter_glob=*.x3d, use_selection=False, use_apply_modiers=True, use_triangulate=False, use_normals=False, use_compress=False, use_hierarchy=True, use_h3d=False, axis_forward=Z, axis_up=Y, path_mode=AUTO) Export selection to Extensible 3D le (.x3d) Parameters lepath (string, (optional)) File Path, Filepath used for exporting the le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les use_selection (boolean, (optional)) Selection Only, Export selected objects only use_apply_modiers (boolean, (optional)) Apply Modiers, Use transformed mesh data from each object use_triangulate (boolean, (optional)) Triangulate, Write quads into IndexedTriangleSet use_normals (boolean, (optional)) Normals, Write normals with geometry use_compress (boolean, (optional)) Compress, Compress the exported le use_hierarchy (boolean, (optional)) Hierarchy, Export parent child relationships use_h3d (boolean, (optional)) H3D Extensions, Export shaders for H3D axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up path_mode (enum in [AUTO, ABSOLUTE, RELATIVE, MATCH, STRIP, COPY], (optional)) Path Mode, Method used to reference paths AUTO Auto, Use Relative paths with subdirectories only. ABSOLUTE Absolute, Always write absolute paths. RELATIVE Relative, Always write relative patsh (where possible). MATCH Match, Match Absolute/Relative setting with input path. STRIP Strip Path, Filename only. COPY Copy, copy the le to the destination path (or subdirectory). File addons/io_scene_x3d/__init__.py:169
74
File Operators bpy.ops.file.bookmark_add() Add a bookmark for the selected/active directory bpy.ops.file.bookmark_toggle() Toggle bookmarks display bpy.ops.file.cancel() Cancel loading of selected le bpy.ops.file.delete() Delete selected le bpy.ops.file.delete_bookmark(index=-1) Delete selected bookmark Parameters index (int in [-1, 20000], (optional)) Index bpy.ops.file.directory() Enter a directory name bpy.ops.file.directory_new(directory=) Create a new directory Parameters directory (string, (optional)) Directory, Name of new directory bpy.ops.file.execute(need_active=False) Execute selected le Parameters need_active (boolean, (optional)) Need Active, Only execute if theres an active selected le in the le list bpy.ops.file.filenum(increment=1) Increment number in lename Parameters increment (int in [-100, 100], (optional)) Increment bpy.ops.file.find_missing_files(lepath=, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=False, lemode=9) Undocumented (contribute) Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders 2.3. Operators (bpy.ops) 75
lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le bpy.ops.file.hidedot() Toggle hide hidden dot les bpy.ops.file.highlight() Highlight selected le(s) bpy.ops.file.make_paths_absolute() Undocumented (contribute) bpy.ops.file.make_paths_relative() Undocumented (contribute) bpy.ops.file.next() Move to next folder bpy.ops.file.pack_all() Undocumented (contribute) bpy.ops.file.parent() Move to parent directory bpy.ops.file.previous() Move to previous folder bpy.ops.file.refresh() Refresh the le list bpy.ops.file.rename() Rename le or le directory bpy.ops.file.report_missing_files() Undocumented (contribute) bpy.ops.file.select(extend=False, ll=False) Activate/select le Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst ll (boolean, (optional)) Fill, Select everything beginning with the last selection bpy.ops.file.select_all_toggle() Select/deselect all les bpy.ops.file.select_bookmark(dir=) Select a bookmarked directory Parameters dir (string, (optional)) Dir bpy.ops.file.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True) Activate/select the le(s) contained in the border Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min
76
ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.file.smoothscroll() Smooth scroll to make editable le visible bpy.ops.file.unpack_all(method=USE_LOCAL) Undocumented (contribute) Parameters method (enum in [USE_LOCAL, WRITE_LOCAL, USE_ORIGINAL, WRITE_ORIGINAL, KEEP, ASK], (optional)) Method, How to unpack Fluid Operators bpy.ops.fluid.bake() Bake uid simulation Font Operators bpy.ops.font.buffer_paste() Paste text from OS buffer bpy.ops.font.case_set(case=LOWER) Set font case Parameters case (enum in [LOWER, UPPER], (optional)) Case, Lower or upper case bpy.ops.font.case_toggle() Toggle font case bpy.ops.font.change_character(delta=1) Change font character code Parameters delta (int in [-255, 255], (optional)) Delta, Number to increase or decrease character code with bpy.ops.font.change_spacing(delta=1) Change font spacing Parameters delta (int in [-20, 20], (optional)) Delta, Amount to decrease or increase character spacing with bpy.ops.font.delete(type=ALL) Delete text by cursor position Parameters type (enum in [ALL, NEXT_CHARACTER, PREVIOUS_CHARACTER, SELECTION, NEXT_OR_SELECTION, PREVIOUS_OR_SELECTION], (optional)) Type, Which part of the text to delete bpy.ops.font.file_paste(lepath=, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=True, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9) Paste contents from le Parameters lepath (string, (optional)) File Path, Path to le
77
lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le bpy.ops.font.insert_lorem() Insert placeholder text bpy.ops.font.line_break(ctrl=False) Insert line break at cursor position Parameters ctrl (boolean, (optional)) Ctrl bpy.ops.font.move(type=LINE_BEGIN) Move cursor to position type Parameters type (enum in [LINE_BEGIN, LINE_END, PREVIOUS_CHARACTER, NEXT_CHARACTER, PREVIOUS_WORD, NEXT_WORD, PREVIOUS_LINE, NEXT_LINE, PREVIOUS_PAGE, NEXT_PAGE], (optional)) Type, Where to move cursor to bpy.ops.font.move_select(type=LINE_BEGIN) Make selection from current cursor position to new cursor position type Parameters type (enum in [LINE_BEGIN, LINE_END, PREVIOUS_CHARACTER, NEXT_CHARACTER, PREVIOUS_WORD, NEXT_WORD, PREVIOUS_LINE, NEXT_LINE, PREVIOUS_PAGE, NEXT_PAGE], (optional)) Type, Where to move cursor to, to make a selection bpy.ops.font.open(lepath=, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=True, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True) Undocumented (contribute) Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les
78
lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.font.style_set(style=BOLD, clear=False) Set font style Parameters style (enum in [BOLD, ITALIC, UNDERLINE, SMALL_CAPS], (optional)) Style, Style to set selection to clear (boolean, (optional)) Clear, Clear style rather than setting it bpy.ops.font.style_toggle(style=BOLD) Toggle font style Parameters style (enum in [BOLD, ITALIC, UNDERLINE, SMALL_CAPS], (optional)) Style, Style to set selection to bpy.ops.font.text_copy() Copy selected text to clipboard bpy.ops.font.text_cut() Cut selected text to clipboard bpy.ops.font.text_insert(text=, accent=False) Insert text at cursor position Parameters text (string, (optional)) Text, Text to insert at the cursor position accent (boolean, (optional)) Accent mode, Next typed character will strike through previous, for special character input bpy.ops.font.text_paste() Paste text from clipboard bpy.ops.font.textbox_add() Add a new text box bpy.ops.font.textbox_remove(index=0) Remove the textbox Parameters index (int in [0, inf], (optional)) Index, The current text box bpy.ops.font.unlink() Unlink active font data block Gpencil Operators bpy.ops.gpencil.active_frame_delete() Delete the active frame for the active Grease Pencil datablock 2.3. Operators (bpy.ops) 79
bpy.ops.gpencil.convert(type=PATH) Convert the active Grease Pencil layer to a new Object Parameters type (enum in [PATH, CURVE], (optional)) Type bpy.ops.gpencil.data_add() Add new Grease Pencil datablock bpy.ops.gpencil.data_unlink() Unlink active Grease Pencil datablock bpy.ops.gpencil.draw(mode=DRAW, stroke=None) Make annotations on the active data Parameters mode (enum in [DRAW, DRAW_STRAIGHT, DRAW_POLY, ERASER], (optional)) Mode, Way to intepret mouse movements stroke (bpy_prop_collection of OperatorStrokeElement, (optional)) Stroke bpy.ops.gpencil.layer_add() Add new Grease Pencil layer for the active Grease Pencil datablock Graph Operators bpy.ops.graph.bake() Bake selected F-Curves to a set of sampled points dening a similar curve bpy.ops.graph.clean(threshold=0.001) Simplify F-Curves by removing closely spaced keyframes Parameters threshold (oat in [0, inf], (optional)) Threshold bpy.ops.graph.click_insert(frame=1.0, value=1.0) Insert new keyframe at the cursor position for the active F-Curve Parameters frame (oat in [-inf, inf], (optional)) Frame Number, Frame to insert keyframe on value (oat in [-inf, inf], (optional)) Value, Value for keyframe on bpy.ops.graph.clickselect(extend=False, column=False, curves=False) Select keyframes by clicking on them Parameters extend (boolean, (optional)) Extend Select column (boolean, (optional)) Column Select, Select all keyframes that occur on the same frame as the one under the mouse curves (boolean, (optional)) Only Curves, Select all the keyframes in the curve bpy.ops.graph.copy() Copy selected keyframes to the copy/paste buffer bpy.ops.graph.cursor_set(frame=0, value=0.0) Interactively set the current frame number and value cursor Parameters frame (int in [-300000, 300000], (optional)) Frame 80 Chapter 2. Application Modules
value (oat in [1.17549e-38, inf], (optional)) Value bpy.ops.graph.delete() Remove all selected keyframes bpy.ops.graph.duplicate(mode=TRANSLATION) Make a copy of all selected keyframes Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.graph.duplicate_move(GRAPH_OT_duplicate=None, FORM_OT_transform=None) Undocumented (contribute) Parameters GRAPH_OT_duplicate (GRAPH_OT_duplicate, (optional)) Duplicate Keyframes, Make a copy of all selected keyframes TRANSFORM_OT_transform (TRANSFORM_OT_transform, (optional)) Transform, Transform selected items by mode type bpy.ops.graph.euler_filter() Fixes the most common causes of gimbal lock in the selected Euler Rotation F-Curves bpy.ops.graph.extrapolation_type(type=CONSTANT) Set extrapolation mode for selected F-Curves Parameters type (enum in [CONSTANT, LINEAR, MAKE_CYCLIC, CLEAR_CYCLIC], (optional)) Type CONSTANT Constant Extrapolation. LINEAR Linear Extrapolation. MAKE_CYCLIC Make Cyclic (F-Modier), Add Cycles F-Modier if one doesnt exist already. CLEAR_CYCLIC Clear Cyclic (F-Modier), Remove Cycles F-Modier if not needed anymore. bpy.ops.graph.fmodifier_add(type=NULL, only_active=True) Add F-Modiers to the selected F-Curves Parameters type (enum in [NULL, GENERATOR, FNGENERATOR, ENVELOPE, CYCLES, NOISE, FILTER, LIMITS, STEPPED], (optional)) Type only_active (boolean, (optional)) Only Active, Only add F-Modier to active F-Curve bpy.ops.graph.fmodifier_copy() Copy the F-Modier(s) of the active F-Curve bpy.ops.graph.fmodifier_paste() Add copied F-Modiers to the selected F-Curves bpy.ops.graph.frame_jump() Set the current frame to the average frame of the selected keyframes TRANS-
81
bpy.ops.graph.ghost_curves_clear() Clear F-Curve snapshots (Ghosts) for active Graph Editor bpy.ops.graph.ghost_curves_create() Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor bpy.ops.graph.handle_type(type=FREE) Set type of handle for selected keyframes Parameters type (enum in [FREE, VECTOR, ALIGNED, AUTO, AUTO_CLAMPED], (optional)) Type FREE Free. VECTOR Vector. ALIGNED Aligned. AUTO Automatic. AUTO_CLAMPED Auto Clamped, Auto handles clamped to not overshoot. bpy.ops.graph.handles_view_toggle() Toggle whether handles are drawn on all keyframes that need them bpy.ops.graph.interpolation_type(type=CONSTANT) Set interpolation mode for the F-Curve segments starting from the selected keyframes Parameters type (enum in [CONSTANT, LINEAR, BEZIER], (optional)) Type bpy.ops.graph.keyframe_insert(type=ALL) Insert keyframes for the specied channels Parameters type (enum in [ALL, SEL], (optional)) Type bpy.ops.graph.mirror(type=CFRA) Flip selected keyframes over the selected mirror line Parameters type (enum in [CFRA, VALUE, YAXIS, XAXIS, MARKER], (optional)) Type bpy.ops.graph.paste(offset=START, merge=MIX) Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame Parameters offset (enum in [START, END, RELATIVE, NONE], (optional)) Offset, Paste time offset of keys START Frame Start, Paste keys starting at current frame. END Frame End, Paste keys ending at current frame. RELATIVE Frame Relative, Paste keys relative to the current frame when copying. NONE No Offset, Paste keys from original time. merge (enum in [MIX, OVER_ALL, OVER_RANGE, OVER_RANGE_ALL], (optional)) Type, Method of merging pasted keys and existing MIX Mix, Overlay existing with new keys. OVER_ALL Overwrite All, Replace all keys. OVER_RANGE Overwrite Range, Overwrite keys in pasted range. OVER_RANGE_ALL Overwrite Entire Range, Overwrite keys in pasted range, using the range of all copied keys.
82
bpy.ops.graph.previewrange_set() Automatically set Preview Range based on range of keyframes bpy.ops.graph.properties() Toggle display properties panel bpy.ops.graph.sample() Add keyframes on every frame between the selected keyframes bpy.ops.graph.select_all_toggle(invert=False) Toggle selection of all keyframes Parameters invert (boolean, (optional)) Invert bpy.ops.graph.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True, axis_range=False, include_handles=False) Select all keyframes within the specied region Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst axis_range (boolean, (optional)) Axis Range include_handles (boolean, (optional)) Include Handles, Are handles tested individually against the selection criteria bpy.ops.graph.select_column(mode=KEYS) Select all keyframes on the specied frame(s) Parameters mode (enum in [KEYS, CFRA, MARKERS_COLUMN, MARKERS_BETWEEN], (optional)) Mode bpy.ops.graph.select_leftright(mode=CHECK, extend=False) Select keyframes to the left or the right of the current frame Parameters mode (enum in [CHECK, LEFT, RIGHT], (optional)) Mode extend (boolean, (optional)) Extend Select bpy.ops.graph.select_less() Deselect keyframes on ends of selection islands bpy.ops.graph.select_linked() Select keyframes occurring in the same F-Curves as selected ones bpy.ops.graph.select_more() Select keyframes beside already selected ones bpy.ops.graph.smooth() Apply weighted moving means to make selected F-Curves less bumpy bpy.ops.graph.snap(type=CFRA) Snap selected keyframes to the chosen times/values 2.3. Operators (bpy.ops) 83
Parameters type (enum in [CFRA, VALUE, NEAREST_FRAME, NEAREST_SECOND, NEAREST_MARKER, HORIZONTAL], (optional)) Type bpy.ops.graph.sound_bake(lepath=, lter_blender=False, lter_image=False, lter_movie=True, lter_python=False, lter_font=False, lter_sound=True, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, low=0.0, high=100000.0, attack=0.005, release=0.2, threshold=0.0, accumulate=False, use_additive=False, square=False, sthreshold=0.1) Bakes a sound wave to selected F-Curves Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le low (oat in [0, 100000], (optional)) Lowest frequency high (oat in [0, 100000], (optional)) Highest frequency attack (oat in [0, 2], (optional)) Attack time release (oat in [0, 5], (optional)) Release time threshold (oat in [0, 1], (optional)) Threshold accumulate (boolean, (optional)) Accumulate use_additive (boolean, (optional)) Additive square (boolean, (optional)) Square sthreshold (oat in [0, 1], (optional)) Square Threshold bpy.ops.graph.view_all() Reset viewable area to show full keyframe range bpy.ops.graph.view_selected() Reset viewable area to show selected keyframe range Group Operators bpy.ops.group.create(name=Group) Create an object group from selected objects 84 Chapter 2. Application Modules
Parameters name (string, (optional)) Name, Name of the new group bpy.ops.group.objects_add_active() Add the object to an object group that contains the active object bpy.ops.group.objects_remove() Remove selected objects from all groups bpy.ops.group.objects_remove_active() Remove the object from an object group that contains the active object Image Operators bpy.ops.image.curves_point_set(point=BLACK_POINT) Undocumented (contribute) Parameters point (enum in [BLACK_POINT, WHITE_POINT], (optional)) Point, Set black point or white point for curves bpy.ops.image.cycle_render_slot(reverse=False) Undocumented (contribute) Parameters reverse (boolean, (optional)) Cycle in Reverse bpy.ops.image.external_edit(lepath=) Edit image in an external application File startup/bl_operators/image.py:60 bpy.ops.image.invert(invert_r=False, invert_g=False, invert_b=False, invert_a=False) Undocumented (contribute) Parameters invert_r (boolean, (optional)) Red, Invert Red Channel invert_g (boolean, (optional)) Green, Invert Green Channel invert_b (boolean, (optional)) Blue, Invert Blue Channel invert_a (boolean, (optional)) Alpha, Invert Alpha Channel bpy.ops.image.new(name=untitled, width=1024, height=1024, color=(0.0, 0.0, 0.0, 1.0), alpha=True, uv_test_grid=False, oat=False) Create a new image Parameters name (string, (optional)) Name, Image datablock name width (int in [1, inf], (optional)) Width, Image width height (int in [1, inf], (optional)) Height, Image height color (oat array of 4 items in [0, inf], (optional)) Color, Default ll color alpha (boolean, (optional)) Alpha, Create an image with an alpha channel uv_test_grid (boolean, (optional)) UV Test Grid, Fill the image with a grid for UV map testing oat (boolean, (optional)) 32 bit Float, Create image with 32 bit oating point bit depth
85
bpy.ops.image.open(lepath=, lter_blender=False, lter_image=True, lter_movie=True, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True) Open image Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.image.pack(as_png=False) Pack an image as embedded data into the .blend le Parameters as_png (boolean, (optional)) Pack As PNG, Pack image as lossless PNG bpy.ops.image.project_apply() Project edited image back onto the object File startup/bl_operators/image.py:209 bpy.ops.image.project_edit() Edit a snapshot of the viewport in an external image editor File startup/bl_operators/image.py:138 bpy.ops.image.properties() Toggle display properties panel bpy.ops.image.record_composite() Undocumented (contribute) bpy.ops.image.reload() Undocumented (contribute) bpy.ops.image.replace(lepath=, lter_blender=False, lter_image=True, lter_movie=True, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True) Undocumented (contribute) Parameters
86
lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.image.sample() Undocumented (contribute) bpy.ops.image.sample_line(xstart=0, xend=0, ystart=0, yend=0, cursor=1002) Undocumented (contribute) Parameters xstart (int in [-inf, inf], (optional)) X Start xend (int in [-inf, inf], (optional)) X End ystart (int in [-inf, inf], (optional)) Y Start yend (int in [-inf, inf], (optional)) Y End cursor (int in [0, inf], (optional)) Cursor, Mouse cursor style to use during the modal operator bpy.ops.image.save() Undocumented (contribute) bpy.ops.image.save_as(copy=False, lepath=, check_existing=True, lter_blender=False, lter_image=True, lter_movie=True, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True) Undocumented (contribute) Parameters copy (boolean, (optional)) Copy, Create a new image le without modifying the current image in blender lepath (string, (optional)) File Path, Path to le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les
87
lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.image.save_dirty() Save all modied textures File startup/bl_operators/image.py:113 bpy.ops.image.save_sequence() Undocumented (contribute) bpy.ops.image.scopes() Toggle display scopes panel bpy.ops.image.unpack(method=USE_LOCAL, id=) Save an image packed in the .blend le to disk Parameters method (enum in [USE_LOCAL, WRITE_LOCAL, WRITE_ORIGINAL], (optional)) Method, How to unpack id (string, (optional)) Image Name, Image datablock name to unpack bpy.ops.image.view_all() Undocumented (contribute) bpy.ops.image.view_ndof() Undocumented (contribute) bpy.ops.image.view_pan(offset=(0.0, 0.0)) Undocumented (contribute) Parameters offset (oat array of 2 items in [-inf, inf], (optional)) Offset, Offset in oating point units, 1.0 is the width and height of the image bpy.ops.image.view_selected() Undocumented (contribute) bpy.ops.image.view_zoom(factor=0.0) Undocumented (contribute) Parameters factor (oat in [0, inf], (optional)) Factor, Zoom factor, values higher than 1.0 zoom in, lower values zoom out bpy.ops.image.view_zoom_in() Undocumented (contribute) USE_ORIGINAL,
88
bpy.ops.image.view_zoom_out() Undocumented (contribute) bpy.ops.image.view_zoom_ratio(ratio=0.0) Undocumented (contribute) Parameters ratio (oat in [0, inf], (optional)) Ratio, Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out Import Anim Operators bpy.ops.import_anim.bvh(lepath=, lter_glob=*.bvh, target=ARMATURE, global_scale=1.0, frame_start=1, use_cyclic=False, rotate_mode=NATIVE, axis_forward=-Z, axis_up=Y) Load a BVH motion capture le Parameters lepath (string, (optional)) File Path, Filepath used for importing the le target (enum in [ARMATURE, OBJECT], (optional)) Target, Import target type global_scale (oat in [0.0001, 1e+06], (optional)) Scale, Scale the BVH by this value frame_start (int in [-inf, inf], (optional)) Start Frame, Starting frame for the animation use_cyclic (boolean, (optional)) Loop, Loop the animation playback rotate_mode (enum in [QUATERNION, NATIVE, XYZ, XZY, YXZ, YZX, ZXY, ZYX], (optional)) Rotation, Rotation conversion QUATERNION Quaternion, Convert rotations to quaternions. NATIVE Euler (Native), Use the rotation order dened in the BVH le. XYZ Euler (XYZ), Convert rotations to euler XYZ. XZY Euler (XZY), Convert rotations to euler XZY. YXZ Euler (YXZ), Convert rotations to euler YXZ. YZX Euler (YZX), Convert rotations to euler YZX. ZXY Euler (ZXY), Convert rotations to euler ZXY. ZYX Euler (ZYX), Convert rotations to euler ZYX. axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up File addons/io_anim_bvh/__init__.py:130 Import Curve Operators bpy.ops.import_curve.svg(lepath=, lter_glob=*.svg) Load a SVG le Parameters lepath (string, (optional)) File Path, Filepath used for importing the le File addons/io_curve_svg/__init__.py:58
89
Import Mesh Operators bpy.ops.import_mesh.ply(lepath=, les=None, directory=, lter_glob=*.ply) Load a PLY geometry le Parameters lepath (string, (optional)) File Path, Filepath used for importing the le les (bpy_prop_collection of OperatorFileListElement, (optional)) File Path, File path used for importing the PLY le File addons/io_mesh_ply/__init__.py:67 bpy.ops.import_mesh.stl(lepath=, lter_glob=*.stl, les=None, directory=) Load STL triangle mesh data Parameters lepath (string, (optional)) File Path, Filepath used for importing the le les (bpy_prop_collection of OperatorFileListElement, (optional)) File Path File addons/io_mesh_stl/__init__.py:86 Import Scene Operators bpy.ops.import_scene.autodesk_3ds(lepath=, lter_glob=*.3ds, constrain_size=10.0, use_image_search=True, use_apply_transform=True, axis_forward=Y, axis_up=Z) Import from 3DS le format (.3ds) Parameters lepath (string, (optional)) File Path, Filepath used for importing the le constrain_size (oat in [0, 1000], (optional)) Size Constraint, Scale the model by 10 until it reacehs the size constraint. Zero Disables use_image_search (boolean, (optional)) Image Search, Search subdirectories for any assosiated images (Warning, may be slow) use_apply_transform (boolean, (optional)) Apply Transform, Workaround for object transformations importing incorrectly axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up File addons/io_scene_3ds/__init__.py:107 bpy.ops.import_scene.obj(lepath=, lter_glob=*.obj;*.mtl, use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode=ON, global_clamp_size=0.0, axis_forward=-Z, axis_up=Y) Load a Wavefront OBJ File Parameters lepath (string, (optional)) File Path, Filepath used for importing the le use_ngons (boolean, (optional)) NGons, Import faces with more then 4 verts as fgons
90
use_edges (boolean, (optional)) Lines, Import lines and faces with 2 verts as edge use_smooth_groups (boolean, (optional)) Smooth Groups, Surround smooth groups by sharp edges use_split_objects (boolean, (optional)) Object, Import OBJ Objects into Blender Objects use_split_groups (boolean, (optional)) Group, Import OBJ Groups into Blender Objects use_groups_as_vgroups (boolean, (optional)) Poly Groups, Import OBJ groups as vertex groups use_image_search (boolean, (optional)) Image Search, Search subdirs for any assosiated images (Warning, may be slow) split_mode (enum in [ON, OFF], (optional)) Split ON Split, Split geometry, omits unused verts. OFF Keep Vert Order, Keep vertex order from le. global_clamp_size (oat in [0, 1000], (optional)) Clamp Scale, Clamp the size to this maximum (Zero to Disable) axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up File addons/io_scene_obj/__init__.py:147 bpy.ops.import_scene.x3d(lepath=, axis_up=Y) Import and X3D or VRML le Parameters lepath (string, (optional)) File Path, Filepath used for importing the le axis_forward (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Forward axis_up (enum in [X, Y, Z, -X, -Y, -Z], (optional)) Up File addons/io_scene_x3d/__init__.py:84 Info Operators bpy.ops.info.report_copy() Copy selected reports to Clipboard bpy.ops.info.report_delete() Delete selected reports bpy.ops.info.report_replay() Replay selected reports bpy.ops.info.reports_display_update() Undocumented (contribute) bpy.ops.info.select_all_toggle() (de)select all reports bpy.ops.info.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True) Toggle border selection Parameters lter_glob=*.x3d;*.wrl, axis_forward=Z,
91
gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.info.select_pick(report_index=0) Select reports by index Parameters report_index (int in [0, inf], (optional)) Report, Index of the report Lamp Operators bpy.ops.lamp.sunsky_preset_add(name=, remove_active=False) Add a Sky & Atmosphere Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 Lattice Operators bpy.ops.lattice.make_regular() Set UVW control points a uniform distance apart bpy.ops.lattice.select_all(action=TOGGLE) Change selection of all UVW control points Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. Logic Operators bpy.ops.logic.actuator_add(type=, name=, object=) Add an actuator to the active object Parameters type (enum in [], (optional)) Type, Type of actuator to add name (string, (optional)) Name, Name of the Actuator to add object (string, (optional)) Object, Name of the Object to add the Actuator to bpy.ops.logic.actuator_move(actuator=, object=, direction=UP) Move Actuator
92
Parameters actuator (string, (optional)) Actuator, Name of the actuator to edit object (string, (optional)) Object, Name of the object the actuator belongs to direction (enum in [UP, DOWN], (optional)) Direction, Move Up or Down bpy.ops.logic.actuator_remove(actuator=, object=) Remove an actuator from the active object Parameters actuator (string, (optional)) Actuator, Name of the actuator to edit object (string, (optional)) Object, Name of the object the actuator belongs to bpy.ops.logic.controller_add(type=LOGIC_AND, name=, object=) Add a controller to the active object Parameters type (enum in [LOGIC_AND, LOGIC_OR, LOGIC_NAND, LOGIC_NOR, LOGIC_XOR, LOGIC_XNOR, EXPRESSION, PYTHON], (optional)) Type, Type of controller to add LOGIC_AND And, Logic And. LOGIC_OR Or, Logic Or. LOGIC_NAND Nand, Logic Nand. LOGIC_NOR Nor, Logic Nor. LOGIC_XOR Xor, Logic Xor. LOGIC_XNOR Xnor, Logic Xnor. EXPRESSION Expression. PYTHON Python. name (string, (optional)) Name, Name of the Controller to add object (string, (optional)) Object, Name of the Object to add the Controller to bpy.ops.logic.controller_move(controller=, object=, direction=UP) Move Controller Parameters controller (string, (optional)) Controller, Name of the controller to edit object (string, (optional)) Object, Name of the object the controller belongs to direction (enum in [UP, DOWN], (optional)) Direction, Move Up or Down bpy.ops.logic.controller_remove(controller=, object=) Remove a controller from the active object Parameters controller (string, (optional)) Controller, Name of the controller to edit object (string, (optional)) Object, Name of the object the controller belongs to bpy.ops.logic.links_cut(path=None, cursor=9) Remove logic brick connections
93
Parameters path (bpy_prop_collection of OperatorMousePath, (optional)) path cursor (int in [0, inf], (optional)) Cursor bpy.ops.logic.properties() Toggle display properties panel bpy.ops.logic.sensor_add(type=, name=, object=) Add a sensor to the active object Parameters type (enum in [], (optional)) Type, Type of sensor to add name (string, (optional)) Name, Name of the Sensor to add object (string, (optional)) Object, Name of the Object to add the Sensor to bpy.ops.logic.sensor_move(sensor=, object=, direction=UP) Move Sensor Parameters sensor (string, (optional)) Sensor, Name of the sensor to edit object (string, (optional)) Object, Name of the object the sensor belongs to direction (enum in [UP, DOWN], (optional)) Direction, Move Up or Down bpy.ops.logic.sensor_remove(sensor=, object=) Remove a sensor from the active object Parameters sensor (string, (optional)) Sensor, Name of the sensor to edit object (string, (optional)) Object, Name of the object the sensor belongs to bpy.ops.logic.texface_convert() Convert old texface settings into material. It may create new materials if needed Marker Operators bpy.ops.marker.add() Add a new time marker bpy.ops.marker.camera_bind() Bind the active camera to selected markers(s) bpy.ops.marker.delete() Delete selected time marker(s) bpy.ops.marker.duplicate(frames=0) Duplicate selected time marker(s) Parameters frames (int in [-inf, inf], (optional)) Frames bpy.ops.marker.make_links_scene(scene=) Copy selected markers to another scene Parameters scene (enum in [], (optional)) Scene bpy.ops.marker.move(frames=0) Move selected time marker(s) 94 Chapter 2. Application Modules
Parameters frames (int in [-inf, inf], (optional)) Frames bpy.ops.marker.rename(name=RenamedMarker) Rename rst selected time marker Parameters name (string, (optional)) Name, New name for marker bpy.ops.marker.select(extend=False, camera=False) Select time marker(s) Parameters extend (boolean, (optional)) Extend, extend the selection camera (boolean, (optional)) Camera, Select the camera bpy.ops.marker.select_all(action=TOGGLE) Change selection of all time markers Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.marker.select_border(gesture_mode=0, tend=True) Select all time markers using border selection Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst Material Operators bpy.ops.material.copy() Copy the material settings and nodes bpy.ops.material.new() Add a new material bpy.ops.material.paste() Paste the material settings and nodes bpy.ops.material.sss_preset_add(name=, remove_active=False) Add a Subsurface Scattering Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 xmin=0, xmax=0, ymin=0, ymax=0, ex-
95
Mball Operators bpy.ops.mball.delete_metaelems() Delete selected metaelement(s) bpy.ops.mball.duplicate_metaelems(mode=TRANSLATION) Delete selected metaelement(s) Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.mball.hide_metaelems(unselected=False) Hide (un)selected metaelement(s) Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected bpy.ops.mball.reveal_metaelems() Reveal all hidden metaelements bpy.ops.mball.select_all(action=TOGGLE) Change selection of all meta elements Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.mball.select_inverse_metaelems() Select inverse of (un)selected metaelements bpy.ops.mball.select_random_metaelems(percent=0.5) Randomly select metaelements Parameters percent (oat in [0, 1], (optional)) Percent, Percentage of metaelems to select randomly Mesh Operators bpy.ops.mesh.beautify_fill() Rearrange geometry on a selected surface to avoid skinny faces bpy.ops.mesh.blend_from_shape(shape=, blend=1.0, add=False) Blend in shape from a shape key Parameters shape (enum in [], (optional)) Shape, Shape key to use for blending blend (oat in [-inf, inf], (optional)) Blend, Blending factor add (boolean, (optional)) Add, Add rather than blend between shapes
96
bpy.ops.mesh.colors_mirror(axis=X) Mirror UV/image color layer Parameters axis (enum in [X, Y], (optional)) Axis, Axis to mirror colors around bpy.ops.mesh.colors_rotate(direction=CW) Rotate UV/image color layer Parameters direction (enum in [CW, CCW], (optional)) Direction, Direction to rotate edge around bpy.ops.mesh.delete(type=VERT) Delete selected vertices, edges or faces Parameters type (enum in [VERT, EDGE, FACE, ALL, EDGE_FACE, ONLY_FACE, EDGE_LOOP], (optional)) Type, Method used for deleting mesh data bpy.ops.mesh.delete_edgeloop() Delete an edge loop by merging the faces on each side to a single face loop File startup/bl_operators/wm.py:38 bpy.ops.mesh.drop_named_image(name=Image, lepath=Path) Assign Image to active UV Map, or create an UV Map Parameters name (string, (optional)) Name, Image name to assign lepath (string, (optional)) Filepath, Path to image le bpy.ops.mesh.dupli_extrude_cursor(rotate_source=True) Duplicate and extrude selected vertices, edges or faces towards 3D Cursor Parameters rotate_source (boolean, (optional)) Rotate Source, Rotate initial selection giving better shape bpy.ops.mesh.duplicate(mode=TRANSLATION) Duplicate selected vertices, edges or faces Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.mesh.duplicate_move(MESH_OT_duplicate=None, TRANSFORM_OT_translate=None) Undocumented (contribute) Parameters MESH_OT_duplicate (MESH_OT_duplicate, (optional)) Duplicate Mesh, Duplicate selected vertices, edges or faces TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.mesh.edge_face_add() Add an edge or face to selected bpy.ops.mesh.edge_flip() Flip selected edge or adjoining faces
97
bpy.ops.mesh.edge_rotate(direction=CW) Rotate selected edge or adjoining faces Parameters direction (enum in [CW, CCW], (optional)) Direction, Direction to rotate the edge around bpy.ops.mesh.edgering_select(extend=False) Select an edge ring Parameters extend (boolean, (optional)) Extend, Extend the selection bpy.ops.mesh.edges_select_sharp(sharpness=0.01) Marked selected edges as sharp Parameters sharpness (oat in [0, inf], (optional)) sharpness bpy.ops.mesh.extrude(type=REGION) Extrude selected vertices, edges or faces Parameters type (enum in [REGION, FACES, EDGES, VERTS], (optional)) Type bpy.ops.mesh.extrude_edges_move(MESH_OT_extrude=None, FORM_OT_translate=None) Undocumented (contribute) Parameters MESH_OT_extrude (MESH_OT_extrude, (optional)) Extrude, Extrude selected vertices, edges or faces TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.mesh.extrude_faces_move(MESH_OT_extrude=None, FORM_OT_shrink_fatten=None) Undocumented (contribute) Parameters MESH_OT_extrude (MESH_OT_extrude, (optional)) Extrude, Extrude selected vertices, edges or faces TRANSFORM_OT_shrink_fatten (TRANSFORM_OT_shrink_fatten, (optional)) Shrink/Fatten, Shrink/fatten selected vertices along normals bpy.ops.mesh.extrude_region_move(MESH_OT_extrude=None, FORM_OT_translate=None) Undocumented (contribute) Parameters MESH_OT_extrude (MESH_OT_extrude, (optional)) Extrude, Extrude selected vertices, edges or faces TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.mesh.extrude_repeat(offset=2.0, steps=10, direction=(0.0, 0.0, 0.0)) Extrude selected vertices, edges or faces repeatedly Parameters offset (oat in [0, 100], (optional)) Offset steps (int in [0, 180], (optional)) Steps direction (oat array of 3 items in [-inf, inf], (optional)) Direction, Direction of extrude 98 Chapter 2. Application Modules TRANSTRANSTRANS-
TRANS-
MESH_OT_extrude (MESH_OT_extrude, (optional)) Extrude, Extrude selected vertices, edges or faces TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.mesh.faces_mirror_uv(direction=POSITIVE) Copy mirror UV coordinates on the X axis based on a mirrored mesh Parameters direction (enum in [POSITIVE, NEGATIVE], (optional)) Axis Direction File startup/bl_operators/mesh.py:88 bpy.ops.mesh.faces_select_interior() Select faces where all edges have more then 2 face users File startup/bl_operators/mesh.py:39 bpy.ops.mesh.faces_select_linked_flat(sharpness=135.0) Select linked faces by angle Parameters sharpness (oat in [0, inf], (optional)) sharpness bpy.ops.mesh.faces_shade_flat() Display faces at bpy.ops.mesh.faces_shade_smooth() Display faces smooth (using vertex normals) bpy.ops.mesh.fgon_clear() Clear fgon from selected face bpy.ops.mesh.fgon_make() Make fgon from selected faces bpy.ops.mesh.fill() Create a segment, edge or face bpy.ops.mesh.flip_normals() Toggle the direction of selected faces vertex and face normals bpy.ops.mesh.hide(unselected=False) Hide (un)selected vertices, edges or faces Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected bpy.ops.mesh.knife_cut(type=EXACT, path=None, num_cuts=1, cursor=9) Cut selected edges and faces into parts Parameters type (enum in [EXACT, MIDPOINTS, MULTICUT], (optional)) Type path (bpy_prop_collection of OperatorMousePath, (optional)) path num_cuts (int in [1, 256], (optional)) Number of Cuts, Only for Multi-Cut cursor (int in [0, inf], (optional)) Cursor bpy.ops.mesh.loop_multi_select(ring=False) Select a loop of connected edges by connection type 2.3. Operators (bpy.ops) 99
Parameters ring (boolean, (optional)) Ring bpy.ops.mesh.loop_select(extend=False, ring=False) Select a loop of connected edges Parameters extend (boolean, (optional)) Extend Select ring (boolean, (optional)) Select Ring bpy.ops.mesh.loop_to_region() Select a loop of connected edges as a region bpy.ops.mesh.loopcut(number_cuts=1) Add a new loop between existing loops Parameters number_cuts (int in [1, inf], (optional)) Number of Cuts bpy.ops.mesh.loopcut_slide(MESH_OT_loopcut=None, TRANSFORM_OT_edge_slide=None) Undocumented (contribute) Parameters MESH_OT_loopcut (MESH_OT_loopcut, (optional)) Loop Cut, Add a new loop between existing loops TRANSFORM_OT_edge_slide (TRANSFORM_OT_edge_slide, (optional)) Edge Slide, Slide an edge loop along a mesh bpy.ops.mesh.mark_seam(clear=False) (un)mark selected edges as a seam Parameters clear (boolean, (optional)) Clear bpy.ops.mesh.mark_sharp(clear=False) (un)mark selected edges as sharp Parameters clear (boolean, (optional)) Clear bpy.ops.mesh.merge(type=CENTER, uvs=False) Merge selected vertices Parameters type (enum in [FIRST, LAST, CENTER, CURSOR, COLLAPSE], (optional)) Type, Merge method to use uvs (boolean, (optional)) UVs, Move UVs according to merge bpy.ops.mesh.noise(factor=0.1) Use vertex coordinate as texture coordinate Parameters factor (oat in [-inf, inf], (optional)) Factor bpy.ops.mesh.normals_make_consistent(inside=False) Flip all selected vertex and face normals in a consistent direction Parameters inside (boolean, (optional)) Inside bpy.ops.mesh.primitive_circle_add(vertices=32, radius=1.0, ll=False, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a circle mesh
100
Parameters vertices (int in [3, inf], (optional)) Vertices radius (oat in [0, inf], (optional)) Radius ll (boolean, (optional)) Fill view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.primitive_cone_add(vertices=32, radius=1.0, depth=2.0, cap_end=True, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a conic mesh (ends lled) Parameters vertices (int in [2, inf], (optional)) Vertices radius (oat in [0, inf], (optional)) Radius depth (oat in [0, inf], (optional)) Depth cap_end (boolean, (optional)) Cap End view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.primitive_cube_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a cube mesh Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object
101
rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.primitive_cylinder_add(vertices=32, radius=1.0, depth=2.0, cap_ends=True, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a cylinder mesh Parameters vertices (int in [2, inf], (optional)) Vertices radius (oat in [0, inf], (optional)) Radius depth (oat in [0, inf], (optional)) Depth cap_ends (boolean, (optional)) Cap Ends view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.primitive_grid_add(x_subdivisions=10, y_subdivisions=10, size=1.0, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a grid mesh Parameters x_subdivisions (int in [3, inf], (optional)) X Subdivisions y_subdivisions (int in [3, inf], (optional)) Y Subdivisions size (oat in [0, inf], (optional)) Size view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer
102
bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=2, size=1.0, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct an Icosphere mesh Parameters subdivisions (int in [1, inf], (optional)) Subdivisions size (oat in [0, inf], (optional)) Size view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.primitive_monkey_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Suzanne mesh Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.primitive_plane_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a lled planar mesh with 4 vertices Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object
103
layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.primitive_torus_add(major_radius=1.0, minor_radius=0.25, major_segments=48, minor_segments=12, use_abso=False, abso_major_rad=1.0, abso_minor_rad=0.5, view_align=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0)) Add a torus mesh Parameters major_radius (oat in [0.01, 100], (optional)) Major Radius, Radius from the origin to the center of the cross sections minor_radius (oat in [0.01, 100], (optional)) Minor Radius, Radius of the torus cross section major_segments (int in [3, 256], (optional)) Major Segments, Number of segments for the main ring of the torus minor_segments (int in [3, 256], (optional)) Minor Segments, Number of segments for the minor ring of the torus use_abso (boolean, (optional)) Use Int+Ext Controls, Use the Int / Ext controls for torus dimensions abso_major_rad (oat in [0.01, 100], (optional)) Exterior Radius, Total Exterior Radius of the torus abso_minor_rad (oat in [0.01, 100], (optional)) Inside Radius, Total Interior Radius of the torus view_align (boolean, (optional)) Align to View location (oat array of 3 items in [-inf, inf], (optional)) Location rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation File startup/bl_operators/add_mesh_torus.py:148 bpy.ops.mesh.primitive_uv_sphere_add(segments=32, ring_count=16, size=1.0, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a UV sphere mesh Parameters segments (int in [3, inf], (optional)) Segments ring_count (int in [3, inf], (optional)) Rings size (oat in [0, inf], (optional)) Size view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object
104
layers (boolean array of 20 items, (optional)) Layer bpy.ops.mesh.quads_convert_to_tris() Convert selected quads to triangles bpy.ops.mesh.region_to_loop() Select a region as a loop of connected edges bpy.ops.mesh.remove_doubles(limit=0.0001) Remove duplicate vertices Parameters limit (oat in [1e-06, 50], (optional)) Merge Threshold, Minimum distance between merged verts bpy.ops.mesh.reveal() Reveal all hidden vertices, edges and faces bpy.ops.mesh.rip(constraint_axis=(False, False, False), constraint_orientation=, mirror=False, release_conrm=False) Rip selection from mesh (quads only) Parameters constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation mirror (boolean, (optional)) Mirror Editing release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.mesh.rip_move(MESH_OT_rip=None, TRANSFORM_OT_translate=None) Undocumented (contribute) Parameters MESH_OT_rip (MESH_OT_rip, (optional)) Rip, Rip selection from mesh (quads only) TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.mesh.screw(steps=9, turns=1, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0)) Extrude selected vertices in screw-shaped rotation around the cursor in indicated viewport Parameters steps (int in [0, inf], (optional)) Steps, Steps turns (int in [0, inf], (optional)) Turns, Turns center (oat array of 3 items in [-inf, inf], (optional)) Center, Center in global view space axis (oat array of 3 items in [-1, 1], (optional)) Axis, Axis in global view space bpy.ops.mesh.select_all(action=TOGGLE) Change selection of all vertices, edges or faces Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. 2.3. Operators (bpy.ops) 105
bpy.ops.mesh.select_axis(mode=POSITIVE, axis=X_AXIS) Select all data in the mesh on a single axis Parameters mode (enum in [POSITIVE, NEGATIVE, ALIGNED], (optional)) Axis Mode, Axis side to use when selecting axis (enum in [X_AXIS, Y_AXIS, Z_AXIS], (optional)) Axis, Select the axis to compare each vertex on bpy.ops.mesh.select_by_number_vertices(type=TRIANGLES) Select vertices or faces by vertex count Parameters type (enum in [TRIANGLES, QUADS, OTHER], (optional)) Type, Type of elements to select bpy.ops.mesh.select_inverse() Select inverse of (un)selected vertices, edges or faces bpy.ops.mesh.select_less() Select less vertices, edges or faces connected to initial selection bpy.ops.mesh.select_linked(limit=False) Select all vertices linked to the active mesh Parameters limit (boolean, (optional)) Limit by Seams, Limit selection by seam boundaries (faces only) bpy.ops.mesh.select_linked_pick(deselect=False, limit=False) (un)select all vertices linked to the active mesh Parameters deselect (boolean, (optional)) Deselect limit (boolean, (optional)) Limit by Seams, Limit selection by seam boundaries (faces only) bpy.ops.mesh.select_mirror(extend=False) Select mesh items at mirrored locations Parameters extend (boolean, (optional)) Extend, Extend the existing selection bpy.ops.mesh.select_more() Select more vertices, edges or faces connected to initial selection bpy.ops.mesh.select_non_manifold() Select all non-manifold vertices or edges bpy.ops.mesh.select_nth(nth=2) Undocumented (contribute) Parameters nth (int in [2, 100], (optional)) Nth Selection bpy.ops.mesh.select_random(percent=50.0, extend=False) Randomly select vertices Parameters percent (oat in [0, 100], (optional)) Percent, Percentage of elements to select randomly extend (boolean, (optional)) Extend Selection, Extend selection instead of deselecting everything rst
106
bpy.ops.mesh.select_shortest_path(extend=False) Select shortest path between two selections Parameters extend (boolean, (optional)) Extend Select bpy.ops.mesh.select_similar(type=NORMAL, threshold=0.01) Select similar vertices, edges or faces by property types Parameters type (enum in [NORMAL, FACE, VGROUP, LENGTH, DIR, FACE, FACE_ANGLE, CREASE, SEAM, SHARP, MATERIAL, IMAGE, AREA, PERIMETER, NORMAL, COPLANAR], (optional)) Type threshold (oat in [0, inf], (optional)) Threshold bpy.ops.mesh.select_vertex_path(type=EDGE_LENGTH) Select shortest path between two vertices by distance type Parameters type (enum in [EDGE_LENGTH, TOPOLOGICAL], (optional)) Type, Method to compute distance bpy.ops.mesh.separate(type=SELECTED) Separate selected geometry into a new mesh Parameters type (enum in [SELECTED, MATERIAL, LOOSE], (optional)) Type bpy.ops.mesh.shape_propagate_to_all() Apply selected vertex locations to all other shape keys bpy.ops.mesh.solidify(thickness=0.01) Create a solid skin by extruding, compensating for sharp angles Parameters thickness (oat in [-inf, inf], (optional)) Thickness bpy.ops.mesh.sort_faces(type=VIEW_AXIS) The faces of the active Mesh Object are sorted, based on the current view Parameters type (enum in [VIEW_AXIS, CURSOR_DISTANCE, MATERIAL, SELECTED, RANDOMIZE], (optional)) Type bpy.ops.mesh.spin(steps=9, dupli=False, degrees=90.0, center=(0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0)) Extrude selected vertices in a circle around the cursor in indicated viewport Parameters steps (int in [0, inf], (optional)) Steps, Steps dupli (boolean, (optional)) Dupli, Make Duplicates degrees (oat in [-inf, inf], (optional)) Degrees, Degrees center (oat array of 3 items in [-inf, inf], (optional)) Center, Center in global view space axis (oat array of 3 items in [-1, 1], (optional)) Axis, Axis in global view space bpy.ops.mesh.split() Split selected geometry into separate disconnected mesh bpy.ops.mesh.sticky_add() Add sticky UV texture layer bpy.ops.mesh.sticky_remove() Remove sticky UV texture layer
107
bpy.ops.mesh.subdivide(number_cuts=1, smoothness=0.0, ner_cut_pattern=INNER_VERTEX) Subdivide selected edges Parameters number_cuts (int in [1, inf], (optional)) Number of Cuts
fractal=0.0,
cor-
smoothness (oat in [0, inf], (optional)) Smoothness, Smoothness factor fractal (oat in [0, inf], (optional)) Fractal, Fractal randomness factor corner_cut_pattern (enum in [PATH, INNER_VERTEX, FAN], (optional)) Corner Cut Pattern, Topology pattern to use to ll a face after cutting across its corner bpy.ops.mesh.tris_convert_to_quads() Convert selected triangles to quads bpy.ops.mesh.uv_texture_add() Add UV Map bpy.ops.mesh.uv_texture_remove() Remove UV Map bpy.ops.mesh.uvs_mirror(axis=X) Mirror selected UVs Parameters axis (enum in [X, Y], (optional)) Axis, Axis to mirror UVs around bpy.ops.mesh.uvs_rotate(direction=CW) Rotate selected UVs Parameters direction (enum in [CW, CCW], (optional)) Direction, Direction to rotate UVs around bpy.ops.mesh.vertex_color_add() Add vertex color layer bpy.ops.mesh.vertex_color_remove() Remove vertex color layer bpy.ops.mesh.vertices_randomize() Randomize vertex order bpy.ops.mesh.vertices_smooth(repeat=1, xaxis=True, yaxis=True, zaxis=True) Flatten angles of selected vertices Parameters repeat (int in [1, 100], (optional)) Smooth Iterations xaxis (boolean, (optional)) X-Axis, Smooth along the X axis yaxis (boolean, (optional)) Y-Axis, Smooth along the Y axis zaxis (boolean, (optional)) Z-Axis, Smooth along the Z axis bpy.ops.mesh.vertices_sort() Sort vertex order Nla Operators bpy.ops.nla.action_sync_length(active=True) Synchronise the length of the referenced Action with the length used in the strip
108
Parameters active (boolean, (optional)) Active Strip Only, Only sync the active length for the active strip bpy.ops.nla.actionclip_add(action=) Add an Action-Clip strip (i.e. an NLA Strip referencing an Action) to the active track Parameters action (enum in [], (optional)) Action bpy.ops.nla.apply_scale() Apply scaling of selected strips to their referenced Actions bpy.ops.nla.bake(frame_start=1, frame_end=250, step=1, clear_consraints=False, bake_types={POSE}) Bake animation to an Action Parameters frame_start (int in [0, 300000], (optional)) Start Frame, Start frame for baking frame_end (int in [1, 300000], (optional)) End Frame, End frame for baking step (int in [1, 120], (optional)) Frame Step, Frame Step only_selected (boolean, (optional)) Only Selected clear_consraints (boolean, (optional)) Clear Constraints bake_types (enum set in {POSE, OBJECT}, (optional)) Bake Data File startup/bl_operators/anim.py:204 bpy.ops.nla.channels_click(extend=False) Handle clicks to select NLA channels Parameters extend (boolean, (optional)) Extend Select bpy.ops.nla.clear_scale() Reset scaling of selected strips bpy.ops.nla.click_select(extend=False) Handle clicks to select NLA Strips Parameters extend (boolean, (optional)) Extend Select bpy.ops.nla.delete() Delete selected strips bpy.ops.nla.delete_tracks() Delete selected NLA-Tracks and the strips they contain bpy.ops.nla.duplicate(mode=TRANSLATION) Duplicate selected NLA-Strips, adding the new strips in new tracks above the originals Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.nla.fmodifier_add(type=NULL, only_active=False) Add a F-Modier of the specied type to the selected NLA-Strips Parameters only_selected=True,
109
type (enum in [NULL, GENERATOR, FNGENERATOR, ENVELOPE, CYCLES, NOISE, FILTER, LIMITS, STEPPED], (optional)) Type only_active (boolean, (optional)) Only Active, Only add a F-Modier of the specied type to the active strip bpy.ops.nla.fmodifier_copy() Copy the F-Modier(s) of the active NLA-Strip bpy.ops.nla.fmodifier_paste() Add copied F-Modiers to the selected NLA-Strips bpy.ops.nla.meta_add() Add new meta-strips incorporating the selected strips bpy.ops.nla.meta_remove() Separate out the strips held by the selected meta-strips bpy.ops.nla.move_down() Move selected strips down a track if theres room bpy.ops.nla.move_up() Move selected strips up a track if theres room bpy.ops.nla.mute_toggle() Mute or un-mute selected strips bpy.ops.nla.properties() Toggle display properties panel bpy.ops.nla.select_all_toggle(invert=False) (De)Select all NLA-Strips Parameters invert (boolean, (optional)) Invert bpy.ops.nla.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True, axis_range=False) Use box selection to grab NLA-Strips Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst axis_range (boolean, (optional)) Axis Range bpy.ops.nla.select_leftright(mode=CHECK, extend=False) Select strips to the left or the right of the current frame Parameters mode (enum in [CHECK, LEFT, RIGHT], (optional)) Mode extend (boolean, (optional)) Extend Select bpy.ops.nla.snap(type=CFRA) Move start of strips to specied time 110 Chapter 2. Application Modules
Parameters type (enum in [CFRA, NEAREST_FRAME, NEAREST_SECOND, NEAREST_MARKER], (optional)) Type bpy.ops.nla.soundclip_add() Add a strip for controlling when speaker plays its sound clip bpy.ops.nla.split() Split selected strips at their midpoints bpy.ops.nla.swap() Swap order of selected strips within tracks bpy.ops.nla.tracks_add(above_selected=False) Add NLA-Tracks above/after the selected tracks Parameters above_selected (boolean, (optional)) Above Selected, Add a new NLA Track above every existing selected one bpy.ops.nla.transition_add() Add a transition strip between two adjacent selected strips bpy.ops.nla.tweakmode_enter() Enter tweaking mode for the action referenced by the active strip bpy.ops.nla.tweakmode_exit() Exit tweaking mode for the action referenced by the active strip bpy.ops.nla.view_all() Reset viewable area to show full strips range bpy.ops.nla.view_selected() Reset viewable area to show selected strips range Node Operators bpy.ops.node.add_file(lepath=, lter_blender=False, lter_image=True, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, name=Image) Add a le node to the current node editor Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders
111
lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le name (string, (optional)) Name, Datablock name to assign bpy.ops.node.backimage_move() Move Node backdrop bpy.ops.node.backimage_sample() Undocumented (contribute) bpy.ops.node.backimage_zoom(factor=1.2) Undocumented (contribute) Parameters factor (oat in [0, 10], (optional)) Factor bpy.ops.node.delete() Delete selected nodes bpy.ops.node.delete_reconnect() Delete nodes; will reconnect nodes as if deletion was muted bpy.ops.node.duplicate(keep_inputs=False) Duplicate selected nodes Parameters keep_inputs (boolean, (optional)) Keep Inputs, Keep the input links to duplicated nodes bpy.ops.node.duplicate_move(NODE_OT_duplicate=None, TRANSFORM_OT_translate=None) Undocumented (contribute) Parameters NODE_OT_duplicate (NODE_OT_duplicate, (optional)) Duplicate Nodes, Duplicate selected nodes TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.node.duplicate_move_keep_inputs(NODE_OT_duplicate=None, FORM_OT_translate=None) Undocumented (contribute) Parameters NODE_OT_duplicate (NODE_OT_duplicate, (optional)) Duplicate Nodes, Duplicate selected nodes TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.node.group_edit() Edit node group bpy.ops.node.group_make() Make group from selected nodes bpy.ops.node.group_socket_add(in_out=SOCK_IN, name=, type=VALUE) Add node group socket Parameters in_out (enum in [SOCK_IN, SOCK_OUT], (optional)) Socket Type, Input or Output name (string, (optional)) Name, Group socket name TRANS-
112
type (enum in [VALUE, VECTOR, RGBA], (optional)) Type, Type of the group socket bpy.ops.node.group_socket_move_down(index=0, in_out=SOCK_IN) Move down node group socket Parameters index (int in [0, inf], (optional)) Index in_out (enum in [SOCK_IN, SOCK_OUT], (optional)) Socket Type, Input or Output bpy.ops.node.group_socket_move_up(index=0, in_out=SOCK_IN) Move up node group socket Parameters index (int in [0, inf], (optional)) Index in_out (enum in [SOCK_IN, SOCK_OUT], (optional)) Socket Type, Input or Output bpy.ops.node.group_socket_remove(index=0, in_out=SOCK_IN) Remove a node group socket Parameters index (int in [0, inf], (optional)) Index in_out (enum in [SOCK_IN, SOCK_OUT], (optional)) Socket Type, Input or Output bpy.ops.node.group_ungroup() Ungroup selected nodes bpy.ops.node.hide_socket_toggle() Toggle unused node socket display bpy.ops.node.hide_toggle() Toggle hiding of selected nodes bpy.ops.node.link() Undocumented (contribute) bpy.ops.node.link_make(replace=False) Makes a link between selected output in input sockets Parameters replace (boolean, (optional)) Replace, Replace socket connections with the new links bpy.ops.node.link_viewer() Link to viewer node bpy.ops.node.links_cut(path=None, cursor=9) Undocumented (contribute) Parameters path (bpy_prop_collection of OperatorMousePath, (optional)) path cursor (int in [0, inf], (optional)) Cursor bpy.ops.node.mute_toggle() Toggle muting of the nodes bpy.ops.node.new_node_tree(type=COMPOSITING, name=NodeTree) Undocumented (contribute) Parameters type (enum in [SHADER, TEXTURE, COMPOSITING], (optional)) Tree Type
113
SHADER Shader, Shader nodes. TEXTURE Texture, Texture nodes. COMPOSITING Compositing, Compositing nodes. name (string, (optional)) Name bpy.ops.node.preview_toggle() Toggle preview display for selected nodes bpy.ops.node.properties() Toggles the properties panel display bpy.ops.node.read_fullsamplelayers() Undocumented (contribute) bpy.ops.node.read_renderlayers() Undocumented (contribute) bpy.ops.node.render_changed() Undocumented (contribute) bpy.ops.node.resize() Undocumented (contribute) bpy.ops.node.select(mouse_x=0, mouse_y=0, extend=False) Select the node under the cursor Parameters mouse_x (int in [-inf, inf], (optional)) Mouse X mouse_y (int in [-inf, inf], (optional)) Mouse Y extend (boolean, (optional)) Extend bpy.ops.node.select_all() (De)select all nodes bpy.ops.node.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True, tweak=False) Use box selection to select nodes Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst tweak (boolean, (optional)) Tweak, Only activate when mouse is not over a node - useful for tweak gesture bpy.ops.node.select_link_viewer(NODE_OT_select=None, NODE_OT_link_viewer=None) Undocumented (contribute) Parameters
114
NODE_OT_select (NODE_OT_select, (optional)) Select, Select the node under the cursor NODE_OT_link_viewer (NODE_OT_link_viewer, (optional)) Link to Viewer Node, Link to viewer node bpy.ops.node.select_linked_from() Select nodes linked from the selected ones bpy.ops.node.select_linked_to() Select nodes linked to the selected ones bpy.ops.node.select_same_type() Select all the nodes of the same type bpy.ops.node.select_same_type_next() Select the next node of the same type bpy.ops.node.select_same_type_prev() Select the prev node of the same type bpy.ops.node.show_cyclic_dependencies() Sort the nodes and show the cyclic dependencies between the nodes bpy.ops.node.view_all() Resize view so you can see all nodes bpy.ops.node.visibility_toggle(mouse_x=0, mouse_y=0) Handle clicks on node header buttons Parameters mouse_x (int in [-inf, inf], (optional)) Mouse X mouse_y (int in [-inf, inf], (optional)) Mouse Y Object Operators bpy.ops.object.add(type=EMPTY, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add an object to the scene Parameters type (enum in [MESH, CURVE, SURFACE, META, FONT, ARMATURE, LATTICE, EMPTY, CAMERA, LAMP, SPEAKER], (optional)) Type view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer
115
bpy.ops.object.add_named(linked=False, name=Cube) Add named object Parameters linked (boolean, (optional)) Linked, Duplicate object but not object data, linking to the original data name (string, (optional)) Name, Object name to add bpy.ops.object.add_named_cursor(name=Cube, VIEW3D_OT_cursor3d=None, JECT_OT_add_named=None) Undocumented (contribute) Parameters name (string, (optional)) Name, Object name to add VIEW3D_OT_cursor3d (VIEW3D_OT_cursor3d, (optional)) Set 3D Cursor, Set the location of the 3D cursor OBJECT_OT_add_named (OBJECT_OT_add_named, (optional)) Add Named Object, Add named object bpy.ops.object.align(bb_quality=True, align_axis=set()) Align Objects Parameters bb_quality (boolean, (optional)) High Quality, Enables high quality calculation of the bounding box for perfect results on complex shape meshes with rotation/scale (Slow) align_mode (enum in [OPT_1, OPT_2, OPT_3], (optional)) Align Mode: relative_to (enum in [OPT_1, OPT_2, OPT_3, OPT_4], (optional)) Relative To: align_axis (enum set in {X, Y, Z}, (optional)) Align, Align to axis File startup/bl_operators/object_align.py:387 bpy.ops.object.anim_transforms_to_deltas() Convert object animation for normal transforms to delta transforms File startup/bl_operators/object.py:701 bpy.ops.object.armature_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add an armature object to the scene Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer align_mode=OPT_2, relative_to=OPT_4, OB-
116
bpy.ops.object.bake_image() Bake image textures of selected objects bpy.ops.object.camera_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add a camera object to the scene Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.constraint_add(type=) Add a constraint to the active object Parameters type (enum in [CAMERA_SOLVER, FOLLOW_TRACK, COPY_LOCATION, COPY_ROTATION, COPY_SCALE, COPY_TRANSFORMS, LIMIT_DISTANCE, LIMIT_LOCATION, LIMIT_ROTATION, LIMIT_SCALE, MAINTAIN_VOLUME, TRANSFORM, CLAMP_TO, DAMPED_TRACK, IK, LOCKED_TRACK, SPLINE_IK, STRETCH_TO, TRACK_TO, ACTION, CHILD_OF, FLOOR, FOLLOW_PATH, PIVOT, RIGID_BODY_JOINT, SCRIPT, SHRINKWRAP], (optional)) Type CAMERA_SOLVER Camera Solver. FOLLOW_TRACK Follow Track. COPY_LOCATION Copy Location. COPY_ROTATION Copy Rotation. COPY_SCALE Copy Scale. COPY_TRANSFORMS Copy Transforms. LIMIT_DISTANCE Limit Distance. LIMIT_LOCATION Limit Location. LIMIT_ROTATION Limit Rotation. LIMIT_SCALE Limit Scale. MAINTAIN_VOLUME Maintain Volume. TRANSFORM Transformation. CLAMP_TO Clamp To. DAMPED_TRACK Damped Track, Tracking by taking the shortest path. IK Inverse Kinematics. LOCKED_TRACK Locked Track, Tracking along a single axis. SPLINE_IK Spline IK.
117
STRETCH_TO Stretch To. TRACK_TO Track To, Legacy tracking constraint prone to twisting artifacts. ACTION Action. CHILD_OF Child Of. FLOOR Floor. FOLLOW_PATH Follow Path. PIVOT Pivot. RIGID_BODY_JOINT Rigid Body Joint. SCRIPT Script. SHRINKWRAP Shrinkwrap. bpy.ops.object.constraint_add_with_targets(type=) Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones Parameters type (enum in [CAMERA_SOLVER, FOLLOW_TRACK, COPY_LOCATION, COPY_ROTATION, COPY_SCALE, COPY_TRANSFORMS, LIMIT_DISTANCE, LIMIT_LOCATION, LIMIT_ROTATION, LIMIT_SCALE, MAINTAIN_VOLUME, TRANSFORM, CLAMP_TO, DAMPED_TRACK, IK, LOCKED_TRACK, SPLINE_IK, STRETCH_TO, TRACK_TO, ACTION, CHILD_OF, FLOOR, FOLLOW_PATH, PIVOT, RIGID_BODY_JOINT, SCRIPT, SHRINKWRAP], (optional)) Type CAMERA_SOLVER Camera Solver. FOLLOW_TRACK Follow Track. COPY_LOCATION Copy Location. COPY_ROTATION Copy Rotation. COPY_SCALE Copy Scale. COPY_TRANSFORMS Copy Transforms. LIMIT_DISTANCE Limit Distance. LIMIT_LOCATION Limit Location. LIMIT_ROTATION Limit Rotation. LIMIT_SCALE Limit Scale. MAINTAIN_VOLUME Maintain Volume. TRANSFORM Transformation. CLAMP_TO Clamp To. DAMPED_TRACK Damped Track, Tracking by taking the shortest path. IK Inverse Kinematics. LOCKED_TRACK Locked Track, Tracking along a single axis. SPLINE_IK Spline IK. STRETCH_TO Stretch To. TRACK_TO Track To, Legacy tracking constraint prone to twisting artifacts. ACTION Action.
118
CHILD_OF Child Of. FLOOR Floor. FOLLOW_PATH Follow Path. PIVOT Pivot. RIGID_BODY_JOINT Rigid Body Joint. SCRIPT Script. SHRINKWRAP Shrinkwrap. bpy.ops.object.constraints_clear() Clear all the constraints for the active Object only bpy.ops.object.constraints_copy() Copy constraints to other selected objects bpy.ops.object.convert(target=MESH, keep_original=False) Convert selected objects to another type Parameters target (enum in [CURVE, MESH], (optional)) Target, Type of object to convert to keep_original (boolean, (optional)) Keep Original, Keep original objects instead of replacing them bpy.ops.object.delete(use_global=False) Delete selected objects Parameters use_global (boolean, (optional)) Delete Globally, Remove object from all scenes bpy.ops.object.drop_named_material(name=Material) Undocumented (contribute) Parameters name (string, (optional)) Name, Material name to assign bpy.ops.object.duplicate(linked=False, mode=TRANSLATION) Duplicate selected objects Parameters linked (boolean, (optional)) Linked, Duplicate object but not object data, linking to the original data mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.object.duplicate_move(OBJECT_OT_duplicate=None, FORM_OT_translate=None) Undocumented (contribute) Parameters OBJECT_OT_duplicate (OBJECT_OT_duplicate, (optional)) Duplicate Objects, Duplicate selected objects TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items TRANS-
119
TRANS-
OBJECT_OT_duplicate (OBJECT_OT_duplicate, (optional)) Duplicate Objects, Duplicate selected objects TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) Translate, Translate selected items bpy.ops.object.duplicates_make_real(use_base_parent=False, use_hierarchy=False) Make dupli objects attached to this object real Parameters use_base_parent (boolean, (optional)) Parent, Parent newly created objects to the original duplicator use_hierarchy (boolean, (optional)) Keep Hierarchy, Maintain parent child relationships bpy.ops.object.editmode_toggle() Toggle objects editmode bpy.ops.object.effector_add(type=FORCE, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add an empty object with a physics effector to the scene Parameters type (enum in [FORCE, WIND, VORTEX, MAGNET, HARMONIC, CHARGE, LENNARDJ, TEXTURE, GUIDE, BOID, TURBULENCE, DRAG], (optional)) Type view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.explode_refresh(modier=) Refresh data in the Explode modier Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.forcefield_toggle() Toggle objects force eld bpy.ops.object.game_property_clear() Undocumented (contribute) bpy.ops.object.game_property_copy(operation=COPY, property=) Undocumented (contribute) Parameters
120
operation (enum in [REPLACE, MERGE, COPY], (optional)) Operation property (enum in [], (optional)) Property, Properties to copy bpy.ops.object.game_property_new() Create a new property available to the game engine bpy.ops.object.game_property_remove(index=0) Remove game property Parameters index (int in [0, inf], (optional)) Index, Property index to remove bpy.ops.object.group_add() Add an object to a new group bpy.ops.object.group_instance_add(group=, view_align=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add a dupligroup instance Parameters group (enum in [], (optional)) Group view_align (boolean, (optional)) Align to View, Align the new object to the view location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.group_link(group=) Add an object to an existing group Parameters group (enum in [], (optional)) Group bpy.ops.object.group_remove() Undocumented (contribute) bpy.ops.object.hide_render_clear() Reveal the render object by setting the hide render ag bpy.ops.object.hide_render_clear_all() Reveal all render objects by setting the hide render ag File startup/bl_operators/object.py:684 bpy.ops.object.hide_render_set(unselected=False) Hide the render object by setting the hide render ag Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected objects bpy.ops.object.hide_view_clear() Reveal the object by setting the hide ag bpy.ops.object.hide_view_set(unselected=False) Hide the object by setting the hide ag Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected objects
121
bpy.ops.object.hook_add_newob() Hook selected vertices to the rst selected Object bpy.ops.object.hook_add_selob() Hook selected vertices to the rst selected Object bpy.ops.object.hook_assign(modier=) Assign the selected vertices to a hook Parameters modier (enum in [], (optional)) Modier, Modier number to assign to bpy.ops.object.hook_recenter(modier=) Set hook center to cursor position Parameters modier (enum in [], (optional)) Modier, Modier number to assign to bpy.ops.object.hook_remove(modier=) Remove a hook from the active object Parameters modier (enum in [], (optional)) Modier, Modier number to remove bpy.ops.object.hook_reset(modier=) Recalculate and clear offset transformation Parameters modier (enum in [], (optional)) Modier, Modier number to assign to bpy.ops.object.hook_select(modier=) Select affected vertices on mesh Parameters modier (enum in [], (optional)) Modier, Modier number to remove bpy.ops.object.isolate_type_render() Hide unselected render objects of same type as active by setting the hide render ag File startup/bl_operators/object.py:664 bpy.ops.object.join() Join selected objects into active object bpy.ops.object.join_shapes() Merge selected objects to shapes of active object bpy.ops.object.join_uvs() Copy UV Layout to objects with matching geometry File startup/bl_operators/object.py:578 bpy.ops.object.lamp_add(type=POINT, view_align=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add a lamp object to the scene Parameters type (enum in [POINT, SUN, SPOT, HEMI, AREA], (optional)) Type POINT Point, Omnidirectional point light source. SUN Sun, Constant direction parallel ray light source. SPOT Spot, Directional cone light source. HEMI Hemi, 180 degree constant light source. AREA Area, Directional area light source.
122
view_align (boolean, (optional)) Align to View, Align the new object to the view location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.location_clear() Clear the objects location bpy.ops.object.logic_bricks_copy() Copy logic bricks to other selected objects bpy.ops.object.make_dupli_face() Make linked objects into dupli-faces File startup/bl_operators/object.py:652 bpy.ops.object.make_links_data(type=OBDATA) Make links from the active object to other selected objects Parameters type (enum in [OBDATA, MATERIAL, ANIMATION, DUPLIGROUP, MODIFIERS], (optional)) Type bpy.ops.object.make_links_scene(scene=) Link selection to another scene Parameters scene (enum in [], (optional)) Scene bpy.ops.object.make_local(type=SELECTED_OBJECTS) Make library linked datablocks local to this le Parameters type (enum in [SELECTED_OBJECTS, SELECTED_OBJECTS_DATA, ALL], (optional)) Type bpy.ops.object.make_single_user(type=SELECTED_OBJECTS, object=False, obdata=False, material=False, texture=False, animation=False) Make linked data local to each object Parameters type (enum in [SELECTED_OBJECTS, ALL], (optional)) Type object (boolean, (optional)) Object, Make single user objects obdata (boolean, (optional)) Object Data, Make single user object data material (boolean, (optional)) Materials, Make materials local to each datablock texture (boolean, (optional)) Textures, Make textures local to each material animation (boolean, (optional)) Object Animation, Make animation data local to each object bpy.ops.object.material_slot_add() Add a new material slot bpy.ops.object.material_slot_assign() Assign the material in the selected material slot to the selected vertices bpy.ops.object.material_slot_copy() Copies materials to other selected objects
123
bpy.ops.object.material_slot_deselect() Deselect vertices assigned to the selected material slot bpy.ops.object.material_slot_remove() Remove the selected material slot bpy.ops.object.material_slot_select() Select vertices assigned to the selected material slot bpy.ops.object.meshdeform_bind(modier=) Bind mesh to cage in mesh deform modier Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.metaball_add(type=BALL, view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add an metaball object to the scene Parameters type (enum in [BALL, CAPSULE, PLANE, ELLIPSOID, CUBE], (optional)) Primitive view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.mode_set(mode=OBJECT, toggle=False) Sets the object interaction mode Parameters mode (enum in [OBJECT, EDIT, SCULPT, VERTEX_PAINT, WEIGHT_PAINT, TEXTURE_PAINT, PARTICLE_EDIT, POSE], (optional)) Mode toggle (boolean, (optional)) Toggle bpy.ops.object.modifier_add(type=SUBSURF) Add a modier to the active object Parameters type (enum in [UV_PROJECT, VERTEX_WEIGHT_EDIT, VERTEX_WEIGHT_MIX, VERTEX_WEIGHT_PROXIMITY, ARRAY, BEVEL, BOOLEAN, BUILD, DECIMATE, EDGE_SPLIT, MASK, MIRROR, MULTIRES, SCREW, SOLIDIFY, SUBSURF, ARMATURE, CAST, CURVE, DISPLACE, HOOK, LATTICE, MESH_DEFORM, SHRINKWRAP, SIMPLE_DEFORM, SMOOTH, WARP, WAVE, CLOTH, COLLISION, DYNAMIC_PAINT, EXPLODE, FLUID_SIMULATION, OCEAN, PARTICLE_INSTANCE, PARTICLE_SYSTEM, SMOKE, SOFT_BODY, SURFACE], (optional)) Type bpy.ops.object.modifier_apply(apply_as=DATA, modier=) Apply modier and remove from the stack Parameters
124
apply_as (enum in [DATA, SHAPE], (optional)) Apply as, How to apply the modier to the geometry DATA Object Data, Apply modier to the objects data. SHAPE New Shape, Apply deform-only modier to a new shape on this object. modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.modifier_convert(modier=) Convert particles to a mesh object Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.modifier_copy(modier=) Duplicate modier at the same position in the stack Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.modifier_move_down(modier=) Move modier down in the stack Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.modifier_move_up(modier=) Move modier up in the stack Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.modifier_remove(modier=) Remove a modier from the active object Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.move_to_layer(layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Move the object to different layers Parameters layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.multires_base_apply(modier=) Modify the base mesh to conform to the displaced mesh Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.multires_external_pack() Pack displacements from an external le bpy.ops.object.multires_external_save(lepath=, check_existing=True, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=True, lter_collada=False, lter_folder=True, lemode=9, relative_path=True, modier=) Save displacements to an external le Parameters lepath (string, (optional)) File Path, Path to le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les lter_blender (boolean, (optional)) Filter .blend les 2.3. Operators (bpy.ops) 125
lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.multires_higher_levels_delete(modier=) Deletes the higher resolution mesh, potential loss of detail Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.multires_reshape(modier=) Copy vertex coordinates from other object Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.multires_subdivide(modier=) Add a new level of subdivision Parameters modier (string, (optional)) Modier, Name of the modier to edit bpy.ops.object.ocean_bake(modier=, free=False) Bake an image sequence of ocean data Parameters modier (string, (optional)) Modier, Name of the modier to edit free (boolean, (optional)) Free, Free the bake, rather than generating it bpy.ops.object.origin_clear() Clear the objects origin bpy.ops.object.origin_set(type=GEOMETRY_ORIGIN, center=MEDIAN) Set the objects origin, by either moving the data, or set to center of data, or use 3d cursor Parameters type (enum in [GEOMETRY_ORIGIN, ORIGIN_GEOMETRY, ORIGIN_CURSOR], (optional)) Type GEOMETRY_ORIGIN Geometry to Origin, Move object geometry to object origin. ORIGIN_GEOMETRY Origin to Geometry, Move object origin to center of object geometry. ORIGIN_CURSOR Origin to 3D Cursor, Move object origin to position of the 3d cursor. center (enum in [MEDIAN, BOUNDS], (optional)) Center
126
bpy.ops.object.parent_clear(type=CLEAR) Clear the objects parenting Parameters type (enum in [CLEAR, CLEAR_KEEP_TRANSFORM, CLEAR_INVERSE], (optional)) Type bpy.ops.object.parent_no_inverse_set() Set the objects parenting without setting the inverse parent correction bpy.ops.object.parent_set(type=OBJECT) Set the objects parenting Parameters type (enum in [OBJECT, ARMATURE, ARMATURE_NAME, ARMATURE_AUTO, ARMATURE_ENVELOPE, BONE, CURVE, FOLLOW, PATH_CONST, LATTICE, VERTEX, TRIA], (optional)) Type bpy.ops.object.particle_system_add() Add a particle system bpy.ops.object.particle_system_remove() Remove the selected particle system bpy.ops.object.paths_calculate() Calculate paths for the selected bones bpy.ops.object.paths_clear() Clear path caches for selected bones bpy.ops.object.posemode_toggle() Enable or disable posing/selecting bones bpy.ops.object.proxy_make(object=, type=DEFAULT) Add empty object to become local replacement data of a library-linked object Parameters object (string, (optional)) Proxy Object, Name of lib-linked/grouped object to make a proxy for type (enum in [DEFAULT], (optional)) Type, Group object bpy.ops.object.quick_explode(style=EXPLODE, amount=100, frame_duration=50, frame_start=1, frame_end=10, velocity=1.0, fade=True) Undocumented (contribute) Parameters style (enum in [EXPLODE, BLEND], (optional)) Explode Style amount (int in [2, 10000], (optional)) Amount of pieces frame_duration (int in [1, 300000], (optional)) Duration frame_start (int in [1, 300000], (optional)) Start Frame frame_end (int in [1, 300000], (optional)) End Frame velocity (oat in [0, 300000], (optional)) Outwards Velocity fade (boolean, (optional)) Fade, Fade the pieces over time File startup/bl_operators/object_quick_effects.py:163 bpy.ops.object.quick_fluid(style=BASIC, initial_velocity=(0.0, 0.0, 0.0), show_ows=False, start_baking=False) Undocumented (contribute)
127
Parameters style (enum in [INFLOW, BASIC], (optional)) Fluid Style initial_velocity (oat array of 3 items in [-100, 100], (optional)) Initial Velocity, Initial velocity of the uid show_ows (boolean, (optional)) Render Fluid Objects, Keep the uid objects visible during rendering start_baking (boolean, (optional)) Start Fluid Bake, Start baking the uid immediately after creating the domain object File startup/bl_operators/object_quick_effects.py:440 bpy.ops.object.quick_fur(density=MEDIUM, view_percentage=10, length=0.1) Undocumented (contribute) Parameters density (enum in [LIGHT, MEDIUM, HEAVY], (optional)) Fur Density view_percentage (int in [1, 100], (optional)) View % length (oat in [0.001, 100], (optional)) Length File startup/bl_operators/object_quick_effects.py:74 bpy.ops.object.quick_smoke(style=STREAM, show_ows=False) Undocumented (contribute) Parameters style (enum in [STREAM, PUFF, FIRE], (optional)) Smoke Style show_ows (boolean, (optional)) Render Smoke Objects, Keep the smoke objects visible during rendering File startup/bl_operators/object_quick_effects.py:313 bpy.ops.object.randomize_transform(random_seed=0, use_delta=False, use_loc=True, loc=(0.0, 0.0, 0.0), use_rot=True, rot=(0.0, 0.0, 0.0), use_scale=True, scale_even=False, scale=(1.0, 1.0, 1.0)) Randomize objects loc/rot/scale Parameters random_seed (int in [0, 10000], (optional)) Random Seed, Seed value for the random generator use_delta (boolean, (optional)) Transform Delta, Randomize delta transform values instead of regular transform use_loc (boolean, (optional)) Randomize Location, Randomize the location values loc (oat array of 3 items in [-100, 100], (optional)) Location, Maximun distance the objects can spread over each axis use_rot (boolean, (optional)) Randomize Rotation, Randomize the rotation values rot (oat array of 3 items in [-3.14159, 3.14159], (optional)) Rotation, Maximun rotation over each axis use_scale (boolean, (optional)) Randomize Scale, Randomize the scale values scale_even (boolean, (optional)) Scale Even, Use the same scale value for all axis
128
scale (oat array of 3 items in [-100, 100], (optional)) Scale, Maximum scale randomization over each axis File startup/bl_operators/object_randomize_transform.py:171 bpy.ops.object.rotation_clear() Clear the objects rotation bpy.ops.object.scale_clear() Clear the objects scale bpy.ops.object.select_all(action=TOGGLE) Change selection of all visible objects in scene Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.object.select_by_layer(extend=False, layers=1) Select all visible objects on a layer Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst layers (int in [1, 20], (optional)) Layer bpy.ops.object.select_by_type(extend=False, type=MESH) Select all visible objects that are of a type Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst type (enum in [MESH, CURVE, SURFACE, META, FONT, ARMATURE, LATTICE, EMPTY, CAMERA, LAMP, SPEAKER], (optional)) Type bpy.ops.object.select_camera() Select object matching a naming pattern File startup/bl_operators/object.py:113 bpy.ops.object.select_grouped(extend=False, type=CHILDREN_RECURSIVE) Select all visible objects grouped by various properties Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst type (enum in [CHILDREN_RECURSIVE, CHILDREN, PARENT, SIBLINGS, TYPE, LAYER, GROUP, HOOK, PASS, COLOR, PROPERTIES, KEYINGSET], (optional)) Type CHILDREN_RECURSIVE Children. CHILDREN Immediate Children.
129
PARENT Parent. SIBLINGS Siblings, Shared Parent. TYPE Type, Shared object type. LAYER Layer, Shared layers. GROUP Group, Shared group. HOOK Hook. PASS Pass, Render pass Index. COLOR Color, Object Color. PROPERTIES Properties, Game Properties. KEYINGSET Keying Set, Objects included in active Keying Set. bpy.ops.object.select_hierarchy(direction=PARENT, extend=False) Select object relative to the active objects positionin the hierarchy Parameters direction (enum in [PARENT, CHILD], (optional)) Direction, Direction to select in the hierarchy extend (boolean, (optional)) Extend, Extend the existing selection File startup/bl_operators/object.py:149 bpy.ops.object.select_inverse() Invert selection of all visible objects bpy.ops.object.select_linked(extend=False, type=OBDATA) Select all visible objects that are linked Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst type (enum in [OBDATA, MATERIAL, TEXTURE, DUPGROUP, PARTICLE, LIBRARY, LIBRARY_OBDATA], (optional)) Type bpy.ops.object.select_mirror(extend=False) Select the Mirror objects of the selected object eg. L.sword -> R.sword Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.object.select_name(name=, extend=False) Select an object with this name Parameters name (string, (optional)) Name, Object name to select extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.object.select_pattern(pattern=*, case_sensitive=False, extend=True) Select object matching a naming pattern Parameters pattern (string, (optional)) Pattern, Name lter using * and ? wildcard chars
130
case_sensitive (boolean, (optional)) Case Sensitive, Do a case sensitive compare extend (boolean, (optional)) Extend, Extend the existing selection File startup/bl_operators/object.py:49 bpy.ops.object.select_random(percent=50.0, extend=False) Set select on random visible objects Parameters percent (oat in [0, 100], (optional)) Percent, Percentage of objects to select randomly extend (boolean, (optional)) Extend Selection, Extend selection instead of deselecting everything rst bpy.ops.object.select_same_group(group=) Select object in the same group Parameters group (string, (optional)) Group, Name of the group to select bpy.ops.object.shade_flat() Display faces at bpy.ops.object.shade_smooth() Display faces smooth (using vertex normals) bpy.ops.object.shape_key_add(from_mix=True) Add shape key to the object Parameters from_mix (boolean, (optional)) From Mix, Create the new shape key from the existing mix of keys bpy.ops.object.shape_key_clear() Clear weights for all shape keys bpy.ops.object.shape_key_mirror() Undocumented (contribute) bpy.ops.object.shape_key_move(type=UP) Undocumented (contribute) Parameters type (enum in [UP, DOWN], (optional)) Type bpy.ops.object.shape_key_remove() Remove shape key from the object bpy.ops.object.shape_key_transfer(mode=OFFSET, use_clamp=False) Copy another selected objects active shape to this one by applying the relative offsets Parameters mode (enum in [OFFSET, RELATIVE_FACE, RELATIVE_EDGE], (optional)) Transformation Mode, Relative shape positions to the new shape method OFFSET Offset, Apply the relative positional offset. RELATIVE_FACE Relative Face, Calculate relative position (using faces). RELATIVE_EDGE Relative Edge, Calculate relative position (using edges). use_clamp (boolean, (optional)) Clamp Offset, Clamp the transformation to the distance each vertex moves in the original shape File startup/bl_operators/object.py:491
131
bpy.ops.object.slow_parent_clear() Clear the objects slow parent bpy.ops.object.slow_parent_set() Set the objects slow parent bpy.ops.object.speaker_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add a speaker object to the scene Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.subdivision_set(level=1, relative=False) Sets a Subdivision Surface Level (1-5) Parameters level (int in [-100, 100], (optional)) Level relative (boolean, (optional)) Relative, Apply the subsurf level as an offset relative to the current level File startup/bl_operators/object.py:217 bpy.ops.object.text_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Add a text object to the scene Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.object.track_clear(type=CLEAR) Clear tracking constraint or ag from object Parameters type (enum in [CLEAR, CLEAR_KEEP_TRANSFORM], (optional)) Type
132
bpy.ops.object.track_set(type=DAMPTRACK) Make the object track another object, either by constraint or old way or locked track Parameters type (enum in [DAMPTRACK, TRACKTO, LOCKTRACK], (optional)) Type bpy.ops.object.transform_apply(location=False, rotation=False, scale=False) Apply the objects transformation to its data Parameters location (boolean, (optional)) Location rotation (boolean, (optional)) Rotation scale (boolean, (optional)) Scale bpy.ops.object.vertex_group_add() Undocumented (contribute) bpy.ops.object.vertex_group_assign(new=False) Undocumented (contribute) Parameters new (boolean, (optional)) New, Assign vertex to new vertex group bpy.ops.object.vertex_group_blend() Undocumented (contribute) bpy.ops.object.vertex_group_clean(limit=0.01, all_groups=False, keep_single=False) Remove Vertex Group assignments which arent required Parameters limit (oat in [0, 1], (optional)) Limit, Remove weights under this limit all_groups (boolean, (optional)) All Groups, Clean all vertex groups keep_single (boolean, (optional)) Keep Single, Keep verts assigned to at least one group when cleaning bpy.ops.object.vertex_group_copy() Undocumented (contribute) bpy.ops.object.vertex_group_copy_to_linked() Copy Vertex Groups to all users of the same Geometry data bpy.ops.object.vertex_group_copy_to_selected() Copy Vertex Groups to other selected objects with matching indices bpy.ops.object.vertex_group_deselect() Undocumented (contribute) bpy.ops.object.vertex_group_fix(dist=0.0, strength=1.0, accuracy=1.0) Modify the position of selected vertices by changing only their respective groups weights (this tool may be slow for many vertices) Parameters dist (oat in [-inf, inf], (optional)) Distance, The distance to move to strength (oat in [-2, inf], (optional)) Strength, The distance moved can be changed by this multiplier accuracy (oat in [0.05, inf], (optional)) Change Sensitivity, Change the amount weights are altered with each iteration: lower values are slower
133
bpy.ops.object.vertex_group_invert(auto_assign=True, auto_remove=True) Undocumented (contribute) Parameters auto_assign (boolean, (optional)) Add Weights, Add verts from groups that have zero weight before inverting auto_remove (boolean, (optional)) Remove Weights, Remove verts from groups that have zero weight after inverting bpy.ops.object.vertex_group_levels(offset=0.0, gain=1.0) Undocumented (contribute) Parameters offset (oat in [-1, 1], (optional)) Offset, Value to add to weights gain (oat in [0, inf], (optional)) Gain, Value to multiply weights by bpy.ops.object.vertex_group_lock(action=TOGGLE) Undocumented (contribute) Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.object.vertex_group_mirror(mirror_weights=True, ip_group_names=True, all_groups=False) Mirror all vertex groups, ip weights and/or names, editing only selected vertices, ipping when both sides are selected otherwise copy from unselected Parameters mirror_weights (boolean, (optional)) Mirror Weights, Mirror weights ip_group_names (boolean, (optional)) Flip Groups, Flip vertex group names all_groups (boolean, (optional)) All Groups, Mirror all vertex groups weights bpy.ops.object.vertex_group_move(direction=UP) Undocumented (contribute) Parameters direction (enum in [UP, DOWN], (optional)) Direction, Direction to move, UP or DOWN bpy.ops.object.vertex_group_normalize() Undocumented (contribute) bpy.ops.object.vertex_group_normalize_all(lock_active=True) Undocumented (contribute) Parameters lock_active (boolean, (optional)) Lock Active, Keep the values of the active group while normalizing others bpy.ops.object.vertex_group_remove(all=False) Undocumented (contribute) Parameters all (boolean, (optional)) All, Remove from all vertex groups
134
bpy.ops.object.vertex_group_remove_from(all=False) Undocumented (contribute) Parameters all (boolean, (optional)) All, Remove from all vertex groups bpy.ops.object.vertex_group_select() Undocumented (contribute) bpy.ops.object.vertex_group_set_active(group=) Set the active vertex group Parameters group (enum in [], (optional)) Group, Vertex group to set as active bpy.ops.object.vertex_group_sort() Sorts vertex groups alphabetically bpy.ops.object.vertex_parent_set() Parent selected objects to the selected vertices bpy.ops.object.visual_transform_apply() Apply the objects visual transformation to its data Outliner Operators bpy.ops.outliner.action_set(action=) Change the active action used Parameters action (enum in [], (optional)) Action bpy.ops.outliner.animdata_operation(type=SET_ACT) Undocumented (contribute) Parameters type (enum in [SET_ACT, CLEAR_ACT, CLEAR_DRIVERS], (optional)) Animation Operation bpy.ops.outliner.data_operation(type=SELECT) Undocumented (contribute) Parameters type (enum in [SELECT, DESELECT, HIDE, UNHIDE], (optional)) Data Operation bpy.ops.outliner.drivers_add_selected() Add drivers to selected items bpy.ops.outliner.drivers_delete_selected() Delete drivers assigned to selected items bpy.ops.outliner.expanded_toggle() Expand/Collapse all items bpy.ops.outliner.group_operation(type=UNLINK) Undocumented (contribute) Parameters type (enum in [UNLINK, LOCAL, LINK, TOGVIS, TOGSEL, TOGREN, RENAME], (optional)) Group Operation bpy.ops.outliner.id_operation(type=UNLINK) Undocumented (contribute) Parameters type (enum in [UNLINK, LOCAL, SINGLE, ADD_FAKE, CLEAR_FAKE, RENAME], (optional)) ID data Operation UNLINK Unlink. REFRESH_DRIVERS,
135
LOCAL Make Local. SINGLE Make Single User. ADD_FAKE Add Fake User, Ensure datablock gets saved even if it isnt in use (e.g. for motion and material libraries). CLEAR_FAKE Clear Fake User. RENAME Rename. bpy.ops.outliner.item_activate(extend=True) Handle mouse clicks to activate/select items Parameters extend (boolean, (optional)) Extend, Extend selection for activation bpy.ops.outliner.item_openclose(all=True) Toggle whether item under cursor is enabled or closed Parameters all (boolean, (optional)) All, Close or open all items bpy.ops.outliner.item_rename() Rename item under cursor bpy.ops.outliner.keyingset_add_selected() Add selected items (blue-grey rows) to active Keying Set bpy.ops.outliner.keyingset_remove_selected() Remove selected items (blue-grey rows) from active Keying Set bpy.ops.outliner.object_operation(type=SELECT) Undocumented (contribute) Parameters type (enum in [SELECT, DESELECT, DELETE, TOGVIS, TOGSEL, TOGREN, RENAME], (optional)) Object Operation bpy.ops.outliner.operation() Context menu for item operations bpy.ops.outliner.renderability_toggle() Toggle the renderability of selected items bpy.ops.outliner.scroll_page(up=False) Scroll page up or down Parameters up (boolean, (optional)) Up, Scroll up one page bpy.ops.outliner.selectability_toggle() Toggle the selectability bpy.ops.outliner.selected_toggle() Toggle the Outliner selection of items bpy.ops.outliner.show_active() Adjust the view so that the active Object is shown centered bpy.ops.outliner.show_hierarchy() Open all object entries and close all others bpy.ops.outliner.show_one_level(open=True) Expand/collapse all entries by one level Parameters open (boolean, (optional)) Open, Expand all entries one level deep bpy.ops.outliner.visibility_toggle() Toggle the visibility of selected items
136
Paint Operators bpy.ops.paint.clone_cursor_set(location=(0.0, 0.0, 0.0)) Undocumented (contribute) Parameters location (oat array of 3 items in [-inf, inf], (optional)) Location, Cursor location in world space coordinates bpy.ops.paint.face_select_all(action=TOGGLE) Change selection for all faces Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.paint.face_select_hide(unselected=False) Hide selected faces Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected objects bpy.ops.paint.face_select_inverse() Invert selection of faces bpy.ops.paint.face_select_linked() Select linked faces bpy.ops.paint.face_select_linked_pick(extend=False) Select linked faces Parameters extend (boolean, (optional)) Extend, Extend the existing selection bpy.ops.paint.face_select_reveal(unselected=False) Reveal hidden faces Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected objects bpy.ops.paint.grab_clone(delta=(0.0, 0.0)) Undocumented (contribute) Parameters delta (oat array of 2 items in [-inf, inf], (optional)) Delta, Delta offset of clone image in 0.0..1.0 coordinates bpy.ops.paint.image_from_view(lepath=) Make an image from the current 3D view for re-projection Parameters lepath (string, (optional)) File Path, Name of the le bpy.ops.paint.image_paint(stroke=None) Undocumented (contribute) Parameters stroke (bpy_prop_collection of OperatorStrokeElement, (optional)) Stroke bpy.ops.paint.project_image(image=) Project an edited render from the active camera back onto the object
137
Parameters image (enum in [], (optional)) Image bpy.ops.paint.sample_color(location=(0, 0)) Undocumented (contribute) Parameters location (int array of 2 items in [0, inf], (optional)) Location, Cursor location in region coordinates bpy.ops.paint.texture_paint_toggle() Undocumented (contribute) bpy.ops.paint.vert_select_all(action=TOGGLE) Change selection for all vertices Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.paint.vert_select_inverse() Invert selection of vertices bpy.ops.paint.vertex_color_dirt(blur_strength=1.0, blur_iterations=1, dirt_angle=0.0, dirt_only=False) Undocumented (contribute) Parameters blur_strength (oat in [0.01, 1], (optional)) Blur Strength, Blur strength per iteration blur_iterations (int in [0, 40], (optional)) Blur Iterations, Number of times to blur the colors (higher blurs more) clean_angle (oat in [0, 180], (optional)) Highlight Angle, Less then 90 limits the angle used in the tonal range dirt_angle (oat in [0, 180], (optional)) Dirt Angle, Less then 90 limits the angle used in the tonal range dirt_only (boolean, (optional)) Dirt Only, Dont calculate cleans for convex areas File startup/bl_operators/vertexpaint_dirt.py:184 bpy.ops.paint.vertex_color_set() Undocumented (contribute) bpy.ops.paint.vertex_paint(stroke=None) Undocumented (contribute) Parameters stroke (bpy_prop_collection of OperatorStrokeElement, (optional)) Stroke bpy.ops.paint.vertex_paint_toggle() Undocumented (contribute) bpy.ops.paint.weight_from_bones(type=AUTOMATIC) Undocumented (contribute) Parameters type (enum in [AUTOMATIC, ENVELOPES], (optional)) Type, Method to use for assigning weights clean_angle=180.0,
138
AUTOMATIC Automatic, Automatic weights froms bones. ENVELOPES From Envelopes, Weights from envelopes with user dened radius. bpy.ops.paint.weight_paint(stroke=None) Undocumented (contribute) Parameters stroke (bpy_prop_collection of OperatorStrokeElement, (optional)) Stroke bpy.ops.paint.weight_paint_toggle() Undocumented (contribute) bpy.ops.paint.weight_sample() Undocumented (contribute) bpy.ops.paint.weight_sample_group(group=DEFAULT) Undocumented (contribute) Parameters group (enum in [DEFAULT], (optional)) Keying Set, The Keying Set to use bpy.ops.paint.weight_set() Undocumented (contribute) Particle Operators bpy.ops.particle.brush_edit(stroke=None) Undocumented (contribute) Parameters stroke (bpy_prop_collection of OperatorStrokeElement, (optional)) Stroke bpy.ops.particle.connect_hair(all=False) Connect hair to the emitter mesh Parameters all (boolean, (optional)) All hair, Connect all hair systems to the emitter mesh bpy.ops.particle.delete(type=PARTICLE) Undocumented (contribute) Parameters type (enum in [PARTICLE, KEY], (optional)) Type, Delete a full particle or only keys bpy.ops.particle.disconnect_hair(all=False) Disconnect hair from the emitter mesh Parameters all (boolean, (optional)) All hair, Disconnect all hair systems from the emitter mesh bpy.ops.particle.dupliob_copy() Duplicate the current dupliobject bpy.ops.particle.dupliob_move_down() Move dupli object down in the list bpy.ops.particle.dupliob_move_up() Move dupli object up in the list bpy.ops.particle.dupliob_remove() Remove the selected dupliobject bpy.ops.particle.edited_clear() Undocumented (contribute)
139
bpy.ops.particle.hide(unselected=False) Undocumented (contribute) Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected bpy.ops.particle.mirror() Undocumented (contribute) bpy.ops.particle.new() Add new particle settings bpy.ops.particle.new_target() Add a new particle target bpy.ops.particle.particle_edit_toggle() Undocumented (contribute) bpy.ops.particle.rekey(keys=2) Undocumented (contribute) Parameters keys (int in [2, inf], (optional)) Number of Keys bpy.ops.particle.remove_doubles(threshold=0.0002) Undocumented (contribute) Parameters threshold (oat in [0, inf], (optional)) Threshold, Threshold distance withing which particles are removed bpy.ops.particle.reveal() Undocumented (contribute) bpy.ops.particle.select_all(action=TOGGLE) Undocumented (contribute) Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.particle.select_inverse() Undocumented (contribute) bpy.ops.particle.select_less() Undocumented (contribute) bpy.ops.particle.select_linked(deselect=False, location=(0, 0)) Undocumented (contribute) Parameters deselect (boolean, (optional)) Deselect, Deselect linked keys rather than selecting them location (int array of 2 items in [0, inf], (optional)) Location bpy.ops.particle.select_more() Undocumented (contribute) bpy.ops.particle.select_roots() Undocumented (contribute)
140
bpy.ops.particle.select_tips() Undocumented (contribute) bpy.ops.particle.subdivide() Undocumented (contribute) bpy.ops.particle.target_move_down() Move particle target down in the list bpy.ops.particle.target_move_up() Move particle target up in the list bpy.ops.particle.target_remove() Remove the selected particle target bpy.ops.particle.weight_set(factor=1.0) Undocumented (contribute) Parameters factor (oat in [0, 1], (optional)) Factor Pose Operators bpy.ops.pose.armature_apply() Apply the current pose as the new rest pose bpy.ops.pose.armature_layers(layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Change the visible armature layers Parameters layers (boolean array of 32 items, (optional)) Layer, Armature layers to make visible bpy.ops.pose.autoside_names(axis=XAXIS) Automatically renames the selected bones according to which side of the target axis they fall on Parameters axis (enum in [XAXIS, YAXIS, ZAXIS], (optional)) Axis, Axis tag names with XAXIS X-Axis, Left/Right. YAXIS Y-Axis, Front/Back. ZAXIS Z-Axis, Top/Bottom. bpy.ops.pose.bone_layers(layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Change the layers that the selected bones belong to Parameters layers (boolean array of 32 items, (optional)) Layer, Armature layers that bone belongs to bpy.ops.pose.breakdown(prev_frame=0, next_frame=0, percentage=0.5) Create a suitable breakdown pose on the current frame Parameters prev_frame (int in [-300000, 300000], (optional)) Previous Keyframe, Frame number of keyframe immediately before the current frame next_frame (int in [-300000, 300000], (optional)) Next Keyframe, Frame number of keyframe immediately after the current frame
141
percentage (oat in [0, 1], (optional)) Percentage, Weighting factor for the sliding operation bpy.ops.pose.constraint_add(type=) Add a constraint to the active bone Parameters type (enum in [CAMERA_SOLVER, FOLLOW_TRACK, COPY_LOCATION, COPY_ROTATION, COPY_SCALE, COPY_TRANSFORMS, LIMIT_DISTANCE, LIMIT_LOCATION, LIMIT_ROTATION, LIMIT_SCALE, MAINTAIN_VOLUME, TRANSFORM, CLAMP_TO, DAMPED_TRACK, IK, LOCKED_TRACK, SPLINE_IK, STRETCH_TO, TRACK_TO, ACTION, CHILD_OF, FLOOR, FOLLOW_PATH, PIVOT, RIGID_BODY_JOINT, SCRIPT, SHRINKWRAP], (optional)) Type CAMERA_SOLVER Camera Solver. FOLLOW_TRACK Follow Track. COPY_LOCATION Copy Location. COPY_ROTATION Copy Rotation. COPY_SCALE Copy Scale. COPY_TRANSFORMS Copy Transforms. LIMIT_DISTANCE Limit Distance. LIMIT_LOCATION Limit Location. LIMIT_ROTATION Limit Rotation. LIMIT_SCALE Limit Scale. MAINTAIN_VOLUME Maintain Volume. TRANSFORM Transformation. CLAMP_TO Clamp To. DAMPED_TRACK Damped Track, Tracking by taking the shortest path. IK Inverse Kinematics. LOCKED_TRACK Locked Track, Tracking along a single axis. SPLINE_IK Spline IK. STRETCH_TO Stretch To. TRACK_TO Track To, Legacy tracking constraint prone to twisting artifacts. ACTION Action. CHILD_OF Child Of. FLOOR Floor. FOLLOW_PATH Follow Path. PIVOT Pivot. RIGID_BODY_JOINT Rigid Body Joint. SCRIPT Script. SHRINKWRAP Shrinkwrap. bpy.ops.pose.constraint_add_with_targets(type=) Add a constraint to the active bone, with target (where applicable) set to the selected Objects/Bones
142
Parameters type (enum in [CAMERA_SOLVER, FOLLOW_TRACK, COPY_LOCATION, COPY_ROTATION, COPY_SCALE, COPY_TRANSFORMS, LIMIT_DISTANCE, LIMIT_LOCATION, LIMIT_ROTATION, LIMIT_SCALE, MAINTAIN_VOLUME, TRANSFORM, CLAMP_TO, DAMPED_TRACK, IK, LOCKED_TRACK, SPLINE_IK, STRETCH_TO, TRACK_TO, ACTION, CHILD_OF, FLOOR, FOLLOW_PATH, PIVOT, RIGID_BODY_JOINT, SCRIPT, SHRINKWRAP], (optional)) Type CAMERA_SOLVER Camera Solver. FOLLOW_TRACK Follow Track. COPY_LOCATION Copy Location. COPY_ROTATION Copy Rotation. COPY_SCALE Copy Scale. COPY_TRANSFORMS Copy Transforms. LIMIT_DISTANCE Limit Distance. LIMIT_LOCATION Limit Location. LIMIT_ROTATION Limit Rotation. LIMIT_SCALE Limit Scale. MAINTAIN_VOLUME Maintain Volume. TRANSFORM Transformation. CLAMP_TO Clamp To. DAMPED_TRACK Damped Track, Tracking by taking the shortest path. IK Inverse Kinematics. LOCKED_TRACK Locked Track, Tracking along a single axis. SPLINE_IK Spline IK. STRETCH_TO Stretch To. TRACK_TO Track To, Legacy tracking constraint prone to twisting artifacts. ACTION Action. CHILD_OF Child Of. FLOOR Floor. FOLLOW_PATH Follow Path. PIVOT Pivot. RIGID_BODY_JOINT Rigid Body Joint. SCRIPT Script. SHRINKWRAP Shrinkwrap. bpy.ops.pose.constraints_clear() Clear all the constraints for the selected bones bpy.ops.pose.constraints_copy() Copy constraints to other selected bones bpy.ops.pose.copy() Copies the current pose of the selected bones to copy/paste buffer
143
bpy.ops.pose.flip_names() Flips (and corrects) the axis sufxes of the the names of selected bones bpy.ops.pose.group_add() Add a new bone group bpy.ops.pose.group_assign(type=0) Add selected bones to the chosen bone group Parameters type (int in [0, 10], (optional)) Bone Group Index bpy.ops.pose.group_deselect() Deselect bones of active Bone Group bpy.ops.pose.group_move(direction=UP) Change position of active Bone Group in list of Bone Groups Parameters direction (enum in [UP, DOWN], (optional)) Direction, Direction to move, UP or DOWN bpy.ops.pose.group_remove() Removes the active bone group bpy.ops.pose.group_select() Select bones in active Bone Group bpy.ops.pose.group_sort() Sort Bone Groups by their names in ascending order bpy.ops.pose.group_unassign() Remove selected bones from all bone groups bpy.ops.pose.hide(unselected=False) Tag selected bones to not be visible in Pose Mode Parameters unselected (boolean, (optional)) Unselected bpy.ops.pose.ik_add(with_targets=True) Add IK Constraint to the active Bone Parameters with_targets (boolean, (optional)) With Targets, Assign IK Constraint with targets derived from the select bones/objects bpy.ops.pose.ik_clear() Remove all IK Constraints from selected bones bpy.ops.pose.loc_clear() Reset locations of selected bones to their default values bpy.ops.pose.paste(ipped=False, selected_mask=False) Paste the stored pose on to the current pose Parameters ipped (boolean, (optional)) Flipped on X-Axis, Paste the stored pose ipped on to current pose selected_mask (boolean, (optional)) On Selected Only, Only paste the stored pose on to selected bones in the current pose bpy.ops.pose.paths_calculate() Calculate paths for the selected bones bpy.ops.pose.paths_clear() Clear path caches for selected bones
144
bpy.ops.pose.propagate(mode=WHILE_HELD, end_frame=250.0) Copy selected aspects of the current pose to subsequent poses already keyframed Parameters mode (enum in [WHILE_HELD, NEXT_KEY, LAST_KEY, BEFORE_FRAME, BEFORE_END, SELECTED_MARKERS], (optional)) Terminate Mode, Method used to determine when to stop propagating pose to keyframes WHILE_HELD While Held, Propagate pose to all keyframes after current frame that dont change (Default behaviour). NEXT_KEY To Next Keyframe, Propagate pose to rst keyframe following the current frame only. LAST_KEY To Last Keyframe, Propagate pose to the last keyframe only (i.e. making action cyclic). BEFORE_FRAME Before Frame, Propagate pose to all keyframes between current frame and Frame property. BEFORE_END Before Last Keyframe, Propagate pose to all keyframes from current frame until no more are found. SELECTED_MARKERS On Selected Markers, Propagate pose to all keyframes occurring on frames with Scene Markers after the current frame. end_frame (oat in [1.17549e-38, inf], (optional)) End Frame, Frame to stop propagating frames to (for Before Frame mode) bpy.ops.pose.push(prev_frame=0, next_frame=0, percentage=0.5) Exaggerate the current pose Parameters prev_frame (int in [-300000, 300000], (optional)) Previous Keyframe, Frame number of keyframe immediately before the current frame next_frame (int in [-300000, 300000], (optional)) Next Keyframe, Frame number of keyframe immediately after the current frame percentage (oat in [0, 1], (optional)) Percentage, Weighting factor for the sliding operation bpy.ops.pose.quaternions_flip() Flip quaternion values to achieve desired rotations, while maintaining the same orientations bpy.ops.pose.relax(prev_frame=0, next_frame=0, percentage=0.5) Make the current pose more similar to its surrounding ones Parameters prev_frame (int in [-300000, 300000], (optional)) Previous Keyframe, Frame number of keyframe immediately before the current frame next_frame (int in [-300000, 300000], (optional)) Next Keyframe, Frame number of keyframe immediately after the current frame percentage (oat in [0, 1], (optional)) Percentage, Weighting factor for the sliding operation bpy.ops.pose.reveal() Unhide all bones that have been tagged to be hidden in Pose Mode
145
bpy.ops.pose.rot_clear() Reset rotations of selected bones to their default values bpy.ops.pose.rotation_mode_set(type=QUATERNION) Set the rotation representation used by selected bones Parameters type (enum in [QUATERNION, XYZ, XZY, YXZ, YZX, ZXY, ZYX, AXIS_ANGLE], (optional)) Rotation Mode QUATERNION Quaternion (WXYZ), No Gimbal Lock (default). XYZ XYZ Euler, XYZ Rotation Order (prone to Gimbal Lock). XZY XZY Euler, XZY Rotation Order (prone to Gimbal Lock). YXZ YXZ Euler, YXZ Rotation Order (prone to Gimbal Lock). YZX YZX Euler, YZX Rotation Order (prone to Gimbal Lock). ZXY ZXY Euler, ZXY Rotation Order (prone to Gimbal Lock). ZYX ZYX Euler, ZYX Rotation Order (prone to Gimbal Lock). AXIS_ANGLE Axis Angle, Axis Angle (W+XYZ), denes a rotation around some axis dened by 3D-Vector. bpy.ops.pose.scale_clear() Reset scaling of selected bones to their default values bpy.ops.pose.select_all(action=TOGGLE) Toggle selection status of all bones Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.pose.select_constraint_target() Select bones used as targets for the currently selected bones bpy.ops.pose.select_flip_active() Activate the bone with a ipped name bpy.ops.pose.select_grouped(extend=False, type=LAYER) Select all visible bones grouped by similar properties Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst type (enum in [LAYER, GROUP, KEYINGSET], (optional)) Type LAYER Layer, Shared layers. GROUP Group, Shared group. KEYINGSET Keying Set, All bones affected by active Keying Set. bpy.ops.pose.select_hierarchy(direction=PARENT, extend=False) Select immediate parent/children of selected bones
146
Parameters direction (enum in [PARENT, CHILD], (optional)) Direction extend (boolean, (optional)) Add to Selection bpy.ops.pose.select_inverse() Flip the selection status of bones (selected -> unselected, unselected -> selected) bpy.ops.pose.select_linked(extend=False) Select bones related to selected ones by parent/child relationships Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.pose.select_parent() Select bones that are parents of the currently selected bones bpy.ops.pose.transforms_clear() Reset location, rotation, and scaling of selected bones to their default values bpy.ops.pose.user_transforms_clear() Reset pose on selected bones to keyframed state bpy.ops.pose.visual_transform_apply() Apply nal constrained position of pose bones to their transform Poselib Operators bpy.ops.poselib.action_sanitise() Make action suitable for use as a Pose Library bpy.ops.poselib.apply_pose(pose_index=-1) Apply specied Pose Library pose to the rig Parameters pose_index (int in [-2, inf], (optional)) Pose, Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose) bpy.ops.poselib.browse_interactive(pose_index=-1) Interactively browse poses in 3D-View Parameters pose_index (int in [-2, inf], (optional)) Pose, Index of the pose to apply (-2 for no change to pose, -1 for poselib active pose) bpy.ops.poselib.new() Add New Pose Library to active Object bpy.ops.poselib.pose_add(frame=1, name=Pose) Add the current Pose to the active Pose Library Parameters frame (int in [0, inf], (optional)) Frame, Frame to store pose on name (string, (optional)) Pose Name, Name of newly added Pose bpy.ops.poselib.pose_remove(pose=DEFAULT) Remove nth pose from the active Pose Library Parameters pose (enum in [DEFAULT], (optional)) Pose, The pose to remove bpy.ops.poselib.pose_rename(name=RenamedPose, pose=) Rename specied pose from the active Pose Library
147
Parameters name (string, (optional)) New Pose Name, New name for pose pose (enum in [], (optional)) Pose, The pose to rename bpy.ops.poselib.unlink() Remove Pose Library from active Object Ptcache Operators bpy.ops.ptcache.add() Add new cache bpy.ops.ptcache.bake(bake=False) Bake physics Parameters bake (boolean, (optional)) Bake bpy.ops.ptcache.bake_all(bake=True) Bake all physics Parameters bake (boolean, (optional)) Bake bpy.ops.ptcache.bake_from_cache() Bake from cache bpy.ops.ptcache.free_bake() Free physics bake bpy.ops.ptcache.free_bake_all() Undocumented (contribute) bpy.ops.ptcache.remove() Delete current cache Render Operators bpy.ops.render.opengl(animation=False, write_still=False, view_context=True) OpenGL render active viewport Parameters animation (boolean, (optional)) Animation, Render les from the animation range of this scene write_still (boolean, (optional)) Write Image, Save rendered the image to the output path (used only when animation is disabled) view_context (boolean, (optional)) View Context, Use the current 3D view for rendering, else use scene settings bpy.ops.render.play_rendered_anim() Play back rendered frames/movies using an external player File startup/bl_operators/screen_play_rendered_anim.py:74 bpy.ops.render.preset_add(name=, remove_active=False) Add a Render Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 148 Chapter 2. Application Modules
bpy.ops.render.render(animation=False, write_still=False, layer=, scene=) Render active scene Parameters animation (boolean, (optional)) Animation, Render les from the animation range of this scene write_still (boolean, (optional)) Write Image, Save rendered the image to the output path (used only when animation is disabled) layer (string, (optional)) Render Layer, Single render layer to re-render (used only when animation is disabled) scene (string, (optional)) Scene, Scene to render, current scene if not specied bpy.ops.render.view_cancel() Cancel show render view bpy.ops.render.view_show() Toggle show render view Scene Operators bpy.ops.scene.delete() Delete active scene bpy.ops.scene.new(type=NEW) Add new scene by type Parameters type (enum in [NEW, EMPTY, LINK_OBJECTS, LINK_OBJECT_DATA, FULL_COPY], (optional)) Type NEW New, Add new scene. EMPTY Copy Settings, Make a copy without any objects. LINK_OBJECTS Link Objects, Link to the objects from the current scene. LINK_OBJECT_DATA Link Object Data, Copy objects linked to data from the current scene. FULL_COPY Full Copy, Make a full copy of the current scene. bpy.ops.scene.render_layer_add() Add a render layer bpy.ops.scene.render_layer_remove() Remove the selected render layer Screen Operators bpy.ops.screen.actionzone(modier=0) Handle area action zones for mouse actions/gestures Parameters modier (int in [0, 2], (optional)) Modier, Modier state bpy.ops.screen.animation_cancel(restore_frame=True) Cancel animation, returning to the original frame Parameters restore_frame (boolean, (optional)) Restore Frame, Restore the frame when animation was initialized
149
bpy.ops.screen.animation_play(reverse=False, sync=False) Play animation Parameters reverse (boolean, (optional)) Play in Reverse, Animation is played backwards sync (boolean, (optional)) Sync, Drop frames to maintain framerate bpy.ops.screen.animation_step() Step through animation by position bpy.ops.screen.area_dupli() Duplicate selected area into new window bpy.ops.screen.area_join(min_x=-100, min_y=-100, max_x=-100, max_y=-100) Join selected areas into new window Parameters min_x (int in [-inf, inf], (optional)) X 1 min_y (int in [-inf, inf], (optional)) Y 1 max_x (int in [-inf, inf], (optional)) X 2 max_y (int in [-inf, inf], (optional)) Y 2 bpy.ops.screen.area_move(x=0, y=0, delta=0) Move selected area edges Parameters x (int in [-inf, inf], (optional)) X y (int in [-inf, inf], (optional)) Y delta (int in [-inf, inf], (optional)) Delta bpy.ops.screen.area_options() Operations for splitting and merging bpy.ops.screen.area_split(direction=HORIZONTAL, factor=0.5, mouse_x=-100, mouse_y=100) Split selected area into new windows Parameters direction (enum in [HORIZONTAL, VERTICAL], (optional)) Direction factor (oat in [0, 1], (optional)) Factor mouse_x (int in [-inf, inf], (optional)) Mouse X mouse_y (int in [-inf, inf], (optional)) Mouse Y bpy.ops.screen.area_swap() Swap selected areas screen positions bpy.ops.screen.back_to_previous() Revert back to the original screen layout, before fullscreen area overlay bpy.ops.screen.delete() Delete active screen bpy.ops.screen.frame_jump(end=False) Jump to rst/last frame in frame range
150
Parameters end (boolean, (optional)) Last Frame, Jump to the last frame of the frame range bpy.ops.screen.frame_offset(delta=0) Undocumented (contribute) Parameters delta (int in [-inf, inf], (optional)) Delta bpy.ops.screen.header_flip() Undocumented (contribute) bpy.ops.screen.header_toolbox() Display header region toolbox bpy.ops.screen.keyframe_jump(next=True) Jump to previous/next keyframe Parameters next (boolean, (optional)) Next Keyframe bpy.ops.screen.new() Add a new screen bpy.ops.screen.redo_last() Display menu for last action performed bpy.ops.screen.region_flip() Undocumented (contribute) bpy.ops.screen.region_quadview() Split selected area into camera, front, right & top views bpy.ops.screen.region_scale() Scale selected area bpy.ops.screen.repeat_history(index=0) Display menu for previous actions performed Parameters index (int in [0, inf], (optional)) Index bpy.ops.screen.repeat_last() Repeat last action bpy.ops.screen.screen_full_area() Toggle display selected area as fullscreen bpy.ops.screen.screen_set(delta=0) Cycle through available screens Parameters delta (int in [-inf, inf], (optional)) Delta bpy.ops.screen.screencast(lepath=, full=True) Undocumented (contribute) Parameters lepath (string, (optional)) lepath full (boolean, (optional)) Full Screen bpy.ops.screen.screenshot(lepath=, check_existing=True, lter_blender=False, lter_image=True, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, full=True) Undocumented (contribute) Parameters
151
lepath (string, (optional)) File Path, Path to le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le full (boolean, (optional)) Full Screen bpy.ops.screen.spacedata_cleanup() Remove unused settings for invisible editors bpy.ops.screen.userpref_show() Show/hide user preferences Script Operators bpy.ops.script.execute_preset(lepath=, menu_idname=) Execute a preset Parameters lepath (string, (optional)) Path, Path of the Python le to execute menu_idname (string, (optional)) Menu ID Name, ID name of the menu this was called from File startup/bl_operators/presets.py:159 bpy.ops.script.python_file_run(lepath=) Run Python le Parameters lepath (string, (optional)) Path bpy.ops.script.reload() Reload Scripts Sculpt Operators bpy.ops.sculpt.brush_stroke(stroke=None, mode=NORMAL, ignore_background_click=False) Undocumented (contribute) Parameters
152
stroke (bpy_prop_collection of OperatorStrokeElement, (optional)) Stroke mode (enum in [NORMAL, INVERT, SMOOTH], (optional)) Sculpt Stroke Mode, Action taken when a sculpt stroke is made NORMAL Normal, Apply brush normally. INVERT Invert, Invert action of brush for duration of stroke. SMOOTH Smooth, Switch brush to smooth mode for duration of stroke. ignore_background_click (boolean, (optional)) Ignore Background Click, Clicks on the background do not start the stroke bpy.ops.sculpt.sculptmode_toggle() Undocumented (contribute) bpy.ops.sculpt.set_persistent_base() Undocumented (contribute) Sequencer Operators bpy.ops.sequencer.change_effect_input(swap=A_B) Undocumented (contribute) Parameters swap (enum in [A_B, B_C, A_C], (optional)) Swap, The effect inputs to swap bpy.ops.sequencer.change_effect_type(type=CROSS) Undocumented (contribute) Parameters type (enum in [CROSS, ADD, SUBTRACT, ALPHA_OVER, ALPHA_UNDER, GAMMA_CROSS, MULTIPLY, OVER_DROP, PLUGIN, WIPE, GLOW, TRANSFORM, COLOR, SPEED, MULTICAM, ADJUSTMENT], (optional)) Type, Sequencer effect type CROSS Crossfade, Crossfade effect strip type. ADD Add, Add effect strip type. SUBTRACT Subtract, Subtract effect strip type. ALPHA_OVER Alpha Over, Alpha Over effect strip type. ALPHA_UNDER Alpha Under, Alpha Under effect strip type. GAMMA_CROSS Gamma Cross, Gamma Cross effect strip type. MULTIPLY Multiply, Multiply effect strip type. OVER_DROP Alpha Over Drop, Alpha Over Drop effect strip type. PLUGIN Plugin, Plugin effect strip type. WIPE Wipe, Wipe effect strip type. GLOW Glow, Glow effect strip type. TRANSFORM Transform, Transform effect strip type. COLOR Color, Color effect strip type. SPEED Speed, Color effect strip type. MULTICAM Multicam Selector.
153
ADJUSTMENT Adjustment Layer. bpy.ops.sequencer.change_path(lepath=, directory=, les=None, lter_blender=False, lter_image=True, lter_movie=True, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True) Undocumented (contribute) Parameters lepath (string, (optional)) File Path, Path to le directory (string, (optional)) Directory, Directory of the le les (bpy_prop_collection of OperatorFileListElement, (optional)) Files lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le bpy.ops.sequencer.copy() Undocumented (contribute) bpy.ops.sequencer.crossfade_sounds() Do crossfading volume animation of two selected sound strips File startup/bl_operators/sequencer.py:41 bpy.ops.sequencer.cut(frame=0, type=SOFT, side=BOTH) Cut the selected strips Parameters frame (int in [-inf, inf], (optional)) Frame, Frame where selected strips will be cut type (enum in [SOFT, HARD], (optional)) Type, The type of cut operation to perform on strips side (enum in [LEFT, RIGHT, BOTH], (optional)) Side, The side that remains selected after cutting bpy.ops.sequencer.cut_multicam(camera=1) Cut multicam strip and select camera Parameters camera (int in [1, 32], (optional)) Camera
154
File startup/bl_operators/sequencer.py:99 bpy.ops.sequencer.deinterlace_selected_movies() Deinterlace all selected movie sources File startup/bl_operators/sequencer.py:134 bpy.ops.sequencer.delete() Erase selected strips from the sequencer bpy.ops.sequencer.duplicate(mode=TRANSLATION) Duplicate the selected strips Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode bpy.ops.sequencer.effect_strip_add(lepath=, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=False, lemode=9, relative_path=True, frame_start=0, frame_end=0, channel=1, replace_sel=True, overlap=False, type=CROSS, color=(0.0, 0.0, 0.0)) Add an effect to the sequencer, most are applied on top of existing strips Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le frame_start (int in [-inf, inf], (optional)) Start Frame, Start frame of the sequence strip frame_end (int in [-inf, inf], (optional)) End Frame, End frame for the color strip channel (int in [1, 32], (optional)) Channel, Channel to place this strip into replace_sel (boolean, (optional)) Replace Selection, replace the current selection
155
overlap (boolean, (optional)) Allow Overlap, Dont correct overlap on new sequence strips type (enum in [CROSS, ADD, SUBTRACT, ALPHA_OVER, ALPHA_UNDER, GAMMA_CROSS, MULTIPLY, OVER_DROP, PLUGIN, WIPE, GLOW, TRANSFORM, COLOR, SPEED, MULTICAM, ADJUSTMENT], (optional)) Type, Sequencer effect type CROSS Crossfade, Crossfade effect strip type. ADD Add, Add effect strip type. SUBTRACT Subtract, Subtract effect strip type. ALPHA_OVER Alpha Over, Alpha Over effect strip type. ALPHA_UNDER Alpha Under, Alpha Under effect strip type. GAMMA_CROSS Gamma Cross, Gamma Cross effect strip type. MULTIPLY Multiply, Multiply effect strip type. OVER_DROP Alpha Over Drop, Alpha Over Drop effect strip type. PLUGIN Plugin, Plugin effect strip type. WIPE Wipe, Wipe effect strip type. GLOW Glow, Glow effect strip type. TRANSFORM Transform, Transform effect strip type. COLOR Color, Color effect strip type. SPEED Speed, Color effect strip type. MULTICAM Multicam Selector. ADJUSTMENT Adjustment Layer. color (oat array of 3 items in [0, 1], (optional)) Color, Initialize the strip with this color (only used when type=COLOR) bpy.ops.sequencer.image_strip_add(directory=, les=None, lter_blender=False, lter_image=True, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True, frame_start=0, frame_end=0, channel=1, replace_sel=True, overlap=False) Add an image or image sequence to the sequencer Parameters directory (string, (optional)) Directory, Directory of the le les (bpy_prop_collection of OperatorFileListElement, (optional)) Files lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les
156
lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le frame_start (int in [-inf, inf], (optional)) Start Frame, Start frame of the sequence strip frame_end (int in [-inf, inf], (optional)) End Frame, End frame for the color strip channel (int in [1, 32], (optional)) Channel, Channel to place this strip into replace_sel (boolean, (optional)) Replace Selection, replace the current selection overlap (boolean, (optional)) Allow Overlap, Dont correct overlap on new sequence strips bpy.ops.sequencer.images_separate(length=1) On image sequence strips, it returns a strip for each image Parameters length (int in [1, 1000], (optional)) Length, Length of each frame bpy.ops.sequencer.lock() Lock the active strip so that it cant be transformed bpy.ops.sequencer.meta_make() Group selected strips into a metastrip bpy.ops.sequencer.meta_separate() Put the contents of a metastrip back in the sequencer bpy.ops.sequencer.meta_toggle() Toggle a metastrip (to edit enclosed strips) bpy.ops.sequencer.movie_strip_add(lepath=, les=None, lter_blender=False, lter_image=False, lter_movie=True, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True, frame_start=0, channel=1, replace_sel=True, overlap=False, sound=True) Add a movie strip to the sequencer Parameters lepath (string, (optional)) File Path, Path to le les (bpy_prop_collection of OperatorFileListElement, (optional)) Files lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les 2.3. Operators (bpy.ops) 157
lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le frame_start (int in [-inf, inf], (optional)) Start Frame, Start frame of the sequence strip channel (int in [1, 32], (optional)) Channel, Channel to place this strip into replace_sel (boolean, (optional)) Replace Selection, replace the current selection overlap (boolean, (optional)) Allow Overlap, Dont correct overlap on new sequence strips sound (boolean, (optional)) Sound, Load sound with the movie bpy.ops.sequencer.mute(unselected=False) Mute selected strips Parameters unselected (boolean, (optional)) Unselected, Mute unselected rather than selected strips bpy.ops.sequencer.next_edit() Move frame to next edit point bpy.ops.sequencer.offset_clear() Clear strip offsets from the start and end frames bpy.ops.sequencer.paste() Undocumented (contribute) bpy.ops.sequencer.previous_edit() Move frame to previous edit point bpy.ops.sequencer.properties() Open sequencer properties panel bpy.ops.sequencer.reassign_inputs() Reassign the inputs for the effect strip bpy.ops.sequencer.rebuild_proxy() Rebuild all selected proxies and timecode indeces using the job system bpy.ops.sequencer.refresh_all() Refresh the sequencer editor bpy.ops.sequencer.reload() Reload strips in the sequencer bpy.ops.sequencer.rendersize() Set render size and aspect from active sequence bpy.ops.sequencer.scene_strip_add(frame_start=0, channel=1, lap=False, scene=) Add a strip to the sequencer using a blender scene as a source Parameters frame_start (int in [-inf, inf], (optional)) Start Frame, Start frame of the sequence strip channel (int in [1, 32], (optional)) Channel, Channel to place this strip into 158 Chapter 2. Application Modules replace_sel=True, over-
replace_sel (boolean, (optional)) Replace Selection, replace the current selection overlap (boolean, (optional)) Allow Overlap, Dont correct overlap on new sequence strips scene (enum in [], (optional)) Scene bpy.ops.sequencer.select(extend=False, linked_handle=False, linked_time=False) Select a strip (last selected becomes the active strip) Parameters extend (boolean, (optional)) Extend, Extend the selection linked_handle (boolean, (optional)) Linked Handle, Select handles next to the active strip left_right (boolean, (optional)) Left/Right, Select based on the current frame side the cursor is on linked_time (boolean, (optional)) Linked Time, Select other strips at the same time bpy.ops.sequencer.select_active_side(side=BOTH) Select strips on the nominated side of the active strip Parameters side (enum in [LEFT, RIGHT, BOTH], (optional)) Side, The side of the handle that is selected bpy.ops.sequencer.select_all_toggle() Select or deselect all strips bpy.ops.sequencer.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True) Enable border select mode Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.sequencer.select_grouped(extend=False, type=TYPE) Select all strips grouped by various properties Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst type (enum in [TYPE, TYPE_BASIC, TYPE_EFFECT, DATA, EFFECT, EFFECT_LINK, OVERLAP], (optional)) Type TYPE Type, Shared strip type. TYPE_BASIC Global Type, All strips of same basic type (Graphical or Sound). TYPE_EFFECT Effect Type, Shared strip effect type (if active strip is not an effect one, select all non-effect strips). left_right=False,
159
DATA Data, Shared data (scene, image, sound, etc.). EFFECT Effect, Shared effects. EFFECT_LINK Effect/Linked, Other strips affected by the active one (sharing some time, and below or effect-assigned). OVERLAP Overlap, Overlapping time. bpy.ops.sequencer.select_handles(side=BOTH) Select manipulator handles on the sides of the selected strip Parameters side (enum in [LEFT, RIGHT, BOTH], (optional)) Side, The side of the handle that is selected bpy.ops.sequencer.select_inverse() Select unselected strips bpy.ops.sequencer.select_less() Shrink the current selection of adjacent selected strips bpy.ops.sequencer.select_linked() Select all strips adjacent to the current selection bpy.ops.sequencer.select_linked_pick(extend=False) Select a chain of linked strips nearest to the mouse pointer Parameters extend (boolean, (optional)) Extend, extend the selection bpy.ops.sequencer.select_more() Select more strips adjacent to the current selection bpy.ops.sequencer.snap(frame=0) Frame where selected strips will be snapped Parameters frame (int in [-inf, inf], (optional)) Frame, Frame where selected strips will be snapped bpy.ops.sequencer.sound_strip_add(lepath=, les=None, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=True, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True, frame_start=0, channel=1, replace_sel=True, overlap=False, cache=False) Add a sound strip to the sequencer Parameters lepath (string, (optional)) File Path, Path to le les (bpy_prop_collection of OperatorFileListElement, (optional)) Files lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les 160 Chapter 2. Application Modules
lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le frame_start (int in [-inf, inf], (optional)) Start Frame, Start frame of the sequence strip channel (int in [1, 32], (optional)) Channel, Channel to place this strip into replace_sel (boolean, (optional)) Replace Selection, replace the current selection overlap (boolean, (optional)) Allow Overlap, Dont correct overlap on new sequence strips cache (boolean, (optional)) Cache, Cache the sound in memory bpy.ops.sequencer.swap(side=RIGHT) Swap active strip with strip to the right or left Parameters side (enum in [LEFT, RIGHT], (optional)) Side, Side of the strip to swap bpy.ops.sequencer.swap_data() Swap 2 sequencer strips bpy.ops.sequencer.swap_inputs() Swap the rst two inputs for the effect strip bpy.ops.sequencer.unlock() Unlock the active strip so that it cant be transformed bpy.ops.sequencer.unmute(unselected=False) Un-Mute unselected rather than selected strips Parameters unselected (boolean, (optional)) Unselected, UnMute unselected rather than selected strips bpy.ops.sequencer.view_all() View all the strips in the sequencer bpy.ops.sequencer.view_all_preview() Zoom preview to t in the area bpy.ops.sequencer.view_ghost_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0) Enable border select mode Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max bpy.ops.sequencer.view_selected() Zoom the sequencer on the selected strips bpy.ops.sequencer.view_toggle() Toggle between sequencer views (sequence, preview, both)
161
bpy.ops.sequencer.view_zoom_ratio(ratio=1.0) Change zoom ratio of sequencer preview Parameters ratio (oat in [0, inf], (optional)) Ratio, Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out Sketch Operators bpy.ops.sketch.cancel_stroke() Undocumented (contribute) bpy.ops.sketch.convert() Undocumented (contribute) bpy.ops.sketch.delete() Undocumented (contribute) bpy.ops.sketch.draw_preview(snap=False) Undocumented (contribute) Parameters snap (boolean, (optional)) Snap bpy.ops.sketch.draw_stroke(snap=False) Undocumented (contribute) Parameters snap (boolean, (optional)) Snap bpy.ops.sketch.finish_stroke() Undocumented (contribute) bpy.ops.sketch.gesture(snap=False) Undocumented (contribute) Parameters snap (boolean, (optional)) Snap bpy.ops.sketch.select() Undocumented (contribute) Sound Operators bpy.ops.sound.bake_animation() Updates the audio animation cache so that its up to date bpy.ops.sound.mixdown(lepath=, check_existing=True, lter_blender=False, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=True, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9) Mixes the scenes audio to a sound le Parameters lepath (string, (optional)) File Path, Path to le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les
162
lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le bpy.ops.sound.open(lepath=, lter_blender=False, lter_image=False, lter_movie=True, lter_python=False, lter_font=False, lter_sound=True, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True, cache=False, mono=False) Load a sound le Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le cache (boolean, (optional)) Cache, Cache the sound in memory mono (boolean, (optional)) Mono, Mixdown the sound to mono bpy.ops.sound.open_mono(lepath=, lter_blender=False, lter_image=False, lter_movie=True, lter_python=False, lter_font=False, lter_sound=True, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, relative_path=True, cache=False, mono=True) Load a sound le as mono Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les 2.3. Operators (bpy.ops) 163
lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le cache (boolean, (optional)) Cache, Cache the sound in memory mono (boolean, (optional)) Mono, Mixdown the sound to mono bpy.ops.sound.pack() Pack the sound into the current blend le bpy.ops.sound.unpack(method=USE_LOCAL, id=) Unpack the sound to the samples lename Parameters method (enum in [USE_LOCAL, WRITE_LOCAL, WRITE_ORIGINAL], (optional)) Method, How to unpack id (string, (optional)) Sound Name, Sound datablock name to unpack bpy.ops.sound.update_animation_flags() Update animation ags Surface Operators bpy.ops.surface.primitive_nurbs_surface_circle_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs surface Circle Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object USE_ORIGINAL,
164
rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.surface.primitive_nurbs_surface_curve_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs surface Curve Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.surface.primitive_nurbs_surface_cylinder_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs surface Cylinder Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer
165
bpy.ops.surface.primitive_nurbs_surface_sphere_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs surface Sphere Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.surface.primitive_nurbs_surface_surface_add(view_align=False, ter_editmode=False, tion=(0.0, 0.0, 0.0), tation=(0.0, 0.0, 0.0), ers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs surface Patch Parameters view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer bpy.ops.surface.primitive_nurbs_surface_torus_add(view_align=False, enter_editmode=False, location=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0), layers=(False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False)) Construct a Nurbs surface Torus Parameters enlocarolayFalse, False, False, False,
166
view_align (boolean, (optional)) Align to View, Align the new object to the view enter_editmode (boolean, (optional)) Enter Editmode, Enter editmode when adding this object location (oat array of 3 items in [-inf, inf], (optional)) Location, Location for the newly added object rotation (oat array of 3 items in [-inf, inf], (optional)) Rotation, Rotation for the newly added object layers (boolean array of 20 items, (optional)) Layer Text Operators bpy.ops.text.comment() Convert selected text to comment bpy.ops.text.convert_whitespace(type=SPACES) Convert whitespaces by type Parameters type (enum in [SPACES, TABS], (optional)) Type, Type of whitespace to convert to bpy.ops.text.copy() Copy selected text to clipboard bpy.ops.text.cursor_set(x=0, y=0) Set cursor position Parameters x (int in [-inf, inf], (optional)) X y (int in [-inf, inf], (optional)) Y bpy.ops.text.cut() Cut selected text to clipboard bpy.ops.text.delete(type=NEXT_CHARACTER) Delete text by cursor position Parameters type (enum in [NEXT_CHARACTER, PREVIOUS_CHARACTER, NEXT_WORD, PREVIOUS_WORD], (optional)) Type, Which part of the text to delete bpy.ops.text.find() Find specied text bpy.ops.text.find_set_selected() Find specied text and set as selected bpy.ops.text.indent() Indent selected text bpy.ops.text.insert(text=) Insert text at cursor position Parameters text (string, (optional)) Text, Text to insert at the cursor position bpy.ops.text.jump(line=1) Jump cursor to line Parameters line (int in [1, inf], (optional)) Line, Line number to jump to
167
bpy.ops.text.line_break() Insert line break at cursor position bpy.ops.text.line_number() The current line number bpy.ops.text.make_internal() Make active text le internal bpy.ops.text.mark_all() Mark all specied text bpy.ops.text.markers_clear() Clear all markers bpy.ops.text.move(type=LINE_BEGIN) Move cursor to position type Parameters type (enum in [LINE_BEGIN, LINE_END, FILE_TOP, FILE_BOTTOM, PREVIOUS_CHARACTER, NEXT_CHARACTER, PREVIOUS_WORD, NEXT_WORD, PREVIOUS_LINE, NEXT_LINE, PREVIOUS_PAGE, NEXT_PAGE], (optional)) Type, Where to move cursor to bpy.ops.text.move_select(type=LINE_BEGIN) Make selection from current cursor position to new cursor position type Parameters type (enum in [LINE_BEGIN, LINE_END, FILE_TOP, FILE_BOTTOM, PREVIOUS_CHARACTER, NEXT_CHARACTER, PREVIOUS_WORD, NEXT_WORD, PREVIOUS_LINE, NEXT_LINE, PREVIOUS_PAGE, NEXT_PAGE], (optional)) Type, Where to move cursor to, to make a selection bpy.ops.text.new() Create a new text data block bpy.ops.text.next_marker() Move to next marker bpy.ops.text.open(lepath=, lter_blender=False, lter_image=False, lter_movie=False, lter_python=True, lter_font=False, lter_sound=False, lter_text=True, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9, internal=False) Open a new text data block Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders 168 Chapter 2. Application Modules
lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le internal (boolean, (optional)) Make internal, Make text le internal after loading bpy.ops.text.overwrite_toggle() Toggle overwrite while typing bpy.ops.text.paste(selection=False) Paste text from clipboard Parameters selection (boolean, (optional)) Selection, Paste text selected elsewhere rather than copied (X11 only) bpy.ops.text.previous_marker() Move to previous marker bpy.ops.text.properties() Toggle text properties panel bpy.ops.text.refresh_pyconstraints() Refresh all pyconstraints bpy.ops.text.reload() Reload active text data block from its le bpy.ops.text.replace() Replace text with the specied text bpy.ops.text.replace_set_selected() Replace text with specied text and set as selected bpy.ops.text.resolve_conflict(resolution=IGNORE) When external text is out of sync, resolve the conict Parameters resolution (enum in [IGNORE, RELOAD, SAVE, MAKE_INTERNAL], (optional)) Resolution, How to solve conict due to differences in internal and external text bpy.ops.text.run_script() Run active script bpy.ops.text.save() Save active text data block bpy.ops.text.save_as(lepath=, check_existing=True, lter_blender=False, lter_image=False, lter_movie=False, lter_python=True, lter_font=False, lter_sound=False, lter_text=True, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9) Save active text le with options Parameters lepath (string, (optional)) File Path, Path to le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les 2.3. Operators (bpy.ops) 169
lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le bpy.ops.text.scroll(lines=1) Scroll text screen Parameters lines (int in [-inf, inf], (optional)) Lines, Number of lines to scroll bpy.ops.text.scroll_bar(lines=1) Scroll text screen Parameters lines (int in [-inf, inf], (optional)) Lines, Number of lines to scroll bpy.ops.text.select_all() Select all text bpy.ops.text.select_line() Select text by line bpy.ops.text.select_word() Select word under cursor bpy.ops.text.selection_set(select=False) Set cursor selection Parameters select (boolean, (optional)) Select, Set selection end rather than cursor bpy.ops.text.to_3d_object(split_lines=False) Create 3d text object from active text data block Parameters split_lines (boolean, (optional)) Split Lines, Create one object per line in the text bpy.ops.text.uncomment() Convert selected comment to text bpy.ops.text.unindent() Unindent selected text bpy.ops.text.unlink() Unlink active text data block Texture Operators bpy.ops.texture.envmap_clear() Discard the environment map and free it from memory bpy.ops.texture.envmap_clear_all() Discard all environment maps in the .blend le and free them from memory
170
bpy.ops.texture.envmap_save(layout=(0.0, 0.0, 1.0, 0.0, 2.0, 0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 1.0), lepath=, check_existing=True, lter_blender=False, lter_image=True, lter_movie=True, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=9) Save the current generated Environment map to an image le Parameters layout (oat array of 12 items in [-inf, inf], (optional)) File layout, Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] (use -1 to skip a face) lepath (string, (optional)) File Path, Path to le check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le bpy.ops.texture.new() Add a new texture bpy.ops.texture.slot_copy() Copy the material texture settings and nodes bpy.ops.texture.slot_move(type=UP) Move texture slots up and down Parameters type (enum in [UP, DOWN], (optional)) Type bpy.ops.texture.slot_paste() Copy the texture settings and nodes Time Operators bpy.ops.time.end_frame_set() Set the end frame bpy.ops.time.start_frame_set() Set the start frame
171
bpy.ops.time.view_all() Show the entire playable frame range Transform Operators bpy.ops.transform.create_orientation(name=, use=False, overwrite=False) Create transformation orientation from selection Parameters name (string, (optional)) Name, Text to insert at the cursor position use (boolean, (optional)) Use after creation, Select orientation after its creation overwrite (boolean, (optional)) Overwrite previous, Overwrite previously created orientation with same name bpy.ops.transform.delete_orientation() Delete transformation orientation bpy.ops.transform.edge_crease(value=0.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Change the crease of edges Parameters value (oat in [-1, 1], (optional)) Factor snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.edge_slide(value=0.0, mirror=False, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), correct_uv=False, release_conrm=False) Slide an edge loop along a mesh Parameters value (oat in [-1, 1], (optional)) Factor mirror (boolean, (optional)) Mirror Editing snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target 172 Chapter 2. Application Modules
CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal correct_uv (boolean, (optional)) Correct UV coords when transforming release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.mirror(constraint_axis=(False, False, False), constraint_orientation=, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, release_conrm=False) Mirror selected vertices around one or more axes Parameters constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.push_pull(value=0.0, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Push/Pull selected items 2.3. Operators (bpy.ops) 173
Parameters value (oat in [-inf, inf], (optional)) Distance mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.resize(value=(1.0, 1.0, 1.0), constraint_axis=(False, False, False), constraint_orientation=, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), texture_space=False, release_conrm=False) Resize selected items Parameters value (oat array of 3 items in [-inf, inf], (optional)) Vector
174
constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal texture_space (boolean, (optional)) Edit Object data texture space release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.rotate(value=(0.0), axis=(0.0, 0.0, 0.0), constraint_axis=(False, False, False), constraint_orientation=, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Rotate selected items Parameters value (oat array of 1 items in [-inf, inf], (optional)) Angle 2.3. Operators (bpy.ops) 175
axis (oat array of 3 items in [-inf, inf], (optional)) Axis, The axis around which the transformation occurs constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.select_orientation(orientation=) Select transformation orientation Parameters orientation (enum in [], (optional)) Orientation, Transformation orientation bpy.ops.transform.seq_slide(value=(1.0, 1.0), snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Slide a sequence strip in time 176 Chapter 2. Application Modules
Parameters value (oat array of 2 items in [-inf, inf], (optional)) Angle snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.shear(value=0.0, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Shear selected items along the horizontal screen axis Parameters value (oat in [-inf, inf], (optional)) Offset mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options
177
snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.shrink_fatten(value=0.0, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Shrink/fatten selected vertices along normals Parameters value (oat in [-inf, inf], (optional)) Offset mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target.
178
CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.snap_type(type=INCREMENT) Set the snap element type Parameters type (enum in [INCREMENT, VERTEX, EDGE, FACE, VOLUME], (optional)) Type, Set the snap element type INCREMENT Increment, Snap to increments of grid. VERTEX Vertex, Snap to vertices. EDGE Edge, Snap to edges. FACE Face, Snap to faces. VOLUME Volume, Snap to volume. bpy.ops.transform.tilt(value=(0.0), constraint_axis=(False, False, False), constraint_orientation=, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Tilt selected control vertices of 3d curve Parameters value (oat array of 1 items in [-inf, inf], (optional)) Angle constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff.
179
LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.tosphere(value=0.0, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Move selected vertices outward in a spherical shape around mesh center Parameters value (oat in [0, 1], (optional)) Factor mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. 180 Chapter 2. Application Modules
proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.trackball(value=(1.0, 1.0), mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Trackball style rotation of selected items Parameters value (oat array of 2 items in [-inf, inf], (optional)) angle mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options
181
snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.transform(mode=TRANSLATION, value=(0.0, 0.0, 0.0, 0.0), axis=(0.0, 0.0, 0.0), constraint_axis=(False, False, False), constraint_orientation=, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Transform selected items by mode type Parameters mode (enum in [INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, TOSPHERE, SHEAR, WARP, SHRINKFATTEN, TILT, TRACKBALL, PUSHPULL, CREASE, MIRROR, BONE_SIZE, BONE_ENVELOPE, CURVE_SHRINKFATTEN, BONE_ROLL, TIME_TRANSLATE, TIME_SLIDE, TIME_SCALE, TIME_EXTEND, BAKE_TIME, BEVEL, BWEIGHT, ALIGN, EDGESLIDE, SEQSLIDE], (optional)) Mode value (oat array of 4 items in [-inf, inf], (optional)) Values axis (oat array of 3 items in [-inf, inf], (optional)) Axis, The axis around which the transformation occurs constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff.
182
ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.translate(value=(0.0, 0.0, 0.0), constraint_axis=(False, False, False), constraint_orientation=, mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), texture_space=False, release_conrm=False) Translate selected items Parameters value (oat array of 3 items in [-inf, inf], (optional)) Vector constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff.
183
ROOT Root, Root falloff. SHARP Sharp, Sharp falloff. LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal texture_space (boolean, (optional)) Edit Object data texture space release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.transform.warp(value=(0.0), mirror=False, proportional=DISABLED, proportional_edit_falloff=SMOOTH, proportional_size=1.0, snap=False, snap_target=CLOSEST, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), release_conrm=False) Warp selected items around the cursor Parameters value (oat array of 1 items in [-inf, inf], (optional)) Angle mirror (boolean, (optional)) Mirror Editing proportional (enum in [DISABLED, ENABLED, CONNECTED], (optional)) Proportional Editing DISABLED Disable, Proportional Editing disabled. ENABLED Enable, Proportional Editing enabled. CONNECTED Connected, Proportional Editing using connected geometry only. proportional_edit_falloff (enum in [SMOOTH, SPHERE, ROOT, SHARP, LINEAR, CONSTANT, RANDOM], (optional)) Proportional Editing Falloff, Falloff type for proportional editing mode SMOOTH Smooth, Smooth falloff. SPHERE Sphere, Spherical falloff. ROOT Root, Root falloff. SHARP Sharp, Sharp falloff.
184
LINEAR Linear, Linear falloff. CONSTANT Constant, Constant falloff. RANDOM Random, Random falloff. proportional_size (oat in [1e-05, inf], (optional)) Proportional Size snap (boolean, (optional)) Use Snapping Options snap_target (enum in [CLOSEST, CENTER, MEDIAN, ACTIVE], (optional)) Target CLOSEST Closest, Snap closest point onto target. CENTER Center, Snap center onto target. MEDIAN Median, Snap median onto target. ACTIVE Active, Snap active onto target. snap_point (oat array of 3 items in [-inf, inf], (optional)) Point snap_align (boolean, (optional)) Align with Point Normal snap_normal (oat array of 3 items in [-inf, inf], (optional)) Normal release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button Ui Operators bpy.ops.ui.copy_data_path_button() Copy the RNA data path for this property to the clipboard bpy.ops.ui.copy_to_selected_button(all=True) Copy property from this object to selected objects or bones Parameters all (boolean, (optional)) All, Reset to default values all elements of the array bpy.ops.ui.editsource() Edit source code for a button bpy.ops.ui.eyedropper() Sample a color from the Blender Window to store in a property bpy.ops.ui.reports_to_textblock() Write the reports bpy.ops.ui.reset_default_button(all=True) Reset this propertys value to its default value Parameters all (boolean, (optional)) All, Reset to default values all elements of the array bpy.ops.ui.reset_default_theme() Reset to the default theme colors Uv Operators bpy.ops.uv.align(axis=ALIGN_AUTO) Align selected UV vertices to an axis Parameters axis (enum in [ALIGN_S, ALIGN_T, ALIGN_U, ALIGN_AUTO, ALIGN_X, ALIGN_Y], (optional)) Axis, Axis to align UV locations on 2.3. Operators (bpy.ops) 185
ALIGN_S Straighten, Align UVs along the line dened by the endpoints. ALIGN_T Straighten X, Align UVs along the line dened by the endpoints along the X axis. ALIGN_U Straighten Y, Align UVs along the line dened by the endpoints along the Y axis. ALIGN_AUTO Align Auto, Automatically choose the axis on which there is most alignment already. ALIGN_X Align X, Align UVs on X axis. ALIGN_Y Align Y, Align UVs on Y axis. bpy.ops.uv.average_islands_scale() Undocumented (contribute) bpy.ops.uv.circle_select(x=0, y=0, radius=0, gesture_mode=0) Select UV vertices using circle selection Parameters x (int in [-inf, inf], (optional)) X y (int in [-inf, inf], (optional)) Y radius (int in [-inf, inf], (optional)) Radius gesture_mode (int in [-inf, inf], (optional)) Gesture Mode bpy.ops.uv.cube_project(cube_size=1.0, correct_aspect=True, scale_to_bounds=False) Undocumented (contribute) Parameters cube_size (oat in [0, inf], (optional)) Cube Size, Size of the cube to project on correct_aspect (boolean, (optional)) Correct Aspect, Map UVs taking image aspect ratio into account clip_to_bounds (boolean, (optional)) Clip to Bounds, Clip UV coordinates to bounds after unwrapping scale_to_bounds (boolean, (optional)) Scale to Bounds, Scale UV coordinates to bounds after unwrapping bpy.ops.uv.cursor_set(location=(0.0, 0.0)) Set 2D cursor location Parameters location (oat array of 2 items in [-inf, inf], (optional)) Location, Cursor location in normalised (0.0-1.0) coordinates bpy.ops.uv.cylinder_project(direction=VIEW_ON_EQUATOR, radius=1.0, correct_aspect=True, scale_to_bounds=False) Undocumented (contribute) Parameters direction (enum in [VIEW_ON_EQUATOR, VIEW_ON_POLES, ALIGN_TO_OBJECT], (optional)) Direction, Direction of the sphere or cylinder VIEW_ON_EQUATOR View on Equator, 3D view is on the equator. VIEW_ON_POLES View on Poles, 3D view is on the poles. align=POLAR_ZX, clip_to_bounds=False, clip_to_bounds=False,
186
ALIGN_TO_OBJECT Align to Object, Align according to object transform. align (enum in [POLAR_ZX, POLAR_ZY], (optional)) Align, How to determine rotation around the pole POLAR_ZX Polar ZX, Polar 0 is X. POLAR_ZY Polar ZY, Polar 0 is Y. radius (oat in [0, inf], (optional)) Radius, Radius of the sphere or cylinder correct_aspect (boolean, (optional)) Correct Aspect, Map UVs taking image aspect ratio into account clip_to_bounds (boolean, (optional)) Clip to Bounds, Clip UV coordinates to bounds after unwrapping scale_to_bounds (boolean, (optional)) Scale to Bounds, Scale UV coordinates to bounds after unwrapping bpy.ops.uv.export_layout(lepath=, check_existing=True, export_all=False, mode=PNG, size=(1024, 1024), opacity=0.25) Export UV layout to le Parameters check_existing (boolean, (optional)) Check Existing, Check and warn on overwriting existing les export_all (boolean, (optional)) All UVs, Export all UVs in this mesh (not just visible ones) mode (enum in [SVG, EPS, PNG], (optional)) Format, File format to export the UV layout to SVG Scalable Vector Graphic (.svg), Export the UV layout to a vector SVG le. EPS Encapsulate PostScript (.eps), Export the UV layout to a vector EPS le. PNG PNG Image (.png), Export the UV layout to a bitmap image. size (int array of 2 items in [8, 32768], (optional)) Dimensions of the exported le opacity (oat in [0, 1], (optional)) Fill Opacity File addons/io_mesh_uv_layout/__init__.py:163 bpy.ops.uv.follow_active_quads(mode=LENGTH) Follow UVs from active quads along continuous face loops Parameters mode (enum in [EVEN, LENGTH], (optional)) Edge Length Mode, Method to space UV edge loops EVEN Even, Space all UVs evently. LENGTH Length, Average space UVs edge length of each loop. File startup/bl_operators/uvcalc_follow_active.py:249 bpy.ops.uv.hide(unselected=False) Hide (un)selected UV vertices Parameters unselected (boolean, (optional)) Unselected, Hide unselected rather than selected
187
bpy.ops.uv.lightmap_pack(PREF_CONTEXT=SEL_FACES, PREF_NEW_UVLAYER=False, PREF_IMG_PX_SIZE=512, PREF_MARGIN_DIV=0.1) Follow UVs from active quads along continuous face loops Parameters
PREF_CONTEXT (enum in [SEL_FACES, ALL_FACES, ALL_OBJECTS], (optional)) Selection SEL_FACES Selected Faces, Space all UVs evently. ALL_FACES All Faces, Average space UVs edge length of each loop. ALL_OBJECTS Selected Mesh Object, Average space UVs edge length of each loop. PREF_PACK_IN_ONE (boolean, (optional)) Share Tex Space, Objects Share texture space, map all objects into 1 uvmap PREF_NEW_UVLAYER (boolean, (optional)) New UV Map, Create a new UV map for every mesh packed PREF_APPLY_IMAGE (boolean, (optional)) New Image, Assign new images for every mesh (only one if shared tex space enabled) PREF_IMG_PX_SIZE (int in [64, 5000], (optional)) Image Size, Width and Height for the new image PREF_BOX_DIV (int in [1, 48], (optional)) Pack Quality, Pre Packing before the complex boxpack PREF_MARGIN_DIV (oat in [0.001, 1], (optional)) Margin, Size of the margin as a division of the UV File startup/bl_operators/uvcalc_lightmap.py:599 bpy.ops.uv.minimize_stretch(ll_holes=True, blend=0.0, iterations=0) Reduce UV stretching by relaxing angles Parameters ll_holes (boolean, (optional)) Fill Holes, Virtual ll holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry blend (oat in [0, 1], (optional)) Blend, Blend factor between stretch minimized and original iterations (int in [0, inf], (optional)) Iterations, Number of iterations to run, 0 is unlimited when run interactively bpy.ops.uv.pack_islands(margin=0.0) Undocumented (contribute) Parameters margin (oat in [0, 1], (optional)) Margin, Space between islands bpy.ops.uv.pin(clear=False) Set/clear selected UV vertices as anchored between multiple unwrap operations Parameters clear (boolean, (optional)) Clear, Clear pinning for the selection instead of setting it bpy.ops.uv.project_from_view(orthographic=False, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False) Undocumented (contribute) Parameters 188 Chapter 2. Application Modules
orthographic (boolean, (optional)) Orthographic, Use orthographic projection correct_aspect (boolean, (optional)) Correct Aspect, Map UVs taking image aspect ratio into account clip_to_bounds (boolean, (optional)) Clip to Bounds, Clip UV coordinates to bounds after unwrapping scale_to_bounds (boolean, (optional)) Scale to Bounds, Scale UV coordinates to bounds after unwrapping bpy.ops.uv.reset() Undocumented (contribute) bpy.ops.uv.reveal() Reveal all hidden UV vertices bpy.ops.uv.select(extend=False, location=(0.0, 0.0)) Select UV vertices Parameters extend (boolean, (optional)) Extend, Extend selection rather than clearing the existing selection location (oat array of 2 items in [-inf, inf], (optional)) Location, Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds bpy.ops.uv.select_all(action=TOGGLE) Change selection of all UV vertices Parameters action (enum in [TOGGLE, SELECT, DESELECT, INVERT], (optional)) Action, Selection action to execute TOGGLE Toggle, Toggle selection for all elements. SELECT Select, Select all elements. DESELECT Deselect, Deselect all elements. INVERT Invert, Invert selection of all elements. bpy.ops.uv.select_border(pinned=False, gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True) Select UV vertices using border selection Parameters pinned (boolean, (optional)) Pinned, Border select pinned UVs only gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.uv.select_linked(extend=False) Select all UV vertices linked to the active UV map
189
Parameters extend (boolean, (optional)) Extend, Extend selection rather than clearing the existing selection bpy.ops.uv.select_linked_pick(extend=False, location=(0.0, 0.0)) Select all UV vertices linked under the mouse Parameters extend (boolean, (optional)) Extend, Extend selection rather than clearing the existing selection location (oat array of 2 items in [-inf, inf], (optional)) Location, Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds bpy.ops.uv.select_loop(extend=False, location=(0.0, 0.0)) Select a loop of connected UV vertices Parameters extend (boolean, (optional)) Extend, Extend selection rather than clearing the existing selection location (oat array of 2 items in [-inf, inf], (optional)) Location, Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds bpy.ops.uv.select_pinned() Select all pinned UV vertices bpy.ops.uv.smart_project(angle_limit=66.0, island_margin=0.0, user_area_weight=0.0) This script projection unwraps the selected faces of a mesh (it operates on all selected mesh objects, and can be used to unwrap selected faces, or all faces) Parameters angle_limit (oat in [1, 89], (optional)) Angle Limit, lower for more projection groups, higher for less distortion island_margin (oat in [0, 1], (optional)) Island Margin, Margin to reduce bleed from adjacent islands user_area_weight (oat in [0, 1], (optional)) Area Weight, Weight projections vector by faces with larger areas File startup/bl_operators/uvcalc_smart_project.py:1141 bpy.ops.uv.snap_cursor(target=PIXELS) Snap cursor to target type Parameters target (enum in [PIXELS, SELECTED], (optional)) Target, Target to snap the selected UVs to bpy.ops.uv.snap_selected(target=PIXELS) Snap selected UV vertices to target type Parameters target (enum in [PIXELS, CURSOR, ADJACENT_UNSELECTED], (optional)) Target, Target to snap the selected UVs to bpy.ops.uv.sphere_project(direction=VIEW_ON_EQUATOR, align=POLAR_ZX, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=False) Undocumented (contribute) Parameters direction (enum in [VIEW_ON_EQUATOR, VIEW_ON_POLES, ALIGN_TO_OBJECT], (optional)) Direction, Direction of the sphere or cylinder
190
VIEW_ON_EQUATOR View on Equator, 3D view is on the equator. VIEW_ON_POLES View on Poles, 3D view is on the poles. ALIGN_TO_OBJECT Align to Object, Align according to object transform. align (enum in [POLAR_ZX, POLAR_ZY], (optional)) Align, How to determine rotation around the pole POLAR_ZX Polar ZX, Polar 0 is X. POLAR_ZY Polar ZY, Polar 0 is Y. correct_aspect (boolean, (optional)) Correct Aspect, Map UVs taking image aspect ratio into account clip_to_bounds (boolean, (optional)) Clip to Bounds, Clip UV coordinates to bounds after unwrapping scale_to_bounds (boolean, (optional)) Scale to Bounds, Scale UV coordinates to bounds after unwrapping bpy.ops.uv.stitch(use_limit=True, limit=0.01) Stitch selected UV vertices by proximity Parameters use_limit (boolean, (optional)) Use Limit, Stitch UVs within a specied limit distance limit (oat in [0, inf], (optional)) Limit, Limit distance in normalized coordinates bpy.ops.uv.tile_set(tile=(0, 0)) Set UV image tile coordinates Parameters tile (int array of 2 items in [0, inf], (optional)) Tile, Tile coordinate bpy.ops.uv.unlink_selected() Unlink selected UV vertices from active UV map bpy.ops.uv.unwrap(method=ANGLE_BASED, ll_holes=True, correct_aspect=True) Unwrap the mesh of the object being edited Parameters method (enum in [ANGLE_BASED, CONFORMAL], (optional)) Method, Unwrapping method (Angle Based usually gives better results than Conformal, while being somewhat slower) ll_holes (boolean, (optional)) Fill Holes, Virtual ll holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry correct_aspect (boolean, (optional)) Correct Aspect, Map UVs taking image aspect ratio into account bpy.ops.uv.weld() Weld selected UV vertices together View2D Operators bpy.ops.view2d.pan(deltax=0, deltay=0) Pan the view Parameters deltax (int in [-inf, inf], (optional)) Delta X 2.3. Operators (bpy.ops) 191
deltay (int in [-inf, inf], (optional)) Delta Y bpy.ops.view2d.reset() Reset the view bpy.ops.view2d.scroll_down(deltax=0, deltay=0, page=False) Scroll the view down Parameters deltax (int in [-inf, inf], (optional)) Delta X deltay (int in [-inf, inf], (optional)) Delta Y page (boolean, (optional)) Page, Scroll down one page bpy.ops.view2d.scroll_left(deltax=0, deltay=0) Scroll the view left Parameters deltax (int in [-inf, inf], (optional)) Delta X deltay (int in [-inf, inf], (optional)) Delta Y bpy.ops.view2d.scroll_right(deltax=0, deltay=0) Scroll the view right Parameters deltax (int in [-inf, inf], (optional)) Delta X deltay (int in [-inf, inf], (optional)) Delta Y bpy.ops.view2d.scroll_up(deltax=0, deltay=0, page=False) Scroll the view up Parameters deltax (int in [-inf, inf], (optional)) Delta X deltay (int in [-inf, inf], (optional)) Delta Y page (boolean, (optional)) Page, Scroll up one page bpy.ops.view2d.scroller_activate() Scroll view by mouse click and drag bpy.ops.view2d.zoom(deltax=0.0, deltay=0.0) Zoom in/out the view Parameters deltax (oat in [-inf, inf], (optional)) Delta X deltay (oat in [-inf, inf], (optional)) Delta Y bpy.ops.view2d.zoom_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0) Zoom in the view to the nearest item contained in the border Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min
192
ymax (int in [-inf, inf], (optional)) Y Max bpy.ops.view2d.zoom_in(zoomfacx=0.0, zoomfacy=0.0) Zoom in the view Parameters zoomfacx (oat in [-inf, inf], (optional)) Zoom Factor X zoomfacy (oat in [-inf, inf], (optional)) Zoom Factor Y bpy.ops.view2d.zoom_out(zoomfacx=0.0, zoomfacy=0.0) Zoom out the view Parameters zoomfacx (oat in [-inf, inf], (optional)) Zoom Factor X zoomfacy (oat in [-inf, inf], (optional)) Zoom Factor Y View3D Operators bpy.ops.view3d.background_image_add(name=Image, lepath=Path) Add a new background image Parameters name (string, (optional)) Name, Image name to assign lepath (string, (optional)) Filepath, Path to image le bpy.ops.view3d.background_image_remove(index=0) Remove a background image from the 3D view Parameters index (int in [0, inf], (optional)) Index, Background image index to remove bpy.ops.view3d.camera_to_view() Set camera view to active view bpy.ops.view3d.camera_to_view_selected() Move the camera so selected objects are framed bpy.ops.view3d.clip_border(xmin=0, xmax=0, ymin=0, ymax=0) Set the view clipping border Parameters xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max bpy.ops.view3d.cursor3d() Set the location of the 3D cursor bpy.ops.view3d.dolly(delta=0, mx=0, my=0) Dolly in/out in the view Parameters delta (int in [-inf, inf], (optional)) Delta mx (int in [0, inf], (optional)) Zoom Position X
193
my (int in [0, inf], (optional)) Zoom Position Y bpy.ops.view3d.edit_mesh_extrude_individual_move() Extrude individual elements and move File startup/bl_operators/view3d.py:30 bpy.ops.view3d.edit_mesh_extrude_move_normal() Extrude and move along normals File startup/bl_operators/view3d.py:63 bpy.ops.view3d.enable_manipulator(translate=False, rotate=False, scale=False) Enable the transform manipulator for use Parameters translate (boolean, (optional)) Translate, Enable the translate manipulator rotate (boolean, (optional)) Rotate, Enable the rotate manipulator scale (boolean, (optional)) Scale, Enable the scale manipulator bpy.ops.view3d.fly() Interactively y around the scene bpy.ops.view3d.game_start() Start game engine bpy.ops.view3d.layers(nr=1, extend=False, toggle=True) Toggle layer(s) visibility Parameters nr (int in [0, 20], (optional)) Number, The layer number to set, zero for all layers extend (boolean, (optional)) Extend, Add this layer to the current view layers toggle (boolean, (optional)) Toggle, Toggle the layer bpy.ops.view3d.localview() Toggle display of selected object(s) separately and centered in view bpy.ops.view3d.manipulator(constraint_axis=(False, False, False), constraint_orientation=, release_conrm=False) Manipulate selected item by axis Parameters constraint_axis (boolean array of 3 items, (optional)) Constraint Axis constraint_orientation (enum in [], (optional)) Orientation, Transformation orientation release_conrm (boolean, (optional)) Conrm on Release, Always conrm operation when releasing button bpy.ops.view3d.move() Move the view bpy.ops.view3d.ndof_orbit() Explore every angle of an object using the 3D mouse bpy.ops.view3d.ndof_pan() Position your viewpoint with the 3D mouse bpy.ops.view3d.object_as_camera() Set the active object as the active camera for this view or scene
194
bpy.ops.view3d.properties() Toggles the properties panel display bpy.ops.view3d.render_border(xmin=0, xmax=0, ymin=0, ymax=0) Set the boundaries of the border render and enables border render Parameters xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max bpy.ops.view3d.rotate() Rotate the view bpy.ops.view3d.select(extend=False, center=False, enumerate=False, object=False) Activate/select item(s) Parameters extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst center (boolean, (optional)) Center, Use the object center when selecting, in editmode used to extend object selection enumerate (boolean, (optional)) Enumerate, List objects under the mouse (object mode only) object (boolean, (optional)) Object, Use object selection (editmode only) bpy.ops.view3d.select_border(gesture_mode=0, tend=True) Select items using border selection Parameters gesture_mode (int in [-inf, inf], (optional)) Gesture Mode xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.view3d.select_circle(x=0, y=0, radius=0, gesture_mode=0) Select items using circle selection Parameters x (int in [-inf, inf], (optional)) X y (int in [-inf, inf], (optional)) Y radius (int in [-inf, inf], (optional)) Radius gesture_mode (int in [-inf, inf], (optional)) Event Type xmin=0, xmax=0, ymin=0, ymax=0, ex-
195
bpy.ops.view3d.select_lasso(path=None, deselect=False, extend=True) Select items using lasso selection Parameters path (bpy_prop_collection of OperatorMousePath, (optional)) Path deselect (boolean, (optional)) Deselect, Deselect rather than select items extend (boolean, (optional)) Extend, Extend selection instead of deselecting everything rst bpy.ops.view3d.smoothview() The time to animate the change of view (in milliseconds) bpy.ops.view3d.snap_cursor_to_active() Snap cursor to active item bpy.ops.view3d.snap_cursor_to_center() Snap cursor to the Center bpy.ops.view3d.snap_cursor_to_grid() Snap cursor to nearest grid node bpy.ops.view3d.snap_cursor_to_selected() Snap cursor to center of selected item(s) bpy.ops.view3d.snap_selected_to_cursor() Snap selected item(s) to cursor bpy.ops.view3d.snap_selected_to_grid() Snap selected item(s) to nearest grid node bpy.ops.view3d.toolshelf() Toggles tool shelf display bpy.ops.view3d.view_all(center=False) View all objects in scene Parameters center (boolean, (optional)) Center bpy.ops.view3d.view_center_camera() Center the camera view bpy.ops.view3d.view_center_cursor() Center the view so that the cursor is in the middle of the view bpy.ops.view3d.view_orbit(type=ORBITLEFT) Orbit the view Parameters type (enum in [ORBITLEFT, ORBITRIGHT, ORBITUP, ORBITDOWN], (optional)) Orbit, Direction of View Orbit ORBITLEFT Orbit Left, Orbit the view around to the Left. ORBITRIGHT Orbit Right, Orbit the view around to the Right. ORBITUP Orbit Up, Orbit the view Up. ORBITDOWN Orbit Down, Orbit the view Down. bpy.ops.view3d.view_pan(type=PANLEFT) Pan the view Parameters type (enum in [PANLEFT, PANRIGHT, PANUP, PANDOWN], (optional)) Pan, Direction of View Pan
196
PANLEFT Pan Left, Pan the view to the Left. PANRIGHT Pan Right, Pan the view to the Right. PANUP Pan Up, Pan the view Up. PANDOWN Pan Down, Pan the view Down. bpy.ops.view3d.view_persportho() Switch the current view from perspective/orthographic bpy.ops.view3d.view_selected() Move the view to the selection center bpy.ops.view3d.viewnumpad(type=FRONT, align_active=False) Set the view Parameters type (enum in [FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM, CAMERA], (optional)) View, The Type of view FRONT Front, View From the Front. BACK Back, View From the Back. LEFT Left, View From the Left. RIGHT Right, View From the Right. TOP Top, View From the Top. BOTTOM Bottom, View From the Bottom. CAMERA Camera, View From the active camera. align_active (boolean, (optional)) Align Active, Align to the active objects axis bpy.ops.view3d.zoom(delta=0, mx=0, my=0) Zoom in/out in the view Parameters delta (int in [-inf, inf], (optional)) Delta mx (int in [0, inf], (optional)) Zoom Position X my (int in [0, inf], (optional)) Zoom Position Y bpy.ops.view3d.zoom_border(xmin=0, xmax=0, ymin=0, ymax=0) Zoom in the view to the nearest object contained in the border Parameters xmin (int in [-inf, inf], (optional)) X Min xmax (int in [-inf, inf], (optional)) X Max ymin (int in [-inf, inf], (optional)) Y Min ymax (int in [-inf, inf], (optional)) Y Max bpy.ops.view3d.zoom_camera_1_to_1() Match the camera to 1:1 to the render output
197
Wm Operators bpy.ops.wm.addon_disable(module=) Disable an addon Parameters module (string, (optional)) Module, Module name of the addon to disable File startup/bl_operators/wm.py:1486 bpy.ops.wm.addon_enable(module=) Enable an addon Parameters module (string, (optional)) Module, Module name of the addon to enable File startup/bl_operators/wm.py:1455 bpy.ops.wm.addon_expand(module=) Display more information on this addon Parameters module (string, (optional)) Module, Module name of the addon to expand File startup/bl_operators/wm.py:1727 bpy.ops.wm.addon_install(overwrite=True, target=DEFAULT, lepath=, lter_folder=True, lter_python=True, lter_glob=*.py;*.zip) Install an addon Parameters overwrite (boolean, (optional)) Overwrite, Remove existing addons with the same ID target (enum in [DEFAULT, PREFS], (optional)) Target Path lter_folder (boolean, (optional)) Filter folders lter_python (boolean, (optional)) Filter python File startup/bl_operators/wm.py:1541 bpy.ops.wm.addon_remove(module=) Disable an addon Parameters module (string, (optional)) Module, Module name of the addon to remove File startup/bl_operators/wm.py:1685 bpy.ops.wm.appconfig_activate(lepath=) Undocumented (contribute) File startup/bl_operators/wm.py:1119 bpy.ops.wm.appconfig_default() Undocumented (contribute) File startup/bl_operators/wm.py:1098 bpy.ops.wm.call_menu(name=) Undocumented (contribute) Parameters name (string, (optional)) Name, Name of the menu bpy.ops.wm.context_collection_boolean_set(data_path_iter=, type=TOGGLE) Set boolean values for a collection of items Parameters data_path_item=,
198
data_path_iter (string, (optional)) The data path relative to the context, must point to an iterable data_path_item (string, (optional)) The data path from each iterable to the value (int or oat) type (enum in [TOGGLE, ENABLE, DISABLE], (optional)) Type File startup/bl_operators/wm.py:593 bpy.ops.wm.context_cycle_array(data_path=, reverse=False) Set a context array value. Parameters data_path (string, (optional)) Context Attributes, rna context string reverse (boolean, (optional)) Reverse, Cycle backwards File startup/bl_operators/wm.py:469 bpy.ops.wm.context_cycle_enum(data_path=, reverse=False) Toggle a context value Parameters data_path (string, (optional)) Context Attributes, rna context string reverse (boolean, (optional)) Reverse, Cycle backwards File startup/bl_operators/wm.py:416 bpy.ops.wm.context_cycle_int(data_path=, reverse=False) Set a context value. Useful for cycling active material, Parameters data_path (string, (optional)) Context Attributes, rna context string reverse (boolean, (optional)) Reverse, Cycle backwards File startup/bl_operators/wm.py:382 bpy.ops.wm.context_menu_enum(data_path=) Undocumented (contribute) Parameters data_path (string, (optional)) Context Attributes, rna context string File startup/bl_operators/wm.py:513 bpy.ops.wm.context_modal_mouse(data_path_iter=, data_path_item=, input_scale=0.01, invert=False, initial_x=0) Adjust arbitrary values with mouse input Parameters data_path_iter (string, (optional)) The data path relative to the context, must point to an iterable data_path_item (string, (optional)) The data path from each iterable to the value (int or oat) input_scale (oat in [-inf, inf], (optional)) Scale the mouse movement by this value before applying the delta invert (boolean, (optional)) Invert the mouse input File startup/bl_operators/wm.py:714
199
bpy.ops.wm.context_scale_int(data_path=, value=1.0, always_step=True) Scale an int context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (oat in [-inf, inf], (optional)) Value, Assign value always_step (boolean, (optional)) Always Step, Always adjust the value by a minimum of 1 when value is not 1.0 File startup/bl_operators/wm.py:225 bpy.ops.wm.context_set_boolean(data_path=, value=True) Set a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (boolean, (optional)) Value, Assignment value File startup/bl_operators/wm.py:127 bpy.ops.wm.context_set_enum(data_path=, value=) Set a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (string, (optional)) Value, Assignment value (as a string) File startup/bl_operators/wm.py:127 bpy.ops.wm.context_set_float(data_path=, value=0.0, relative=False) Set a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (oat in [-inf, inf], (optional)) Value, Assignment value relative (boolean, (optional)) Relative, Apply relative to the current value (delta) File startup/bl_operators/wm.py:127 bpy.ops.wm.context_set_id(data_path=, value=) Toggle a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (string, (optional)) Value, Assign value File startup/bl_operators/wm.py:533 bpy.ops.wm.context_set_int(data_path=, value=0, relative=False) Set a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (int in [-inf, inf], (optional)) Value, Assign value
200
relative (boolean, (optional)) Relative, Apply relative to the current value (delta) File startup/bl_operators/wm.py:127 bpy.ops.wm.context_set_string(data_path=, value=) Set a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (string, (optional)) Value, Assign value File startup/bl_operators/wm.py:127 bpy.ops.wm.context_set_value(data_path=, value=) Set a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value (string, (optional)) Value, Assignment value (as a string) File startup/bl_operators/wm.py:312 bpy.ops.wm.context_toggle(data_path=) Toggle a context value Parameters data_path (string, (optional)) Context Attributes, rna context string File startup/bl_operators/wm.py:328 bpy.ops.wm.context_toggle_enum(data_path=, value_1=, value_2=) Toggle a context value Parameters data_path (string, (optional)) Context Attributes, rna context string value_1 (string, (optional)) Value, Toggle enum value_2 (string, (optional)) Value, Toggle enum File startup/bl_operators/wm.py:357 bpy.ops.wm.copy_prev_settings() Copy settings from previous version File startup/bl_operators/wm.py:1147 bpy.ops.wm.debug_menu(debug_value=0) Open a popup to set the debug level Parameters debug_value (int in [-10000, 10000], (optional)) Debug Value bpy.ops.wm.dependency_relations() Print dependency graph relations to the console bpy.ops.wm.doc_edit(doc_id=, doc_new=) Load online reference docs Parameters doc_id (string, (optional)) Doc ID doc_new (string, (optional)) Edit Description File startup/bl_operators/wm.py:854
201
bpy.ops.wm.doc_view(doc_id=) Load online reference docs Parameters doc_id (string, (optional)) Doc ID File startup/bl_operators/wm.py:801 bpy.ops.wm.interaction_preset_add(name=, remove_active=False) Add an Application Interaction Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 bpy.ops.wm.keyconfig_activate(lepath=) Undocumented (contribute) File startup/bl_operators/wm.py:1089 bpy.ops.wm.keyconfig_export(lepath=keymap.py, ter_python=True) Export key conguration to a python script Parameters lter_folder (boolean, (optional)) Filter folders lter_text (boolean, (optional)) Filter text lter_python (boolean, (optional)) Filter python File startup/bl_operators/wm.py:1287 bpy.ops.wm.keyconfig_import(lepath=keymap.py, lter_folder=True, ter_python=True, keep_original=True) Import key conguration from a python script Parameters lter_folder (boolean, (optional)) Filter folders lter_text (boolean, (optional)) Filter text lter_python (boolean, (optional)) Filter python keep_original (boolean, (optional)) Keep original, Keep original le after copying to conguration folder File startup/bl_operators/wm.py:1226 bpy.ops.wm.keyconfig_preset_add(name=, remove_active=False) Add a Keycong Preset Parameters name (string, (optional)) Name, Name of the preset, used to make the path name File startup/bl_operators/presets.py:50 bpy.ops.wm.keyconfig_remove() Remove key cong File startup/bl_operators/wm.py:1413 bpy.ops.wm.keyconfig_test() Test keycong for conicts File startup/bl_operators/wm.py:1184 lter_text=True, llter_folder=True, lter_text=True, l-
202
bpy.ops.wm.keyitem_add() Add key map item File startup/bl_operators/wm.py:1364 bpy.ops.wm.keyitem_remove(item_id=0) Remove key map item Parameters item_id (int in [-inf, inf], (optional)) Item Identier, Identier of the item to remove File startup/bl_operators/wm.py:1395 bpy.ops.wm.keyitem_restore(item_id=0) Restore key map item Parameters item_id (int in [-inf, inf], (optional)) Item Identier, Identier of the item to remove File startup/bl_operators/wm.py:1349 bpy.ops.wm.keymap_restore(all=False) Restore key map(s) Parameters all (boolean, (optional)) All Keymaps, Restore all keymaps to default File startup/bl_operators/wm.py:1321 bpy.ops.wm.link_append(lepath=, directory=, lename=, les=None, lter_blender=True, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=1, relative_path=True, link=True, autoselect=True, active_layer=True, instance_groups=True) Link or Append from a Library .blend le Parameters lepath (string, (optional)) File Path, Path to le directory (string, (optional)) Directory, Directory of the le lename (string, (optional)) File Name, Name of the le les (bpy_prop_collection of OperatorFileListElement, (optional)) Files lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le relative_path (boolean, (optional)) Relative Path, Select the le relative to the blend le link (boolean, (optional)) Link, Link the objects or datablocks rather than appending 2.3. Operators (bpy.ops) 203
autoselect (boolean, (optional)) Select, Select the linked objects active_layer (boolean, (optional)) Active Layer, Put the linked objects on the active layer instance_groups (boolean, (optional)) Instance Groups, Create instances for each group as a DupliGroup bpy.ops.wm.memory_statistics() Print memory statistics to the console bpy.ops.wm.ndof_sensitivity_change(decrease=True, fast=False) Change NDOF sensitivity Parameters decrease (boolean, (optional)) Decrease NDOF sensitivity, If true then action decreases NDOF sensitivity instead of increasing fast (boolean, (optional)) Fast NDOF sensitivity change, If true then sensitivity changes 50%, otherwise 10% bpy.ops.wm.open_mainfile(lepath=, lter_blender=True, lter_image=False, lter_movie=False, lter_python=False, lter_font=False, lter_sound=False, lter_text=False, lter_btx=False, lter_collada=False, lter_folder=True, lemode=8, load_ui=True, use_scripts=True) Open a Blender le Parameters lepath (string, (optional)) File Path, Path to le lter_blender (boolean, (optional)) Filter .blend les lter_image (boolean, (optional)) Filter image les lter_movie (boolean, (optional)) Filter movie les lter_python (boolean, (optional)) Filter python les lter_font (boolean, (optional)) Filter font les lter_sound (boolean, (optional)) Filter sound les lter_text (boolean, (optional)) Filter text les lter_btx (boolean, (optional)) Filter btx les lter_collada (boolean, (optional)) Filter COLLADA les lter_folder (boolean, (optional)) Filter folders lemode (int in [1, 9], (optional)) File Browser Mode, The setting for the le browser mode to load a .blend le, a library or a special le load_ui (boolean, (optional)) Load UI, Load user interface setup in the .blend le use_scripts (boolean, (optional)) Trusted Source, Allow blend le execute scripts automatically, default available from system preferences bpy.ops.wm.operator_cheat_sheet() Undocumented (contribute) File startup/bl_operators/wm.py:1424 bpy.ops.wm.operator_preset_add(name=, remove_active=False, operator=) Add an Application Interaction Preset
204
Parameters name (string, (optional)) Name, Name of the preset, used to make the path name operator (string, (optional)) Operator File startup/bl_operators/presets.py:50 bpy.ops.wm.path_open(lepath=) Open a path in a le browser File startup/bl_operators/wm.py:754 bpy.ops.wm.properties_add(data_path=) Internal use (edit a property data_path) Parameters data_path (string, (optional)) Property Edit, Property data_path edit File startup/bl_operators/wm.py:1031 bpy.ops.wm.properties_context_change(context=) Change the context tab in a Properties Window Parameters context (string, (optional)) Context File startup/bl_operators/wm.py:1061 bpy.ops.wm.properties_edit(data_path=, property=, value=, min=0.0, max=1.0, description=) Internal use (edit a property data_path) Parameters data_path (string, (optional)) Property Edit, Property data_path edit property (string, (optional)) Property Name, Property name edit value (string, (optional)) Property Value, Property value edit min (oat in [-inf, inf], (optional)) Min max (oat in [-inf, inf], (optional)) Max description (string, (optional)) Tip File startup/bl_operators/wm.py:952 bpy.ops.wm.properties_remove(data_path=, property=) Internal use (edit a property data_path) Parameters data_path (string, (optional)) Property Edit, Property data_path edit property (string, (optional)) Property Name, Property name edit File startup/bl_operators/wm.py:1074 bpy.ops.wm.quit_blender() Quit Blender bpy.ops.wm.radial_control(data_path=, rotation_path=, color_path=, ll_color_path=, zoom_path=, image_id=) Undocumented (contribute) Parameters data_path (string, (optional)) Data Path, Path of property to be set by the radial con