https://2023na2022.blogspot.com/2023/07/20230724-railcar.html
# コレクションを作る 重複の場合 作らない
import bpy
# List of collection names
collection_names = [
"単位円 torus",
"xyz 軸 円柱"
]
# Function to create a new collection if it doesn't exist
def create_collection_if_not_exists(name):
if name not in bpy.data.collections:
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
# Create collections
for name in collection_names:
create_collection_if_not_exists(name)
# Assumed Plane
import bpy
# List of collection names
collection_names = [
"Assumed Plane",
"ap Y=0 Assumed Plane",
"ap Y=1 Assumed Plane",
"ap Y=root3 Assumed Plane",
"ap Y=2 Assumed Plane",
"ap Y=5 Assumed Plane",
"ap Y=10 Assumed Plane"
]
# Function to create a new collection
def create_collection(name):
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
return collection
# Create collections
for name in collection_names:
create_collection(name)
# My train car
import bpy
# List of collection names
collection_names = [
"My train car",
"mtc 0.8 size",
"mtc 0.1 size"
]
# Function to create a new collection
def create_collection(name):
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
return collection
# Create collections
for name in collection_names:
create_collection(name)
# My train car
import bpy
# List of collection names
collection_names = [
"My train car",
"mtc 0.1 size",
"mtc 0.18 size"
]
# Function to create a new collection
def create_collection(name):
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
return collection
# Create collections
for name in collection_names:
create_collection(name)
import bpy
# List of collection names
collection_names = [
"My upper",
"My upper",
"5",
"√3",
"1",
"球体中心",
"観察者"
]
# Function to create a new collection
def create_collection(name):
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
return collection
# Create collections
for name in collection_names:
create_collection(name)
import bpy
# List of collection names
collection_names = [
"My upper", "My upper","5", "√3", "1", "球体中心", "観察者"
]
# Function to create a new collection
def create_collection(name):
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
return collection
# Create collections
for name in collection_names:
create_collection(name)
import bpy
# List of collection names
collection_names = [
"My upper", "My upper","5", "√3", "1", "球体中心", "観察者"
]
# Function to create a new collection
def create_collection(name):
collection = bpy.data.collections.new(name)
bpy.context.scene.collection.children.link(collection)
return collection
# Create collections
for name in collection_names:
create_collection(name)