Skip to content

ninja #23

Description

@ninjalovag-crypto

import bpy

Töröljük az alap kockát

bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()

Referenciakép betöltése háttérként

img_path = r"C:\Users\NEVED\Desktop\aaec143e.png" # <-- IDE írd be a képed elérési útját
bpy.ops.import_image.to_plane(files=[{"name":"aaec143e.png"}], directory=r"C:\Users\NEVED\Desktop")

Karakter mesh létrehozása (alap emberi forma)

bpy.ops.mesh.primitive_uv_sphere_add(radius=1, location=(0,0,1))
karakter = bpy.context.active_object
karakter.name = "Karakter"

Kard létrehozása (egyszerű téglatest)

bpy.ops.mesh.primitive_cube_add(size=0.1, location=(0.5,0,1))
kard = bpy.context.active_object
kard.name = "Kard"
kard.scale[2] = 5 # hosszú pengéhez

Aura (zöld energia)

bpy.ops.mesh.primitive_uv_sphere_add(radius=2, location=(0,0,1))
aura = bpy.context.active_object
aura.name = "Aura"

Átlátszó zöld anyag az aurához

mat = bpy.data.materials.new(name="AuraMaterial")
mat.use_nodes = True
nodes = mat.node_tree.nodes
nodes["Principled BSDF"].inputs["Base Color"].default_value = (0,1,0,1)
nodes["Principled BSDF"].inputs["Alpha"].default_value = 0.2
aura.data.materials.append(mat)

Exportálás OBJ fájlba

export_path = r"C:\Users\NEVED\Desktop\karakter.obj" # <-- IDE írd, hova mentse
bpy.ops.export_scene.obj(filepath=export_path, use_selection=False)

print("✅ OBJ fájl exportálva:", export_path)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions