diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-16 16:55:52 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-16 16:55:52 +0400 |
commit | a0855a95db222e64d84682edff1df21308f51b5c (patch) | |
tree | dd8892952a97eeb741fdc34eef0110e50fa4a7ed /intern | |
parent | 677f519ca5a7a68b8e361487f2c9883e2cdc8861 (diff) |
Cycles: add "Textures" panel in particle properties, to make it possble to add
textures when Cycles is selected as render engine.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 66f99beeb97..86a1ab3c3e0 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -915,6 +915,37 @@ class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel): layout.template_color_ramp(mapping, "color_ramp", expand=True) +class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel): + bl_label = "Textures" + bl_context = "particle" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + psys = context.particle_system + return psys and CyclesButtonsPanel.poll(context) + + def draw(self, context): + layout = self.layout + + psys = context.particle_system + part = psys.settings + + row = layout.row() + row.template_list(part, "texture_slots", part, "active_texture_index", rows=2) + + col = row.column(align=True) + col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP' + col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN' + col.menu("TEXTURE_MT_specials", icon='DOWNARROW_HLT', text="") + + if not part.active_texture: + layout.template_ID(part, "active_texture", new="texture.new") + else: + slot = part.texture_slots[part.active_texture_index] + layout.template_ID(slot, "texture", new="texture.new") + + class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel): bl_label = "Simplify" bl_context = "scene" @@ -1027,6 +1058,7 @@ def get_panels(): bpy.types.TEXTURE_PT_pointdensity_turbulence, bpy.types.TEXTURE_PT_mapping, bpy.types.TEXTURE_PT_influence, + bpy.types.TEXTURE_PT_colors, bpy.types.PARTICLE_PT_context_particles, bpy.types.PARTICLE_PT_emission, bpy.types.PARTICLE_PT_hair_dynamics, |