Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-25 05:22:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-25 05:22:50 +0400
commita695741a4858b429f17db6e9cce6a171c32d769d (patch)
tree0b156ec707bda32e7c097a832dbf04353517fa05 /object_cloud_gen.py
parent980d7fe327a1ae874939b9ca04b3697396f49299 (diff)
updates to blender rna api
Diffstat (limited to 'object_cloud_gen.py')
-rw-r--r--object_cloud_gen.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index 5122871e..4a08f484 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -461,7 +461,7 @@ class GenerateCloud(bpy.types.Operator):
bpy.ops.object.particle_system_add()
#Particle settings setting it up!
- cloudParticles = cloud.active_particle_system
+ cloudParticles = cloud.particle_systems.active
cloudParticles.name = "CloudParticles"
cloudParticles.settings.frame_start = 0
cloudParticles.settings.frame_end = 0
@@ -507,11 +507,10 @@ class GenerateCloud(bpy.types.Operator):
# Add a texture
vMaterialTextureSlots = cloudMaterial.texture_slots
- cloudtex = main.textures.new("CloudTex")
- cloudMaterial.add_texture(cloudtex, 'ORCO')
- cloudtex.type = 'CLOUDS'
+ cloudtex = main.textures.new("CloudTex", type='CLOUDS')
cloudtex.noise_type = 'HARD_NOISE'
cloudtex.noise_scale = 2
+ cloudMaterial.add_texture(cloudtex, 'ORCO')
# Add a force field to the points.
cloudField = bounds.field
@@ -528,10 +527,8 @@ class GenerateCloud(bpy.types.Operator):
#bpy.ops.ptcache.bake(bake=False)
# Add a Point Density texture
- cloudPointDensity = main.textures.new("CloudPointDensity")
- cloudPointDensity.type = 'POINT_DENSITY'
- cloudMaterial.add_texture(cloudPointDensity, 'ORCO')
- pDensity = vMaterialTextureSlots[1].texture
+ pDensity = main.textures.new("CloudPointDensity", 'POINT_DENSITY')
+ cloudMaterial.add_texture(pDensity, 'ORCO')
vMaterialTextureSlots[1].use_map_density = True
vMaterialTextureSlots[1].use_rgb_to_intensity = True
vMaterialTextureSlots[1].texture_coords = 'GLOBAL'