[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28347] branches/render25: added option to not restrict effectors based on layer; note it must be enabld on the simulated *object*, *not* the effector
Joseph Eagar
joeedh at gmail.com
Thu Apr 22 17:59:30 CEST 2010
Revision: 28347
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28347
Author: joeedh
Date: 2010-04-22 17:59:27 +0200 (Thu, 22 Apr 2010)
Log Message:
-----------
added option to not restrict effectors based on layer; note it must be enabld on the simulated *object*, *not* the effector
Modified Paths:
--------------
branches/render25/release/scripts/ui/properties_physics_field.py
branches/render25/source/blender/blenkernel/intern/effect.c
branches/render25/source/blender/makesdna/DNA_modifier_types.h
branches/render25/source/blender/makesdna/DNA_object_force.h
branches/render25/source/blender/makesdna/DNA_object_types.h
branches/render25/source/blender/makesrna/intern/rna_object.c
Modified: branches/render25/release/scripts/ui/properties_physics_field.py
===================================================================
--- branches/render25/release/scripts/ui/properties_physics_field.py 2010-04-22 15:51:31 UTC (rev 28346)
+++ branches/render25/release/scripts/ui/properties_physics_field.py 2010-04-22 15:59:27 UTC (rev 28347)
@@ -62,6 +62,9 @@
split = layout.split()
split.prop(field, "shape", text="")
+ split = split.row()
+ split.prop(context.active_object, "use_all_layers")
+
split = layout.split()
if field.type == 'NONE':
Modified: branches/render25/source/blender/blenkernel/intern/effect.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/effect.c 2010-04-22 15:51:31 UTC (rev 28346)
+++ branches/render25/source/blender/blenkernel/intern/effect.c 2010-04-22 15:59:27 UTC (rev 28347)
@@ -298,6 +298,9 @@
unsigned int layer= ob_src->lay;
ListBase *effectors = NULL;
+ if (ob_src->restrictflag & OB_EFFECTS_ALL_LAYERS)
+ layer |= scene->lay;
+
if(weights->group) {
GroupObject *go;
Modified: branches/render25/source/blender/makesdna/DNA_modifier_types.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_modifier_types.h 2010-04-22 15:51:31 UTC (rev 28346)
+++ branches/render25/source/blender/makesdna/DNA_modifier_types.h 2010-04-22 15:59:27 UTC (rev 28347)
@@ -455,8 +455,8 @@
struct MVert *x; /* position at the beginning of the frame */
struct MVert *xnew; /* position at the end of the frame */
struct MVert *xold; /* unsued atm, but was discussed during sprint */
+ struct MVert *current_x; /* position at the actual inter-frame step */
struct MVert *current_xnew; /* new position at the actual inter-frame step */
- struct MVert *current_x; /* position at the actual inter-frame step */
struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */
struct MFace *mfaces; /* object face data */
Modified: branches/render25/source/blender/makesdna/DNA_object_force.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_object_force.h 2010-04-22 15:51:31 UTC (rev 28346)
+++ branches/render25/source/blender/makesdna/DNA_object_force.h 2010-04-22 15:59:27 UTC (rev 28347)
@@ -136,8 +136,13 @@
#define BPHYS_DATA_SIZE 5
#define BPHYS_DATA_TIMES 6
#define BPHYS_DATA_BOIDS 7
+#define BPHYS_DATA_LOCATION_D 8
+#define BPHYS_DATA_VELOCITY_D 9
+#define BPHYS_DATA_ROTATION_D 10
+#define BPHYS_DATA_AVELOCITY_D 11 /* used for particles */
+#define BPHYS_DATA_XCONST_D 11 /* used for cloth */
-#define BPHYS_TOT_DATA 8
+#define BPHYS_TOT_DATA 12
typedef struct PTCacheMem {
struct PTCacheMem *next, *prev;
@@ -145,8 +150,8 @@
unsigned int data_types, flag;
int *index_array; /* quick access to stored points with index */
- void *data[8]; /* BPHYS_TOT_DATA */
- void *cur[8]; /* BPHYS_TOT_DATA */
+ void *data[16]; /* BPHYS_TOT_DATA */
+ void *cur[16]; /* BPHYS_TOT_DATA */
} PTCacheMem;
typedef struct PointCache {
Modified: branches/render25/source/blender/makesdna/DNA_object_types.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_object_types.h 2010-04-22 15:51:31 UTC (rev 28346)
+++ branches/render25/source/blender/makesdna/DNA_object_types.h 2010-04-22 15:59:27 UTC (rev 28347)
@@ -508,9 +508,10 @@
#define OB_DEBUGSTATE 16384
/* ob->restrictflag */
-#define OB_RESTRICT_VIEW 1
-#define OB_RESTRICT_SELECT 2
-#define OB_RESTRICT_RENDER 4
+#define OB_RESTRICT_VIEW 1
+#define OB_RESTRICT_SELECT 2
+#define OB_RESTRICT_RENDER 4
+#define OB_EFFECTS_ALL_LAYERS 8
/* ob->shapeflag */
#define OB_SHAPE_LOCK 1
Modified: branches/render25/source/blender/makesrna/intern/rna_object.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_object.c 2010-04-22 15:51:31 UTC (rev 28346)
+++ branches/render25/source/blender/makesrna/intern/rna_object.c 2010-04-22 15:59:27 UTC (rev 28347)
@@ -1465,6 +1465,10 @@
RNA_def_property_ui_text(prop, "Selected", "Object selection state");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_select_update");
+ prop= RNA_def_property(srna, "use_all_layers", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_EFFECTS_ALL_LAYERS);
+ RNA_def_property_ui_text(prop, "Use All Layers", "Accept effector forces from objects in all visible layers");
+
/* for data access */
prop= RNA_def_property(srna, "bound_box", PROP_FLOAT, PROP_NONE);
RNA_def_property_multi_array(prop, 2, boundbox_dimsize);
More information about the Bf-blender-cvs
mailing list