-
Notifications
You must be signed in to change notification settings - Fork 9
Empty (null object)
Dealga McArdle edited this page Oct 25, 2015
·
11 revisions
Empties are used for a lot of reasons:
- as parents
- for Mirror Modifier, as Mirror Object
- for Array Modifier, as Object Offset
- for Screw Modifier, as Axis Object
- etc...
option 1:
bpy.ops.object.add(type='EMPTY', location=(0, 2, 1), rotation=(0, 0, 0))
# if you need a reference to the newly created Empty, then use the following.
# ( useful for setting a name..or other properties )
mt = bpy.context.active_object
mt.name = 'empty_name'
mt.empty_draw_size = 2
option 2 (useful if you want to avoid using bpy.ops):
scene = bpy.context.scene
objects = bpy.data.objects
mt = objects.new("empty_name", None)
mt.location = (0, 2, 1)
mt.empty_draw_size = 2
scene.objects.link(mt)
scene.update()
option 2 may seem like more code, but you can set the name on the same line as the creation and you get the reference at the same time.
Introduction
Objects / Mesh / BMesh
- Empty - null object
- Mesh
- Bmesh
- bmesh.ops - primitives
- bmesh.ops - mesh opsπ§
- Curves (2d, 3d)
- Text (Font Objects)
- Duplication (instancing)
- Metaballs
Time and Motion
- scripted keyframesπ
- Event Handlersπ
- Drivers
Miscellaneous bpy.data.*
Order / Organization
- Groupingπ
- Parentingπ
- Layers
- UI / Layoutπ
Miscellaneous
- Mathutilsπ
- Modifiersπ
- Particle Systemsπ
- vertex colorsπ
- Textures UV DPI
- Propertiesπ§
- Operators (and callbacks)π§
- bgl / blfπ
- Grease Pencil
- Themes
- Areas
Add-ons
- introductionπ
- import / exportπ
- Text Editorπ
- Custom Nodesπ