Search This Blog

Showing posts with label 2. Show all posts
Showing posts with label 2. Show all posts

Monday, 20 December 2021

BPY SCRIPT TO ADD MATERIAL TO AN EXISTING OBJECT.

To run this script open blender, add a cube object and select it.Copy and paste these codes into you text editor and run it to add a material to the cube. Here Red material(color) is added to the Cube.

-------------------------------------------------------------------------------------------------------------------------------

 import bpy

mat_red=bpy.data.materials.new("red")

mat_red.diffuse_color=(0.8, 0, 0)

mesh=bpy.context.object.data

mesh.materials.clear()

mesh.materials.append(mat_red)

-------------------------------------------------------------------------------------------------------------------------------

ROUND EDGES- BEVEL TOOL

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...