Script to delete all objects in 3D window:
import bpy
bpy.ops.object.select_all(action='TOGGLE')
bpy.ops.object.delete(use_global=False)
Script to delete all objects in 3D window:
import bpy
bpy.ops.object.select_all(action='TOGGLE')
bpy.ops.object.delete(use_global=False)
The following script can be used to add a cube and a material to it:
import bpy
bpy.ops.mesh.primitive_cube_add(location=(0,0,0))
obj_matl=bpy.data.materials.new("obj_clr")
obj_matl.diffuse_color=(1,0,0)
mesh=bpy.context.object.data
mesh.materials.append(obj_matl)
EDIT MODE
Open a new 3D window, change to front view by clicking on "1" key (in number pad), hit Shift+C to move the cursor to the 3D origin. Press Shift+A to add an object, then go to Mesh and then click on Cube. A cube object will be added. Press Tab key to go to edit mode, press "A" key to deselect all.
To select a vertex click RMB on it. If you want to select another vertex also, hold the Shift key down and then keep the cursor on the second vertex and then press RMB.
If you want to select an edge, first click on the edge select button in the horizontal panel in the bottom.It is positioned to the right of the edit mode button. Then position the cursor on the edge you want to select and press RMB.
TO select a face, first select the face select option then select the face in a similar way.
SAVING FILE IN BLENDER
In Blender, the file you are working on must be saved when ever some substantial change is done in your file. Blender DOES NOT auto-save your file. Choose the proper directory where your Blender files are saved. Blender files are saved with the extension ".blend".
DUPLICATING AN OBJECT
To duplicate an object, select the object in object mode, press Shift+D.Then move the mouse, the duplicated object will move in the direction of the mouse movement. Click LMB to confirm the location of the duplicate object.
STEPS FOR PROPER WORK FLOW
When you want to create a simple object (like a metallic bowl) or a more complex one,it is worthwhile to spend some time to plan your steps to achieve the desired result. Working as you think would not help you move forward in a focused manner. "Set a target . Achieve it" This would be a better approach.
Basic steps for a proper work flow are listed below. You may adapt it to your specific needs:
1. Make a pencil sketch of the model you want to create.
2. Think of the tools in Blender which you would use to design your model.
3. Create the mesh of your model.
4. Add material.
5. Add texture..
6. Add light.
7. Set world horizon colour, if you want.
8. Position camera to get a good view of your model.
9. Render the image.
10.Save results.
CAMERA VIEW
If you want to set the camera position to a desired view which you have already got on your 3D screen, press Ctrl+Alt+0 (Zero key on Number pad).
EXTRUDING IN BLENDER
To extrude a set of vertices, select them using Box select option, then press "E" key then "z" key to extrude along z axis. Once you have extruded to desired length, click LMB to confirm.
14/10/2020
EDIT MODE
An object in Blender in the edit mode is defined by its vertices, edges and faces. If we consider a square plane, it has four vertices at the four corners,four lines(called as edges in Blender) connecting these four vertices and a surface (called face in Blender) which stretches between the four edges.
Similarly if we consider a Cube it has 8 vertices, 12 edges and 6 faces. These details of the plane and cube are shown in the image below:
An UVSphere in edit mode would like this:
Thus we may conclude that all objects are constructed using vertices,edges and faces. The same process is used for making both simple mesh like a cube or to construct more complex shapes which may go up to construct a human body shape or a complex machine part like a bolt, a gear wheel.
A bolt in mesh mode is shown below:
WORKING IN EDIT MODE
To work in edit mode, first open a 3D window in Blender, and add an object like a Cube.Hit Tab key go to edit mode.In edit mode you will see all the vertices,edges and faces. When these vertices,edges and faces are not selected they would appear in black colour. Hit "A" key to select all. Now you will see all the vertices,edges and faces in yellow colour.
You can toggle "A" key to select/deselect all objects in the 3D window.
In edit mode we can work with vertices, edges and faces in a detailed manner to design any desired shape. A number of tools are available to work in edit mode.
Look at the image below which shows the horizontal panel in edit mode. To the right of the button marked "Global" you will see four square buttons. The first one has a point(vertex) in orange colour, clicking on this enables vertex-select mode. The second button has a vertical line(edge) in orange colour,clicking on which will enable edge select mode, similarly the third button is used to enable face select mode. The fourth button shows four vertices and edges in the foreground and four vertices in the background. This button,when clicked on, enables selection of vertices in both foreground and background.
13/10/2020
BLENDER WINDOWS ICON
BASIC OPERATION IN BLENDER
ADDING OR DELETING OBJECTS
Here we shall try to add some objects and delete them. Objects are some geometric figures like a Plane, Cube, Sphere, Cylinder, Cone etc.
To begin with, click (RMB) on the cube displayed in the middle of the 3D window. Once it is selected an orange coloured outline will appear around the Cube. Next hold down the Shift key and then press X key. A window will appear with "OK ?" and Delete Shift X. Click on the blue button to delete the Cube.
This is the standard procedure to delete any object. Select the object by clicking the RMB, once the object is selected, press Shift+X and click on the blue button.
To add an object to the 3D window, click within the 3D window. The 3D cursor will move to the point where you clicked(LMB). Try this out a few times. Next press Shift+A, you will see a list of objects like Plane,Cube, UVSphere, Cylinder etc appear. Click on any object name and the object will be added to the 3D window.
Try out this procedure for adding a few more objects in the 3D screen.
At any point of time, a list of all the objects in the 3D window will be shown in the Outliner window, which is at the top right corner of the display.
To select all the objects in the 3D window press "A " key. All the objects will have an orange outline around it. You may delete all the objects.
SELECTING OBJECTS.
To select a particular object, position the cursor on the object and click RMB. To select all objects hit "A" key. Two other ways to select objects are Box select and Circle Select. To use box select, keep the cursor in the 3D window, hit "B" key. Hold the LMB and draw a box to enclose the objects you want to select. To use Circle select, in a similar way, hit "C" key. A circle will appear. Re-size it by scrolling the MMB(Middle Mouse Button) to enclose the desired objects, then click LMB.
DIFFERENT VIEWS
One way of classing view type is the direction from which you view an object. Here we normally talk about Top view,Front view and (Right) side view.To change to different views, use the Number pad keys. Hit 7 for top view, number 1 for front view and number 3 for side view.
Another way of classifying view type is as Orthographic and Perspective view.In Orthographic view, all objects appear at the same scale,irrespective of distance or depth. A pair of railway line would appear as two parallel lines. In perspective view ,objects at a distance appear smaller. It adds depth to the view. In perspective, as in real life, the railway lines may look like they are getting smaller and closer as we see, more farther away. To change between the two views use number key 5. It toggles between the two views.
The current view type is displayed at the top left corner of the 3D window.
BASIC BLENDER VOCABULARY
OBJECT
Any 2D, 3D geometric figure is called as an object. As mentioned earlier, Plane, Cube,UVSphere ..... all these are objects. Here Camera, Light everything is an object. It is like a character in a play. You work on it to make it do what ever you want.
OBJECT AND EDIT MODE.
We normally work with both objects and meshes. Consider a Cube. If we want to move the Cube from point A to point B, we select it and drag it to where ever we want and leave it there. If you want to change the shape of the cube, either you want to change it into a rectangular cube, or you want to distort it into into an irregular shape, we will work in the Edit mode.
Object and Edit mode is displayed at the bottom of the 3D window as shown below.
GRAB, ROTATE AND SCALE (G, R,S - Keyboard shortcut)
To move an object from point A to B, first select it by clicking on it with RMB. Next hit "G" key to grab it. Move the mouse. The object will move in the direction of the mouse movement. Where ever you want to position the object click the LMB.
To rotate an object, select it by clicking RMB. Hit "R" key to rotate. Rotate the handle with double arrow heads by moving the mouse. The object will rotate. At the desired rotated angle, click the LMB.
To Scale an object, select it by clicking RMB. Hit "S" key to scale. Pull the handle with double arrow heads. The object will scale up or down to grow bigger or smaller. At the desired size, click the LMB.
To move,Rotate or Scale an object, it can be done to a specified distance,angle or size.First select the object and hit G to grab the object.
To move an object by 3 units along X axis - hit x then 3 and Enter key.
To move an object by 3 units along Z axis - hit z then 3 and Enter key.
To rotate an object 90 degrees,around x axis, hit R then X then 90 and then Enter key.
To rotate an object 120 degrees,around y axis ,hit R then Y then 120 and then Enter key.
To scale an object 2 units along x axis ,hit S then X then 2 and then Enter key.
To scale an object 3 units along z axis ,hit S then Z then 3 and then Enter key.
NOTE: In Blender, for any feature to be used, the cursor must be within the particular window. Let us say you want to move an object from point A to point B. Then the cursor should be first clicked within the 3D window.
NUMBER PANEL
When you are working with an object in 3D window, we can get access to the current position of the object with respect to the x,y,z axis. Further you can also access the object's angle of rotation with respect to the x,y,z axis, its scale and dimension in Blender units. To activate the Number panel, hit the N key.To close it, hit the N key again. It toggles between the display / hide mode for the Number panel.
BLENDER KEYBOARD SHORTCUTS AND MOUSE CLICKS
Blender has defined numerous key board shortcuts which would help us to speed up our work. We need to quickly learn and use such shortcuts regularly. A few of these shortcuts and mouse clicks are listed below.
- Object/Edit mode Tab key (Toggle)
- Add object Shift+A
- Select/Deselect all objects A (Toggle)
- Grab an object G
- Scale object S
- Rotate object R
- Number panel N (Toggle)
- Tool panel T (Toggle)
MOUSE CLICKS
Left mouse button clicked LMB
Right Mouse button clicked RMB
Middle mouse button clicked MMB
BLENDER
HOW TO LEARN BLENDER ?
The basic mindset to learn Blender is to have a sense of curiosity and fun. Blender, today is a professional grade software. The opening screen of Blender would be daunting. You would feel that it is highly complicated and confusing.Its user interface has many windows,hundred of buttons and options with multiple levels of drop down menus and settings.A simple strategy to gain control in working with Blender is to enlarge your circle of learning, step by step,gradually. Biting more than you can chew at one go doesn't work. It may quickly turn you off.
One additional approach to learn and Master Blender is to have a "Never say die" attitude. What ever may be the level of difficulty, never give up. If you have failed a dozen times, still do not give up. Try again. Persistence only will pay. If you are faint hearted, this is not for you. Just quit. If you are read for the long haul and ready for an extended grind, a pot of gold awaits you at the end of the tunnel. So good luck ! Make a choice!
Search for a way to understand and learn the particular task on hand. The first place to look for help is the web. Hundreds of tutorials and videos are there to help you find your way. As you work your way forward, pause to think and analyze where you are erring. Blind effort is meaningless. Effort with focus and clarity in thought and action will speed up the learning process. A great strategy to speed up learning Blender is to team up with like minded individuals with whom you can share your learning and queries. Form a collaborative network. This approach would prove to be a win-win approach.
It is important to remember that hundreds of individuals on the web are ready to share and assist you in the learning process. All that you need to do is seek help and knowledge.
STARTING BLENDER AND ITS OPENING SCREEN
STARTING BLENDER
1. If you are working on Windows and have Blender installed, click on the Blender short cut on your Desktop,to launch Blender. The other approach would be to go to start->Program Menu and click on the Blender icon.
2. If you are working on Linux,open the Terminal Emulator, change directory to Blender version like 2.79 or 2.83 , depending on the version installed on your computer.Next enter "blender" and hit the Enter key in the command prompt.
OPENING SCREEN
When you launch Blender, it opens with multiple windows which are placed adjacent to each other on the display screen.
The main working window is in the centre, with an object like a cube or monkey placed in the middle.This is the 3D WINDOW .This is the largest window visible on the display screen. The opening screen will be displayed as shown below.
On the right top corner is the OUTLINER WINDOW which lists the objects in the 3D window. When you launch Blender this window would show a list of a cube/monkey, a camera and a light.
Blender version 3.6 To make any edge to be rounded smoothly, we can use the bevel tool in Edit Mode. Look at the cube in Image 1 where all t...