Soap
Soap material in BIS
Blender Cycles, Eevee shader.
Clicking the collection “eye icon” in Blender 2.8 outliner shows and hides the visibility of objects from this collection in viewport window. To show only objects from the necessary collection and hide objects from all other collections with a single click – click the “eye icon” with the “Ctrl” button pressed.
In Blender 2.8 the toolbars are located on the top of the working windows. But you can easily return them to the habitual bottom position.
Right-click on the panel and select “Flip to Bottom” to move the panel down. To return the panel back to the top, right-click on it and select “Flip to Top”.
This feature is not Blender 2.8 exclusive, the same can be done in Blender 2.7.
To set mesh (object) as active in Blender 2.8 Python API the “context.view_layer” is used instead of “context.scene”.
When trying to make object active with “bpy.context.scene.objects.active” Blender throws an error:
AttributeError: bpy_prop_collection: attribute “active” not found
To make object active in Blender 2.8 use the following code:
1 2 |
obj = bpy.context.window.scene.objects[0] bpy.context.view_layer.objects.active = obj # 'obj' is the active object now |
According to Blender 2.8 Python API changes mesh (object) can be selected with using getters and setters.
When trying to check the selected status of the mesh through the “bpy.context.active_object.select” property, Blender throws an error:
AttributeError: ‘Object’ object has no attribute ‘select’
To check whether an object is selected in Blender 2.8 use a getter:
1 2 |
bpy.context.active_object.select_get() # True |
To select an object in Blender 2.8 use a setter:
1 |
bpy.context.active_object.select_set(state=True) |
To unselect an object use the same setter:
1 |
bpy.context.active_object.select_set(state=False) |
The combination of Ctrl + Shift + Num+ keys continues the selection with the specified step. Each pressing increases the selection by one step.
To find what Python interpreter version is used in current Blender version type the following commands in Python Console window in Blender:
1 2 3 4 |
import sys print(sys.version_info) # sys.version_info(major=3, minor=7, micro=0, releaselevel='final', serial=0) |
It means that the version of Python used in Blender is 3.7.0.
To make it more readable type the following command:
1 2 |
print('.'.join(map(str, sys.version_info[:3]))) # 3.7.0 |
or with full info:
1 2 |
print(sys.version) # 3.7.0 (default, Aug 26 2018, 16:05:01) [MSC v.1900 64 bit (AMD64)] |