Fix for [#26520] Point Density turbulence not accessible in Texture Properties.

* Mistake in the ui file.
* Also found a possible memory leak.
This commit is contained in:
2011-03-16 18:21:31 +00:00
parent bcee2343ea
commit 6dda182a76
3 changed files with 18 additions and 12 deletions

View File

@@ -706,12 +706,13 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, bpy.types.Panel):
col.separator()
col.label(text="Color Source:")
col.prop(pd, "color_source", text="")
if pd.color_source in {'PARTICLE_SPEED', 'PARTICLE_VELOCITY'}:
col.prop(pd, "speed_scale")
if pd.color_source in {'PARTICLE_SPEED', 'PARTICLE_AGE'}:
layout.template_color_ramp(pd, "color_ramp", expand=True)
if pd.point_source == 'PARTICLE_SYSTEM':
col.label(text="Color Source:")
col.prop(pd, "color_source", text="")
if pd.color_source in {'PARTICLE_SPEED', 'PARTICLE_VELOCITY'}:
col.prop(pd, "speed_scale")
if pd.color_source in {'PARTICLE_SPEED', 'PARTICLE_AGE'}:
layout.template_color_ramp(pd, "color_ramp", expand=True)
col = split.column()
col.label()
@@ -733,7 +734,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
return tex and (tex.type == 'POINT_DENSITY' and (engine in cls.COMPAT_ENGINES))
def draw_header(self, context):
pd = tex.point_density
pd = context.texture.point_density
self.layout.prop(pd, "use_turbulence", text="")