Revision: 22266
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22266
Author:   genscher
Date:     2009-08-06 17:55:42 +0200 (Thu, 06 Aug 2009)

Log Message:
-----------
smoke gui: refining the new simulation panel ui 
(thanks to nudelZ for this patch)

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_physics_smoke.py

Modified: branches/blender2.5/blender/release/ui/buttons_physics_smoke.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_physics_smoke.py     
2009-08-06 15:54:57 UTC (rev 22265)
+++ branches/blender2.5/blender/release/ui/buttons_physics_smoke.py     
2009-08-06 15:55:42 UTC (rev 22266)
@@ -1,65 +1,101 @@
-
-import bpy
-
-class PhysicButtonsPanel(bpy.types.Panel):
-       __space_type__ = "BUTTONS_WINDOW"
-       __region_type__ = "WINDOW"
-       __context__ = "physics"
-
-       def poll(self, context):
-               ob = context.object
-               rd = context.scene.render_data
-               return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
-               
-class PHYSICS_PT_smoke(PhysicButtonsPanel):
-       __label__ = "Smoke"
-
-       def draw(self, context):
-               layout = self.layout
-               
-               md = context.smoke
-               ob = context.object
-
-               split = layout.split()
-               split.operator_context = 'EXEC_DEFAULT'
-
-               if md:
-                       # remove modifier + settings
-                       split.set_context_pointer("modifier", md)
-                       split.itemO("object.modifier_remove", text="Remove")
-
-                       row = split.row(align=True)
-                       row.itemR(md, "render", text="")
-                       row.itemR(md, "realtime", text="")
-                       
-               else:
-                       # add modifier
-                       split.item_enumO("object.modifier_add", "type", 
'SMOKE', text="Add")
-                       split.itemL()
-
-               if md:
-                       layout.itemR(md, "smoke_type")
-               
-                       if md.smoke_type == 'TYPE_DOMAIN':
-                               layout.itemS()
-                               layout.itemR(md.domain_settings, "maxres")
-                               layout.itemR(md.domain_settings, "color")
-                               layout.itemR(md.domain_settings, "amplify")
-                               layout.itemR(md.domain_settings, "highres")
-                               layout.itemR(md.domain_settings, "noise_type")
-                               layout.itemR(md.domain_settings, "visibility")
-                               layout.itemR(md.domain_settings, "alpha")
-                               layout.itemR(md.domain_settings, "beta")
-                               layout.itemR(md.domain_settings, "fluid_group")
-                               layout.itemR(md.domain_settings, "eff_group")
-                               layout.itemR(md.domain_settings, "coll_group")
-                       elif md.smoke_type == 'TYPE_FLOW':
-                               layout.itemS()
-                               layout.itemR(md.flow_settings, "outflow")
-                               layout.itemR(md.flow_settings, "density")
-                               layout.itemR(md.flow_settings, "temperature")
-                               layout.item_pointerR(md.flow_settings, "psys", 
ob, "particle_systems")
-                       elif md.smoke_type == 'TYPE_COLL':
-                               layout.itemS()
-
-bpy.types.register(PHYSICS_PT_smoke)
+
+import bpy
+
+class PhysicButtonsPanel(bpy.types.Panel):
+       __space_type__ = "BUTTONS_WINDOW"
+       __region_type__ = "WINDOW"
+       __context__ = "physics"
+
+       def poll(self, context):
+               ob = context.object
+               rd = context.scene.render_data
+               return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
+               
+class PHYSICS_PT_smoke(PhysicButtonsPanel):
+       __label__ = "Smoke"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               md = context.smoke
+               ob = context.object
+
+               split = layout.split()
+               split.operator_context = 'EXEC_DEFAULT'
+
+               if md:
+                       # remove modifier + settings
+                       split.set_context_pointer("modifier", md)
+                       split.itemO("object.modifier_remove", text="Remove")
+
+                       row = split.row(align=True)
+                       row.itemR(md, "render", text="")
+                       row.itemR(md, "realtime", text="")
+                       
+               else:
+                       # add modifier
+                       split.item_enumO("object.modifier_add", "type", 
'SMOKE', text="Add")
+                       split.itemL()
+
+               if md:
+                       layout.itemR(md, "smoke_type")
+               
+                       if md.smoke_type == 'TYPE_DOMAIN':
+                               
+                               split = layout.split()
+                               
+                               col = split.column()
+                               col.itemL(text="Behavior:")
+                               col.itemR(md.domain_settings, "alpha")
+                               col.itemR(md.domain_settings, "beta")
+                               
+                               col.itemL(text="Resolution:")
+                               col.itemR(md.domain_settings, "maxres", 
text="Low")
+                               sub = col.column()
+                               sub.active = md.domain_settings.highres
+                               sub.itemR(md.domain_settings, "amplify", 
text="High")
+                               col.itemR(md.domain_settings, "highres", 
text="Use High Resolution")
+                               
+                               sub = split.column()
+                               sub.itemL(text="Display:")
+                               sub.itemR(md.domain_settings, "visibility")
+                               sub.itemR(md.domain_settings, "color")
+                               
+                               layout.itemL(text="Noise Type:")
+                               layout.itemR(md.domain_settings, "noise_type", 
expand=True)
+                               
+                               split = layout.split()
+                               
+                               col = split.column()
+                               col.itemL(text="Flow Group:")
+                               col.itemR(md.domain_settings, "fluid_group", 
text="")
+                               
+                               #col.itemL(text="Effector Group:")
+                               #col.itemR(md.domain_settings, "eff_group", 
text="")
+                               
+                               col = split.column()
+                               col.itemL(text="Collision Group:")
+                               col.itemR(md.domain_settings, "coll_group", 
text="")
+                               
+                       elif md.smoke_type == 'TYPE_FLOW':
+                               
+                               layout.itemR(md.flow_settings, "outflow")
+                               
+                               split = layout.split()
+                               
+                               if md.flow_settings.outflow:                    
        
+                                       col = split.column()
+                               else:
+                                       col = split.column()
+                                       col.itemL(text="Behavior:")
+                                       col.itemR(md.flow_settings, 
"temperature")
+                                       col.itemR(md.flow_settings, "density")
+                               
+                                       sub = split.column()
+                                       sub.itemL(text="particle System:")
+                                       sub.item_pointerR(md.flow_settings, 
"psys", ob, "particle_systems", text="")
+                                       
+                       elif md.smoke_type == 'TYPE_COLL':
+                               layout.itemS()
+
+bpy.types.register(PHYSICS_PT_smoke)
\ No newline at end of file


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to