Nu kun je alle instellingen aanpassen.
Zorg er wel voor dat ALLE instellingen staan zoals je ze wilt, want het script past alles aan. En het script komt al met instelligen in zich.
#Script to modify cloth simulation setings from opbjects from Linked File
#Author: Mark van Dijk
import bpy
#######set the object you want to change cloth settings from, place the name between "s
# EXAMPLE: "My_Object"
objectname = "Cylinder"
#######Cloth Settings
QualitySteps = 5 #Quality of the simulation in steps per frame
MaterialMass = 0.3 #Mass of the cloth material
MaterialStructural = 15 #stiffness of structure
MaterialBending = 0.5 #Wrinkle Coefficent
DampingSpring = 5 #Damping of cloth velocity
DampingAir = 1 #Thickness of the air, slowing falling things
DampingVelocity = 1 #Help cloth to reach resting position faster USAGE: must between 0 and 1
Pinning = True #Enable pinning of cloth vertices USAGE: True or False
PinVertexGroup = 'Pin' #Vertex group for pinning Vertices USAGE: place groupname between ', use '' if empty
PinSpringStiffness = 1 #Pin spring stiffness
PrerollFrames = 0 #Start simulation a number of frames earlier to let the cloth set in
#Cloth Cache Settings
FrameStart = 1 #Frame on which the simulation starts. EXAMPLE: FrameStart = 1
FrameEnd = 50 #Frame on which the simulation ends. EXAMPLE: FrameEnd = 50
DiskCache = True #Save cache files to disk USAGE: True or False
UseLibPath = False #Use this file's path for the disk
#cache when library linked into another file USAGE: True or False
Compression = 'NO' #Compression method to be used USAGE: 'NO' or 'LIGHT' or 'HEAVY'
#Cloth Collision
UseCollision = True #Enable collisions with other objects
CollQuality = 2 #How many collision iterations should be done
Distance = 0.015
Repel = 0
RepelDistance = 0.001
Friction = 5
SelfCollision = True
SelfCollQuality = 1 #How many self collision iterations should be done
SelfCollDistance = 0.75
VertexGroupNoColl = '' #Vertex group of vertices which won't collide USAGE: place groupname between ', use '' if empty
CollisionGroup = None #Limit colliders to this group
#Cloth Stiffness Scaling
UseStiffnessScaling = False
StructuralStiffnessGroup = ''
MaxStructStiffness = 0
BendingStiffnessGroup = ''
MaxBendStiffness = 0
#Cloth Sewing Springs
UseSewingSprings = False
SewingForce = 0
ShrinkingClothGroup = ''
MinShrink = 0
MaxShrink = 0
#Cloth Field Weight
EffectorGroup = None
Gravity = 1
All = 1
Force = 1
Vortex = 1
Magnetic = 1
Wind = 1
CurveGuide = 1
Texture = 1
SmokeFlow = 1
Harmonic = 1
Charge = 1
LennardJones = 1
Turbulence = 1
Drag = 1
Boid = 1
################################################
### Don't change anything beneath this block ###
################################################
#setting the object, modifier and Cache
obj = bpy.data.objects [objectname]
Cloth = obj.modifiers["Cloth"]
ClothCache = Cloth.point_cache
#changing Settings
Cloth.settings.quality = QualitySteps
Cloth.settings.mass = MaterialMass
Cloth.settings.structural_stiffness = MaterialStructural
Cloth.settings.bending_stiffness = MaterialBending
Cloth.settings.spring_damping = DampingSpring
Cloth.settings.air_damping = DampingAir
Cloth.settings.vel_damping = DampingVelocity
Cloth.settings.use_pin_cloth = Pinning
Cloth.settings.vertex_group_mass = PinVertexGroup
Cloth.settings.pin_stiffness = PinSpringStiffness
Cloth.settings.pre_roll = PrerollFrames
ClothCache.frame_start = FrameStart
ClothCache.frame_end = FrameEnd
ClothCache.use_disk_cache = DiskCache
ClothCache.use_library_path = UseLibPath
ClothCache.compression = Compression
Cloth.collision_settings.use_collision = UseCollision
Cloth.collision_settings.collision_quality = CollQuality
Cloth.collision_settings.distance_min = Distance
Cloth.collision_settings.repel_force = Repel
Cloth.collision_settings.distance_repel = RepelDistance
Cloth.collision_settings.friction = Friction
Cloth.collision_settings.use_self_collision = SelfCollision
Cloth.collision_settings.self_collision_quality = SelfCollQuality
Cloth.collision_settings.self_distance_min = SelfCollDistance
Cloth.collision_settings.vertex_group_self_collisions = VertexGroupNoColl
Cloth.collision_settings.group = CollisionGroup
Cloth.settings.use_stiffness_scale = UseStiffnessScaling
Cloth.settings.vertex_group_structural_stiffness = StructuralStiffnessGroup
Cloth.settings.structural_stiffness_max = MaxStructStiffness
Cloth.settings.vertex_group_bending = BendingStiffnessGroup
Cloth.settings.bending_stiffness_max = MaxBendStiffness
Cloth.settings.use_sewing_springs = UseSewingSprings
Cloth.settings.sewing_force_max = SewingForce
Cloth.settings.vertex_group_shrink = ShrinkingClothGroup
Cloth.settings.shrink_min = MinShrink
Cloth.settings.shrink_max = MaxShrink
Cloth.settings.effector_weights.group = EffectorGroup
Cloth.settings.effector_weights.gravity = Gravity
Cloth.settings.effector_weights.all = All
Cloth.settings.effector_weights.force = Force
Cloth.settings.effector_weights.vortex = Vortex
Cloth.settings.effector_weights.magnetic = Magnetic
Cloth.settings.effector_weights.wind = Wind
Cloth.settings.effector_weights.curve_guide = CurveGuide
Cloth.settings.effector_weights.texture = Texture
Cloth.settings.effector_weights.smokeflow = SmokeFlow
Cloth.settings.effector_weights.harmonic = Harmonic
Cloth.settings.effector_weights.charge = Charge
Cloth.settings.effector_weights.lennardjones = LennardJones
Cloth.settings.effector_weights.turbulence = Turbulence
Cloth.settings.effector_weights.drag = Drag
Cloth.settings.effector_weights.boid = Boid