# Fonction pour créer une sphère pour la tête def create_head(): bpy.ops.mesh.primitive_uv_sphere_add(radius=1 , location=(0 , 0 , 2)) head = bpy.context.active_object head.name = "Head" bpy.ops.object.shade_smooth() # Fonction pour créer des cylindres pour les bras et les jambes def create_limb(name , radius , height , location): bpy.ops.mesh.primitive_cylinder_add(radius=radius , depth=height , location=location) limb = bpy.context.active_object limb.name = name bpy.ops.object.shade_smooth() # Fonction pour créer un cône pour le chapeau def create_hat(): bpy.ops.mesh.primitive_cone_add(radius1=1 , radius2=0 , depth=2 , location=(0 , 0 , 3.5)) hat = bpy.context.active_object hat.name = "Hat" bpy.ops.object.shade_smooth() # Fonction pour créer une sphère pour les mains def create_hands(): bpy.ops.mesh.primitive_uv_sphere_add(radius=0.5 , location=(1.5 , 0 , 1)) hand1 = bpy.context.active_object hand1.name = "Hand1" bpy.ops.object.shade_smooth() bpy.ops.mesh.primitive_uv_sphere_add(radius=0.5 , location=(-1.5 , 0 , 1)) hand2 = bpy.context.active_object hand2.name = "Hand2" bpy.ops.object.shade_smooth() # Fonction pour créer des cubes pour le torse et les pieds def create_body(): bpy.ops.mesh.primitive_cube_add(size=2 , location=(0 , 0 , 0.5)) body = bpy.context.active_object body.name = "Body" bpy.ops.object.shade_smooth() def create_feet(): bpy.ops.mesh.primitive_cube_add(size=1 , location=(1 , 0 , -1)) foot1 = bpy.context.active_object foot1.name = "Foot1" bpy.ops.object.shade_smooth() bpy.ops.mesh.primitive_cube_add(size=1 , location=(-1 , 0 , -1)) foot2 = bpy.context.active_object foot2.name = "Foot2" bpy.ops.object.shade_smooth() # Appel des fonctions pour créer le personnage create_head() create_limb("RightArm" , 0.2 , 2 , (1.5 , 0 , 1)) create_limb("LeftArm" , 0.2 , 2 , (-1.5 , 0 , 1)) create_limb("RightLeg" , 0.3 , 2 , (0.5 , 0 , -1)) create_limb("LeftLeg" , 0.3 , 2 , (-0.5 , 0 , -1)) create_hat() create_hands() create_body() create_feet() ,
{ "seed": "1274706808", "width": 512, "height": 512, "version": "SH_JuggernautXL", "sampler_name": "k_dpmpp_sde", "cfg_scale": 5, "steps": 20 }
Created on: 3/2/2025, 10:47:07 PM