User
Write something
Coffee Hangout is happening in 5 days
Part 2 Capstone
I built a small script with three core functions: 1. Create Worldspace Bone – Generates a worldspace bone based on the currently selected bone. 2. Select Worldspace Bone – Selects the corresponding worldspace bone if one exists through this script. 3. Delete Script Bones – Removes only the bones that were created by this script, leaving the original rig untouched. The primary goal was to experiment with bone manipulation in Blender and get hands-on experience with the relevant API. For future iterations, If I built this again i'd plan to organize generated bones into a dedicated temporary collection, which will simplify both the selection and deletion logic considerably. References & Attribution Since Blender's manual doesn't always cover pose bone API methods in depth, I used AI assistance to look up specific references such as bpy.context.selected_pose_bones and similar properties. I also referenced an existing script and a YouTube tutorial for context. All logic and implementation decisions, however, are my own, applying concepts learned throughout this course.
Capstone part one
I am more interested in animation and rigging. apparently when dealing with bones blender changes the game it is not that simple have to do a lot of mode changes and separate operations for separate modes just like how we manually do it. Anyway finally figured to rename bones
Capstone part one
Итоговый проект по второй части
I have created a tool in the 3D viewport, which has 3 basic modifier buttons and a button to remove all modifiers. I also have a couple of questions for you as a specialist. How do you rate the profession of a technical artist? Is it a good profession for the future? Is there a chance for someone like me to become a technical artist? And here is the project code: import bpy import math class BevelAdd(bpy.types.Operator): bl_idname = 'object.my_bevel_add' bl_label = 'BevelAdd' bl_options = {'REGISTER', 'UNDO'} def execute(self,context): obj = context.object if obj and obj.type == 'MESH': bpy.ops.object.modifier_add(type='BEVEL') bpy.context.object.modifiers["Bevel"].angle_limit = math.radians(20) else: self.report({'WARNING'}, 'Select a mesh object') return {'FINISHED'} class WireFrameAdd(bpy.types.Operator): bl_idname = 'object.my_wireframe_add' bl_label = 'WireFrameAdd' bl_options = {'REGISTER', 'UNDO'} def execute(self,context): obj = context.object if obj and obj.type == 'MESH': bpy.ops.object.modifier_add(type='WIREFRAME') bpy.context.object.modifiers["Wireframe"].thickness = 0.1 else: self.report({'WARNING'}, 'Select a mesh object') return {'FINISHED'} class SolidifyAdd(bpy.types.Operator): bl_idname = 'object.my_solidify_add' bl_label = 'SolidifyAdd' bl_options = {'REGISTER', 'UNDO'} def execute(self,context): obj = context.object if obj and obj.type == 'MESH': bpy.ops.object.modifier_add(type='SOLIDIFY') bpy.context.object.modifiers["Solidify"].thickness = 0.1 else: self.report({'WARNING'}, 'Select a mesh object') return {'FINISHED'} class DeleteAllMod(bpy.types.Operator): bl_idname = 'object.delete_my_mod_all' bl_label = 'DeleteAllMod' bl_options = {'REGISTER', 'UNDO'} def execute(self, context): bpy.ops.object.delete_all_modifiers() return {'FINISHED'} class MY_PT_3DViewPanel(bpy.types.Panel):
Итоговый проект по второй части
Capstone Project for Part 1
I made a script that clears the scene if there was anything superfluous), and adds two types of trees. With each click of the script, the trees are positioned differently, as well as their height. Script and screen import bpy import random green_plane = bpy.data.materials.new(name= "Trava") green_plane.diffuse_color = [0, 0.45, 0, 1] green_tree = bpy.data.materials.new(name= "Listva") green_tree.diffuse_color = [0, 0.7, 0, 1] brown_tree = bpy.data.materials.new(name= "Stvol") brown_tree.diffuse_color = [0.2, 0.1, 0, 1] green_black = bpy.data.materials.new(name= "Elka") green_black.diffuse_color = [0, 0.2, 0, 1] def clean_scene(): bpy.ops.object.select_all(action='SELECT') bpy.ops.object.delete() def add_plane(): bpy.ops.mesh.primitive_plane_add() plane = bpy.context.active_object plane.scale.x = 20 plane.scale.y = 20 plane.data.materials.append(green_plane) def add_tree(): for i in range(10): x = random.randint(-19, 19) y = random.randint(-19, 19) height = random.randint(4, 6) bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, location = (x,y, height / 2), depth = height) cyl = bpy.context.active_object cyl.data.materials.append(brown_tree) bpy.ops.mesh.primitive_uv_sphere_add(location = (x,y, height), radius = 3) uv = bpy.context.active_object uv.data.materials.append(green_tree) for i in range(10): x = random.randint(-19, 19) y = random.randint(-19, 19) height = random.randint(4, 6) bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, location = (x,y, height / 2), depth = height) cyl = bpy.context.active_object cyl.data.materials.append(brown_tree) bpy.ops.mesh.primitive_cone_add(location = (x,y, height), depth = height,radius1= 2) cone = bpy.context.active_object
Capstone Project for Part 1
Part 2 section 3 Quiz and Exercise...on the BaseMesh Class
Hi all, in Part 2 section 3 Quiz and Exercise...on the BaseMesh Class...the add_wireframe_mod() method is reading the wireframe_name attribute, but it always seems to be "None". I added a bunch of print statements to see what was getting passed and everytime it is "None". Even if the mesh already has multiple wireframe modifier on it. BaseMesh class seems to be overwriting the name...so it keeps adding wireframes.
1-28 of 28
CG Python Academy
skool.com/cgpython
3D artists learning Blender Python.
Leaderboard (30-day)
Powered by