Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 6d7187da7d9..ab8b54334fe 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -24,13 +24,8 @@
* \ingroup RNA
*/
-
#include <stdlib.h>
-#include "RNA_define.h"
-
-#include "rna_internal.h"
-
#include "DNA_cloth_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
@@ -38,6 +33,10 @@
#include "DNA_scene_types.h"
#include "DNA_smoke_types.h"
+#include "RNA_define.h"
+
+#include "rna_internal.h"
+
#include "WM_api.h"
#include "WM_types.h"
@@ -484,7 +483,7 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
part->pd->tex = NULL;
}
- if (part->pd2->forcefield != PFIELD_TEXTURE && part->pd2->tex) {
+ if (part->pd2 && part->pd2->forcefield != PFIELD_TEXTURE && part->pd2->tex) {
part->pd2->tex->id.us--;
part->pd2->tex = NULL;
}
@@ -521,7 +520,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA
}
else {
if (!pd || pd->shape != PFIELD_SHAPE_SURFACE)
- ED_object_modifier_remove(NULL, bmain, scene, ob, md);
+ ED_object_modifier_remove(NULL, bmain, ob, md);
}
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
@@ -547,7 +546,7 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point
rna_FieldSettings_shape_update(bmain, scene, ptr);
- DAG_scene_sort(bmain, scene);
+ DAG_relations_tag_update(bmain);
if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
@@ -590,9 +589,9 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
-static void rna_EffectorWeight_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+static void rna_EffectorWeight_dependency_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
- DAG_scene_sort(bmain, scene);
+ DAG_relations_tag_update(bmain);
DAG_id_tag_update((ID *)ptr->id.data, OB_RECALC_DATA | PSYS_RECALC_RESET);
@@ -669,7 +668,7 @@ static void rna_CollisionSettings_dependency_update(Main *bmain, Scene *scene, P
if (ob->pd->deflect && !md)
ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Collision);
else if (!ob->pd->deflect && md)
- ED_object_modifier_remove(NULL, bmain, scene, ob, md);
+ ED_object_modifier_remove(NULL, bmain, ob, md);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
}
@@ -763,7 +762,8 @@ static void rna_def_pointcache(BlenderRNA *brna)
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startframe");
- RNA_def_property_range(prop, 1, MAXFRAME);
+ RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
+ RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1);
RNA_def_property_ui_text(prop, "Start", "Frame on which the simulation starts");
prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
@@ -1181,7 +1181,7 @@ static void rna_def_field(BlenderRNA *brna)
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_strength");
- RNA_def_property_range(prop, -1000.0f, 1000.0f);
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_text(prop, "Strength", "Strength of force field");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");