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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-02-12 17:38:34 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-02-12 17:38:34 +0300
commitfafbd9d71b95776d1c7583476de74fccefab7f10 (patch)
tree838e0fbc2e53c0700a87ebc1fdf4798837ffda3e /release
parentc8c86aa6a12a253680aa266ce1c5d51b1b39005a (diff)
Particles todo item: particle textures
* Effecting particle properties with textures was possible in 2.49, but not in 2.5 anymore. * Now particles have their own textures (available in texture panel for objects with particle systems), which are totally separate from the material textures. * Currently a basic set of particle properties is available for texture control. Some others could still be added, but the whole system is not intended as an "change anything with a texture" as this kind of functionality will be provided with node particles in the future much better. * Combined with the previously added "particle texture coordinates" this new functionality also solves the problem of animating particle properties through the particle lifetime nicely. * Currently the textures only use the intensity of the texture in "multiply" blending mode, so in order for the textures to effect a particle parameter there has to be a non-zero value defined for the parameter in the particle settings. Other blend modes can be added later if they're considered useful enough.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/properties_texture.py57
1 files changed, 46 insertions, 11 deletions
diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py
index 05e130fac2d..ac3fc2d0b1d 100644
--- a/release/scripts/ui/properties_texture.py
+++ b/release/scripts/ui/properties_texture.py
@@ -60,6 +60,12 @@ def context_tex_datablock(context):
return idblock
idblock = context.brush
+ if idblock:
+ return idblock
+
+ if context.particle_system:
+ idblock = context.particle_system.settings
+
return idblock
@@ -84,7 +90,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
engine = context.scene.render.engine
if not hasattr(context, "texture_slot"):
return False
- return ((context.material or context.world or context.lamp or context.brush or context.texture)
+ return ((context.material or context.world or context.lamp or context.brush or context.texture or context.particle_system)
and (engine in cls.COMPAT_ENGINES))
def draw(self, context):
@@ -983,20 +989,49 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
col = split.column()
factor_but(col, "use_map_zenith_up", "zenith_up_factor", "Zenith Up")
factor_but(col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down")
+ elif isinstance(idblock, bpy.types.ParticleSettings):
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="General:")
+ factor_but(col, "use_map_time", "time_factor", "Time")
+ factor_but(col, "use_map_life", "life_factor", "Lifetime")
+ factor_but(col, "use_map_density", "density_factor", "Density")
+ factor_but(col, "use_map_size", "size_factor", "Size")
- layout.separator()
+ col = split.column()
+ col.label(text="Physics:")
+ factor_but(col, "use_map_velocity", "velocity_factor", "Velocity")
+ factor_but(col, "use_map_damp", "damp_factor", "Damp")
+ factor_but(col, "use_map_gravity", "gravity_factor", "Gravity")
+ factor_but(col, "use_map_field", "field_factor", "Force Fields")
+
+ layout.label(text="Hair:")
+
+ split = layout.split()
+
+ col = split.column()
+ factor_but(col, "use_map_length", "length_factor", "Length")
+ factor_but(col, "use_map_clump", "clump_factor", "Clump")
+
+ col = split.column()
+ factor_but(col, "use_map_kink", "kink_factor", "Kink")
+ factor_but(col, "use_map_rough", "rough_factor", "Rough")
- split = layout.split()
+ layout.separator()
+
+ if not isinstance(idblock, bpy.types.ParticleSettings):
+ split = layout.split()
- col = split.column()
- col.prop(tex, "blend_type", text="Blend")
- col.prop(tex, "use_rgb_to_intensity")
- # color is used on grayscale textures even when use_rgb_to_intensity is disabled.
- col.prop(tex, "color", text="")
+ col = split.column()
+ col.prop(tex, "blend_type", text="Blend")
+ col.prop(tex, "use_rgb_to_intensity")
+ # color is used on grayscale textures even when use_rgb_to_intensity is disabled.
+ col.prop(tex, "color", text="")
- col = split.column()
- col.prop(tex, "invert", text="Negative")
- col.prop(tex, "use_stencil")
+ col = split.column()
+ col.prop(tex, "invert", text="Negative")
+ col.prop(tex, "use_stencil")
if isinstance(idblock, bpy.types.Material) or isinstance(idblock, bpy.types.World):
col.prop(tex, "default_value", text="DVar", slider=True)