[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29309] trunk/blender: Smoke UI:

Thomas Dinges dingto at gmx.de
Mon Jun 7 17:28:17 CEST 2010


Revision: 29309
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29309
Author:   dingto
Date:     2010-06-07 17:28:17 +0200 (Mon, 07 Jun 2010)

Log Message:
-----------
Smoke UI:
* Greying out for Smoke High Resolution Panel.
* Code cleaning, removed some unnecessary declarations. 

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_physics_smoke.py
    trunk/blender/source/blender/makesrna/intern/rna_modifier.c

Modified: trunk/blender/release/scripts/ui/properties_physics_smoke.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_smoke.py	2010-06-07 14:54:42 UTC (rev 29308)
+++ trunk/blender/release/scripts/ui/properties_physics_smoke.py	2010-06-07 15:28:17 UTC (rev 29309)
@@ -70,8 +70,7 @@
             else:
                 layout.prop(md, "smoke_type", text="")
 
-            if md.smoke_type == 'TYPE_DOMAIN':
-
+            if md.smoke_type == 'DOMAIN':
                 domain = md.domain_settings
 
                 split = layout.split()
@@ -93,8 +92,7 @@
                 sub.prop(domain, "dissolve_speed", text="Time")
                 sub.prop(domain, "dissolve_smoke_log", text="Slow")
 
-            elif md.smoke_type == 'TYPE_FLOW':
-
+            elif md.smoke_type == 'FLOW':
                 flow = md.flow_settings
 
                 split = layout.split()
@@ -114,7 +112,7 @@
                     col.prop(flow, "temperature")
                     col.prop(flow, "density")
 
-            #elif md.smoke_type == 'TYPE_COLL':
+            #elif md.smoke_type == 'COLLISION':
             #	layout.separator()
 
 
@@ -124,7 +122,7 @@
 
     def poll(self, context):
         md = context.smoke
-        return md and (md.smoke_type == 'TYPE_DOMAIN')
+        return md and (md.smoke_type == 'DOMAIN')
 
     def draw(self, context):
         layout = self.layout
@@ -153,19 +151,17 @@
 
     def poll(self, context):
         md = context.smoke
-        return md and (md.smoke_type == 'TYPE_DOMAIN')
+        return md and (md.smoke_type == 'DOMAIN')
 
     def draw(self, context):
         layout = self.layout
 
-        domain = context.smoke.domain_settings
-
-        layout.label(text="Compression:")
-        layout.prop(domain, "smoke_cache_comp", expand=True)
-
         md = context.smoke.domain_settings
         cache = md.point_cache_low
 
+        layout.label(text="Compression:")
+        layout.prop(md, "smoke_cache_comp", expand=True)
+
         point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
 
 
@@ -175,18 +171,20 @@
 
     def poll(self, context):
         md = context.smoke
-        return md and (md.smoke_type == 'TYPE_DOMAIN')
+        return md and (md.smoke_type == 'DOMAIN')
 
     def draw_header(self, context):
-        high = context.smoke.domain_settings
+        md = context.smoke.domain_settings
 
-        self.layout.prop(high, "highres", text="")
+        self.layout.prop(md, "highres", text="")
 
     def draw(self, context):
         layout = self.layout
 
         md = context.smoke.domain_settings
         wide_ui = context.region.width > narrowui
+        
+        layout.active = md.highres
 
         split = layout.split()
 
@@ -208,20 +206,17 @@
 
     def poll(self, context):
         md = context.smoke
-        return md and (md.smoke_type == 'TYPE_DOMAIN') and md.domain_settings.highres
+        return md and (md.smoke_type == 'DOMAIN') and md.domain_settings.highres
 
     def draw(self, context):
         layout = self.layout
 
-        domain = context.smoke.domain_settings
-
-        layout.label(text="Compression:")
-        layout.prop(domain, "smoke_cache_high_comp", expand=True)
-
-
         md = context.smoke.domain_settings
         cache = md.point_cache_high
 
+        layout.label(text="Compression:")
+        layout.prop(md, "smoke_cache_high_comp", expand=True)
+
         point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
 
 
@@ -231,7 +226,7 @@
 
     def poll(self, context):
         smoke = context.smoke
-        return (smoke and smoke.smoke_type == 'TYPE_DOMAIN')
+        return (smoke and smoke.smoke_type == 'DOMAIN')
 
     def draw(self, context):
         domain = context.smoke.domain_settings

Modified: trunk/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_modifier.c	2010-06-07 14:54:42 UTC (rev 29308)
+++ trunk/blender/source/blender/makesrna/intern/rna_modifier.c	2010-06-07 15:28:17 UTC (rev 29309)
@@ -1725,9 +1725,9 @@
 	
 	static EnumPropertyItem prop_smoke_type_items[] = {
 			{0, "NONE", 0, "None", ""},
-			{MOD_SMOKE_TYPE_DOMAIN, "TYPE_DOMAIN", 0, "Domain", ""},
-			{MOD_SMOKE_TYPE_FLOW, "TYPE_FLOW", 0, "Flow", "Inflow/Outflow"},
-			{MOD_SMOKE_TYPE_COLL, "TYPE_COLL", 0, "Collision", ""},
+			{MOD_SMOKE_TYPE_DOMAIN, "DOMAIN", 0, "Domain", ""},
+			{MOD_SMOKE_TYPE_FLOW, "FLOW", 0, "Flow", "Inflow/Outflow"},
+			{MOD_SMOKE_TYPE_COLL, "COLLISION", 0, "Collision", ""},
 			{0, NULL, 0, NULL, NULL}};
 	
 	srna= RNA_def_struct(brna, "SmokeModifier", "Modifier");





More information about the Bf-blender-cvs mailing list