Commit: 3643bf3be079d4f1c5192008be25c6fe17ebfba2
Author: Roman Pogribnyi
Date:   Fri Jul 25 19:40:31 2014 +0200
Branches: soc-2014-fluid
https://developer.blender.org/rB3643bf3be079d4f1c5192008be25c6fe17ebfba2

added start-end frame fields in UI

===================================================================

M       release/scripts/startup/bl_ui/properties_physics_smoke.py
M       source/blender/blenkernel/intern/smoke.c
M       source/blender/makesdna/DNA_smoke_types.h
M       source/blender/makesrna/intern/rna_smoke.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py 
b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 3a602ab..3f46517 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -409,6 +409,10 @@ class PHYSICS_PT_smoke_manta_settings(PhysicButtonsPanel, 
Panel):
         layout.active = domain.use_manta
         split = layout.split()
         split.operator("manta.export_scene", text="Create Manta Setup")
+        split = layout.split()
+        col = split.column()
+        col.prop(domain, "manta_start_frame", text="Start")
+        col.prop(domain, "manta_end_frame", text="End")
         col = split.column()
         col.prop(domain, "manta_solver_res", text="Solver Resolution")
         col.prop(domain, "manta_uvs", text="UVs count")
diff --git a/source/blender/blenkernel/intern/smoke.c 
b/source/blender/blenkernel/intern/smoke.c
index 8d0a5e0..e8f3861 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -565,6 +565,8 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
                        
                        /*mantaflow settings*/
                        smd-> domain->manta_solver_res = 3;
+                       smd-> domain->manta_start_frame = 1;
+                       smd-> domain->manta_end_frame = 10;
                        smd->domain->noise_clamp_neg = 0;
                        smd->domain->noise_clamp_pos = 1;
                        smd->domain->noise_val_scale = 1;
diff --git a/source/blender/makesdna/DNA_smoke_types.h 
b/source/blender/makesdna/DNA_smoke_types.h
index acf9982..e4b7820 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -153,6 +153,8 @@ typedef struct SmokeDomainSettings {
        float flame_smoke_color[3];
        /* mantaflow settings */
        int manta_solver_res;   /*dimension of manta solver, 2d or 3d*/
+       int manta_start_frame;
+       int manta_end_frame;
        int manta_uvs_num;              /*number of UVs, important for octaves 
count*/
                /*noise settings*/
        float noise_clamp_neg;
diff --git a/source/blender/makesrna/intern/rna_smoke.c 
b/source/blender/makesrna/intern/rna_smoke.c
index 82b9926..a8b6d5f 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -557,6 +557,20 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Solver Res", "Solver 
resolution(2D/3D)");
        RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, 
"rna_Smoke_reset");
 
+       prop = RNA_def_property(srna, "manta_start_frame", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "manta_start_frame");
+       RNA_def_property_range(prop, 0, 249);
+       RNA_def_property_ui_range(prop, 0, 249, 1, -1);
+       RNA_def_property_ui_text(prop, "Sim Start", "Frame from which to start 
simulation");
+       RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, 
"rna_Smoke_reset");
+       
+       prop = RNA_def_property(srna, "manta_end_frame", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "manta_end_frame");
+       RNA_def_property_range(prop, 1, 250);
+       RNA_def_property_ui_range(prop, 1, 250, 1, -1);
+       RNA_def_property_ui_text(prop, "Sim End", "Frame on which to end 
simulation");
+       RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, 
"rna_Smoke_reset");
+       
        prop = RNA_def_property(srna, "manta_uvs", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "manta_uvs_num");
        RNA_def_property_range(prop, 0, 4);

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

Reply via email to