Revision: 22059
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22059
Author:   dingto
Date:     2009-07-30 18:38:00 +0200 (Thu, 30 Jul 2009)

Log Message:
-----------
2.5 Smoke:

* Put Smoke Modifier in the right alphabetical order in RNA and py file.
* Some small naming changes.

Commit approved by Genscher. :)

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/buttons_data_modifier.py
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c

Modified: branches/blender2.5/blender/release/ui/buttons_data_modifier.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_data_modifier.py     
2009-07-30 16:26:03 UTC (rev 22058)
+++ branches/blender2.5/blender/release/ui/buttons_data_modifier.py     
2009-07-30 16:38:00 UTC (rev 22059)
@@ -70,6 +70,8 @@
                                        self.shrinkwrap(box, ob, md)
                                elif md.type == 'SIMPLE_DEFORM':
                                        self.simpledeform(box, ob, md)
+                               elif md.type == 'SMOKE':
+                                       self.smoke(box, ob, md)
                                elif md.type == 'SMOOTH':
                                        self.smooth(box, ob, md)
                                elif md.type == 'SOFTBODY':
@@ -82,8 +84,6 @@
                                        self.uvproject(box, ob, md)
                                elif md.type == 'WAVE':
                                        self.wave(box, ob, md)
-                               if md.type == 'SMOKE':
-                                       self.smoke(box, ob, md)
                                                        
        def armature(self, layout, ob, md):
                layout.itemR(md, "object")
@@ -357,6 +357,32 @@
                if md.mode in ('TAPER', 'STRETCH'):
                        layout.itemR(md, "lock_x_axis")
                        layout.itemR(md, "lock_y_axis")
+                       
+       def smoke(self, layout, ob, 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, "density")
+                       layout.itemR(md.flow_settings, "temperature")
+                       layout.itemL(text="Velocity")
+                       layout.row().itemR(md.flow_settings, "velocity", 
text="")
+                       layout.item_pointerR(md.flow_settings, "psys", ob, 
"particle_systems")
+               elif md.smoke_type == 'TYPE_COLL':
+                       layout.itemS()
        
        def smooth(self, layout, ob, md):
                split = layout.split()
@@ -436,30 +462,5 @@
                flow.itemR(md, "height", slider=True)
                flow.itemR(md, "width", slider=True)
                flow.itemR(md, "narrowness", slider=True)
-               
-       def smoke(self, layout, ob, md):
-               layout.itemR(md, "fluid_type")
-               if md.fluid_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")
-               if md.fluid_type == 'TYPE_FLOW':
-                       layout.itemS()
-                       layout.itemR(md.flow_settings, "density")
-                       layout.itemR(md.flow_settings, "temperature")
-                       layout.itemL(text="Velocity")
-                       layout.row().itemR(md.flow_settings, "velocity", 
text="")
-                       layout.item_pointerR(md.flow_settings, "psys", ob, 
"particle_systems")
-               if md.fluid_type == 'TYPE_FLUID':
-                       layout.itemS()
 
 bpy.types.register(DATA_PT_modifiers)

Modified: 
branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c   
2009-07-30 16:26:03 UTC (rev 22058)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c   
2009-07-30 16:38:00 UTC (rev 22059)
@@ -65,13 +65,13 @@
        {eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, 
"Particle System", ""},
        {eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, 
"Shrinkwrap", ""},
        {eModifierType_SimpleDeform, "SIMPLE_DEFORM", ICON_MOD_SIMPLEDEFORM, 
"Simple Deform", ""},
+       {eModifierType_Smoke, "SMOKE", 0, "Smoke", ""},
        {eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
        {eModifierType_Softbody, "SOFTBODY", ICON_MOD_SOFT, "Soft Body", ""},
        {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subsurf", ""},
        {eModifierType_Surface, "SURFACE", ICON_MOD_PHYSICS, "Surface", ""},
        {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV 
Project", ""},
        {eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
-       {eModifierType_Smoke, "SMOKE", 0, "Smoke", ""},
        {0, NULL, 0, NULL, NULL}};
 
 
@@ -1510,7 +1510,7 @@
        RNA_def_property_pointer_sdna(prop, NULL, "coll");
        RNA_def_property_ui_text(prop, "Collision Settings", "");
        
-       prop= RNA_def_property(srna, "fluid_type", PROP_ENUM, PROP_NONE);
+       prop= RNA_def_property(srna, "smoke_type", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "type");
        RNA_def_property_enum_items(prop, prop_smoke_type_items);
        RNA_def_property_ui_text(prop, "Type", "");


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

Reply via email to