縦写真 デューラー 女性モデル裸体



import bpy

# コレクションを作成

collection_name = "写真 xz 正方形"

if collection_name not in bpy.data.collections:

    sphere_collection = bpy.data.collections.new(collection_name)

    bpy.context.scene.collection.children.link(sphere_collection)

else:

    sphere_collection = bpy.data.collections[collection_name]





import bpy


zion_name = "女性モデル裸体"


shashin = "C:/aaa 2023 dondon/aaa2023いつもの/test_image/Draughtsman Making a Perspective Drawing of a Reclining Woman.jpg"



# 正方形を作成

bpy.ops.mesh.primitive_plane_add(size=60, enter_editmode=False, align='WORLD', location=(0,0,0))

square_obj = bpy.context.active_object


# オブジェクトに名前を付ける

obj = bpy.context.active_object

obj.name = zion_name





# マテリアルを作成

material = bpy.data.materials.new(name="ImageMaterial")

material.use_nodes = True

square_obj.data.materials.append(material)

square_obj.active_material = material


# テクスチャイメージを読み込む

img_path = shashin

tex = bpy.data.images.load(img_path)


# テクスチャノードを作成し、マテリアルに接続する

tex_node = material.node_tree.nodes.new("ShaderNodeTexImage")

tex_node.image = tex

tex_node.location = (-400, 0)

output_node = material.node_tree.nodes["Material Output"]

material.node_tree.links.new(tex_node.outputs[0], output_node.inputs[0])


# オブジェクトをXZ平面に回転する

square_obj.rotation_euler = (1.5708, 0, 0)
















俺用


 shashin = "C:/aaa 2023 dondon/aaa2023いつもの/test_image/Draughtsman Making a Perspective Drawing of a Reclining Woman.jpg"

"C:\aaa 2023 dondon\aaa2023いつもの\test_image\Draughtsman Making a Perspective Drawing of a Reclining Woman.jpg"



このブログの人気の投稿

基本の   線路レール

成功 十字額縁 平行移動 縦横 2つのスクリプト

# トーラス 完全版 過去光円錐