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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-05 00:51:09 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-05 00:51:09 +0400
commit7df35db1b1364dcd81dd8247ad3707d40a78fd59 (patch)
treefb967409fddbb02ee70fbdfa1e404fae115a312e /source/blender
parent5342f7930fb26855b92f337ace45f2ee51153957 (diff)
2.5
Notifiers --------- Various fixes for wrong use of notifiers, and some new notifiers to make things a bit more clear and consistent, with two notable changes: * Geometry changes are now done with NC_GEOM, rather than NC_OBJECT|ND_GEOM_, so an object does need to be available. * Space data now use NC_SPACE|ND_SPACE_*, instead of data notifiers or even NC_WINDOW in some cases. Note that NC_SPACE should only be used for notifying about changes in space data, we don't want to go back to allqueue(REDRAW..). Depsgraph --------- The dependency graph now has a different flush call: DAG_object_flush_update(scene, ob, flag) is replaced by: DAG_id_flush_update(id, flag) It still works basically the same, one difference is that it now also accepts object data (e.g. Mesh), again to avoid requiring an Object to be available. Other ID types will simply do nothing at the moment. Docs ---- I made some guidelines for how/when to do which kinds of updates and notifiers. I can't specify totally exact how to make these decisions, but these are basically the guidelines I use. So, new and updated docs are here: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_depsgraph.h7
-rw-r--r--source/blender/blenkernel/intern/armature.c1
-rw-r--r--source/blender/blenkernel/intern/booleanops.c2
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c93
-rw-r--r--source/blender/blenkernel/intern/mesh.c4
-rw-r--r--source/blender/blenkernel/intern/multires.c2
-rw-r--r--source/blender/blenkernel/intern/particle.c13
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/editors/armature/editarmature.c25
-rw-r--r--source/blender/editors/armature/poselib.c6
-rw-r--r--source/blender/editors/armature/poseobject.c18
-rw-r--r--source/blender/editors/curve/editcurve.c121
-rw-r--r--source/blender/editors/curve/editfont.c14
-rw-r--r--source/blender/editors/interface/interface_templates.c10
-rw-r--r--source/blender/editors/mesh/editmesh.c8
-rw-r--r--source/blender/editors/mesh/editmesh_add.c78
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c7
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c121
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c147
-rw-r--r--source/blender/editors/mesh/mesh_layers.c88
-rw-r--r--source/blender/editors/mesh/meshtools.c2
-rw-r--r--source/blender/editors/metaball/editmball.c30
-rw-r--r--source/blender/editors/object/editconstraint.c13
-rw-r--r--source/blender/editors/object/editkey.c107
-rw-r--r--source/blender/editors/object/editlattice.c9
-rw-r--r--source/blender/editors/object/object_edit.c55
-rw-r--r--source/blender/editors/object/object_modifier.c52
-rw-r--r--source/blender/editors/object/object_vgroup.c80
-rw-r--r--source/blender/editors/physics/editparticle.c62
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c18
-rw-r--r--source/blender/editors/space_action/space_action.c4
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c19
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c17
-rw-r--r--source/blender/editors/space_console/space_console.c6
-rw-r--r--source/blender/editors/space_file/file_ops.c30
-rw-r--r--source/blender/editors/space_file/space_file.c16
-rw-r--r--source/blender/editors/space_graph/space_graph.c4
-rw-r--r--source/blender/editors/space_image/space_image.c12
-rw-r--r--source/blender/editors/space_info/space_info.c5
-rw-r--r--source/blender/editors/space_nla/space_nla.c4
-rw-r--r--source/blender/editors/space_node/space_node.c9
-rw-r--r--source/blender/editors/space_outliner/outliner.c6
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c8
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c9
-rw-r--r--source/blender/editors/space_text/space_text.c4
-rw-r--r--source/blender/editors/space_text/text_ops.c3
-rw-r--r--source/blender/editors/space_time/space_time.c11
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c37
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c16
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c8
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c14
-rw-r--r--source/blender/editors/transform/transform_generics.c14
-rw-r--r--source/blender/editors/util/editmode_undo.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c50
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c40
-rw-r--r--source/blender/makesrna/intern/rna_armature.c18
-rw-r--r--source/blender/makesrna/intern/rna_boid.c103
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c63
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c5
-rw-r--r--source/blender/makesrna/intern/rna_curve.c19
-rw-r--r--source/blender/makesrna/intern/rna_define.c3
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c18
-rw-r--r--source/blender/makesrna/intern/rna_internal.h1
-rw-r--r--source/blender/makesrna/intern/rna_key.c5
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c14
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c110
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c11
-rw-r--r--source/blender/makesrna/intern/rna_meta.c12
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c344
-rw-r--r--source/blender/makesrna/intern/rna_object.c19
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c90
-rw-r--r--source/blender/makesrna/intern/rna_particle.c356
-rw-r--r--source/blender/makesrna/intern/rna_pose.c2
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c19
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c227
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c380
-rw-r--r--source/blender/makesrna/intern/rna_wm.c1
-rw-r--r--source/blender/windowmanager/WM_types.h51
-rw-r--r--source/blender/windowmanager/intern/wm.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
85 files changed, 1747 insertions, 1689 deletions
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index 70b6c1d13f4..e242ead3b87 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -32,6 +32,8 @@
#define DEPS_DEBUG
*/
+struct ID;
+struct Main;
struct Scene;
struct DagNodeQueue;
struct DagForest;
@@ -103,8 +105,9 @@ void DAG_object_update_flags(struct Scene *sce, struct Object *ob, unsigned int
/* flushes all recalc flags in objects down the dependency tree */
void DAG_scene_flush_update(struct Scene *sce, unsigned int lay, int time);
- /* flushes all recalc flags for this object down the dependency tree */
-void DAG_object_flush_update(struct Scene *sce, struct Object *ob, short flag);
+ /* flushes all recalc flags for this object down the dependency tree,
+ but not the DAG only supports objects and object data currently */
+void DAG_id_flush_update(struct ID *id, short flag);
void DAG_pose_sort(struct Object *ob);
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 631bc2cb88c..e568f1b2c0e 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -130,7 +130,6 @@ void free_bones (bArmature *arm)
void free_armature(bArmature *arm)
{
if (arm) {
- /* unlink_armature(arm);*/
free_bones(arm);
/* free editmode data */
diff --git a/source/blender/blenkernel/intern/booleanops.c b/source/blender/blenkernel/intern/booleanops.c
index eb3aefe7ee6..5f0697f06ce 100644
--- a/source/blender/blenkernel/intern/booleanops.c
+++ b/source/blender/blenkernel/intern/booleanops.c
@@ -589,7 +589,7 @@ int NewBooleanMesh(Scene *scene, Base *base, Base *base_select, int int_op_type)
MEM_freeN(mat);
/* update dag */
- DAG_object_flush_update(scene, ob_new, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob_new->id, OB_RECALC_DATA);
return 1;
}
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 6c765b02e5d..6a14762e0ed 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -61,6 +61,7 @@
#include "DNA_space_types.h"
#include "DNA_view2d_types.h"
#include "DNA_view3d_types.h"
+#include "DNA_windowmanager_types.h"
#include "BLI_ghash.h"
@@ -2141,39 +2142,77 @@ void DAG_scene_update_flags(Scene *scene, unsigned int lay)
}
-
-/* flag this object and all its relations to recalc */
-/* if you need to do more objects, tag object yourself and
- use DAG_scene_flush_update() in end */
-void DAG_object_flush_update(Scene *sce, Object *ob, short flag)
+void DAG_id_flush_update(ID *id, short flag)
{
-
- if(ob==NULL || sce->theDag==NULL) return;
+ Main *bmain= G.main;
+ wmWindowManager *wm;
+ wmWindow *win;
+ Scene *sce;
+ Object *obt, *ob= NULL;
+ short idtype;
- ob->recalc |= flag;
- BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH);
-
- /* all users of this ob->data should be checked */
- /* BUT! displists for curves are still only on cu */
- if(flag & OB_RECALC_DATA) {
- if(ob->type!=OB_CURVE && ob->type!=OB_SURF) {
- ID *id= ob->data;
- if(id && id->us>1) {
- /* except when there's a key and shapes are locked */
- if(ob_get_key(ob) && (ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)));
- else {
- Object *obt;
- for (obt=G.main->object.first; obt; obt= obt->id.next) {
- if (obt != ob && obt->data==ob->data) {
- obt->recalc |= OB_RECALC_DATA;
- BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
- }
- }
+ /* only one scene supported currently, making more scenes work
+ correctly requires changes beyond just the dependency graph */
+
+ if((wm= bmain->wm.first)) {
+ /* if we have a windowmanager, use sce from first window */
+ for(win=wm->windows.first; win; win=win->next) {
+ sce= (win->screen)? win->screen->scene: NULL;
+
+ if(sce)
+ break;
+ }
+ }
+ else
+ /* if not, use the first sce */
+ sce= bmain->scene.first;
+
+ if(!id || !sce || !sce->theDag)
+ return;
+
+ /* set flags & pointcache for object */
+ if(GS(id->name) == ID_OB) {
+ ob= (Object*)id;
+ ob->recalc |= flag;
+ BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH);
+
+ if(flag & OB_RECALC_DATA) {
+ /* all users of this ob->data should be checked */
+ id= ob->data;
+
+ /* no point in trying in this cases */
+ if(!id || id->us <= 1)
+ id= NULL;
+ /* curves and surfaces only need to mark one object, since
+ otherwise cu->displist would be computed multiple times */
+ else if(ob->type==OB_CURVE || ob->type==OB_SURF)
+ id= NULL;
+ /* also for locked shape keys we make an exception */
+ else if(ob_get_key(ob) && (ob->shapeflag & (OB_SHAPE_LOCK|OB_SHAPE_TEMPLOCK)))
+ id= NULL;
+ }
+ }
+
+ /* set flags & pointcache for object data */
+ if(id) {
+ idtype= GS(id->name);
+
+ if(ELEM7(idtype, ID_ME, ID_CU, ID_MB, ID_LA, ID_LT, ID_CA, ID_AR)) {
+ for(obt=bmain->object.first; obt; obt= obt->id.next) {
+ if(!(ob && obt == ob) && obt->data == id) {
+ obt->recalc |= OB_RECALC_DATA;
+ BKE_ptcache_object_reset(sce, obt, PTCACHE_RESET_DEPSGRAPH);
+
+ /* for these we only flag one object, otherwise cu->displist
+ would be computed multiple times */
+ if(obt->type==OB_CURVE || obt->type==OB_SURF)
+ break;
}
}
}
}
-
+
+ /* flush to other objects that depend on this one */
// XXX if(G.curscreen)
// DAG_scene_flush_update(sce, dag_screen_view3d_layers(), 0);
// else
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index c7454d3b832..c92eda6d169 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -977,7 +977,7 @@ void mesh_set_smooth_flag(Object *meshOb, int enableSmooth)
}
}
-// XXX do this in caller DAG_object_flush_update(scene, meshOb, OB_RECALC_DATA);
+// XXX do this in caller DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
void mesh_calc_normals(MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float **faceNors_r)
@@ -1265,7 +1265,7 @@ void mesh_pmv_revert(Object *ob, Mesh *me)
MEM_freeN(me->pv->vert_map);
me->pv->vert_map= NULL;
-// XXX do this in caller DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+// XXX do this in caller DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
}
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 9ba5769843f..37e7e55050a 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -83,7 +83,7 @@ int multiresModifier_switch_level(Object *ob, const int distance)
mmd->lvl += distance;
if(mmd->lvl < 1) mmd->lvl = 1;
else if(mmd->lvl > mmd->totlvl) mmd->lvl = mmd->totlvl;
- /* XXX: DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
+ /* XXX: DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
object_handle_update(ob);*/
return 1;
}
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 18e3512967a..1ae3ec5dd50 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2631,7 +2631,7 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
ParticleInterpolationData pind;
float birthtime = 0.0, dietime = 0.0;
- float t, time = 0.0, keytime = 0.0, dfra = 1.0, frs_sec = scene->r.frs_sec;
+ float t, time = 0.0, dfra = 1.0, frs_sec = scene->r.frs_sec;
float col[4] = {0.5f, 0.5f, 0.5f, 1.0f};
float prev_tangent[3], hairmat[4][4];
float rotmat[3][3];
@@ -2853,14 +2853,13 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
ParticleSystem *psys = edit->psys;
ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- ParticleSettings *part = psys ? psys->part : NULL;
ParticleData *pa = psys ? psys->particles : NULL;
ParticleInterpolationData pind;
ParticleKey result;
float birthtime = 0.0, dietime = 0.0;
- float t, time = 0.0, keytime = 0.0, dfra = 1.0, frs_sec;
+ float t, time = 0.0, keytime = 0.0, frs_sec;
float hairmat[4][4];
int k,i;
int steps = (int)pow(2.0, (double)pset->draw_step);
@@ -3161,7 +3160,7 @@ void object_add_particle_system(Scene *scene, Object *ob)
psys->cfra=bsystem_time(scene,ob,scene->r.cfra+1,0.0);
DAG_scene_sort(scene);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
void object_remove_particle_system(Scene *scene, Object *ob)
{
@@ -3184,7 +3183,7 @@ void object_remove_particle_system(Scene *scene, Object *ob)
((ParticleSystem *) ob->particlesystem.first)->flag |= PSYS_CURRENT;
DAG_scene_sort(scene);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
static void default_particle_settings(ParticleSettings *part)
{
@@ -3364,7 +3363,7 @@ void psys_flush_particle_settings(Scene *scene, ParticleSettings *part, int reca
}
}
if(flush)
- DAG_object_flush_update(scene, base->object, OB_RECALC_DATA);
+ DAG_id_flush_update(&base->object->id, OB_RECALC_DATA);
}
}
@@ -3396,7 +3395,7 @@ LinkNode *psys_using_settings(struct Scene *scene, ParticleSettings *part, int f
}
if(flush_update && found)
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
return node;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index c0223d1690c..7a156f56d72 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1947,7 +1947,7 @@ void BKE_ptcache_set_continue_physics(Scene *scene, int enable)
if(CONTINUE_PHYSICS == 0) {
for(ob=G.main->object.first; ob; ob=ob->id.next)
if(BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_OUTDATED))
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
}
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 9f83733a640..65051c384b3 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -340,7 +340,7 @@ void ED_armature_from_edit(Scene *scene, Object *obedit)
armature_rebuild_pose(obt, arm);
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
}
@@ -1054,8 +1054,8 @@ static int separate_armature_exec (bContext *C, wmOperator *op)
/* 4) fix links before depsgraph flushes */ // err... or after?
separated_armature_fix_links(oldob, newob);
- DAG_object_flush_update(scene, oldob, OB_RECALC_DATA); /* this is the original one */
- DAG_object_flush_update(scene, newob, OB_RECALC_DATA); /* this is the separated one */
+ DAG_id_flush_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
+ DAG_id_flush_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
/* 5) restore original conditions */
@@ -1890,7 +1890,7 @@ void mouse_armature(bContext *C, short mval[2], int extend)
if(nearBone->flag & BONE_SELECTED) nearBone->flag |= BONE_ACTIVE;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, vc.obedit);
}
}
@@ -4335,7 +4335,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
if (ob->mode & OB_MODE_WEIGHT_PAINT) {
if (nearBone->flag & BONE_ACTIVE) {
vertexgroup_select_by_name(OBACT, nearBone->name);
- DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
+ DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
}
}
@@ -4765,7 +4765,6 @@ void create_vgroups_from_armature(Scene *scene, Object *ob, Object *par, int mod
static int pose_clear_scale_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only clear those channels that are not locked */
@@ -4782,7 +4781,7 @@ static int pose_clear_scale_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -4807,7 +4806,6 @@ void POSE_OT_scale_clear(wmOperatorType *ot)
static int pose_clear_loc_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only clear those channels that are not locked */
@@ -4824,7 +4822,7 @@ static int pose_clear_loc_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -4849,7 +4847,6 @@ void POSE_OT_loc_clear(wmOperatorType *ot)
static int pose_clear_rot_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only clear those channels that are not locked */
@@ -4899,7 +4896,7 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -5337,7 +5334,6 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
static int armature_flip_names_exec (bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
bArmature *arm;
char newname[32];
@@ -5357,7 +5353,7 @@ static int armature_flip_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -5383,7 +5379,6 @@ void ARMATURE_OT_flip_names (wmOperatorType *ot)
static int armature_autoside_names_exec (bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
bArmature *arm;
char newname[32];
@@ -5404,7 +5399,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 021bec05a3b..56d714fd058 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -843,7 +843,7 @@ static void poselib_preview_apply (bContext *C, wmOperator *op)
*/
// FIXME: shouldn't this use the builtin stuff?
if ((pld->arm->flag & ARM_DELAYDEFORM)==0)
- DAG_object_flush_update(pld->scene, pld->ob, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
where_is_pose(pld->scene, pld->ob);
}
@@ -1346,7 +1346,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
* - note: code copied from transform_generics.c -> recalcData()
*/
if ((arm->flag & ARM_DELAYDEFORM)==0)
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
where_is_pose(scene, ob);
@@ -1360,7 +1360,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
action_set_activemarker(act, marker, 0);
/* Update event for pose and deformation children */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* updates */
if (IS_AUTOKEY_MODE(scene, NORMAL)) {
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 9a72fce2bcf..2673640b213 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -893,7 +893,7 @@ void pose_copy_menu(Scene *scene)
ob->pose->flag |= POSE_RECALC;
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA); // and all its relations
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA); // and all its relations
BIF_undo_push("Copy Pose Attributes");
@@ -1067,7 +1067,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
}
/* Update event for pose and deformation children */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
if (IS_AUTOKEY_ON(scene)) {
// XXX remake_action_ipos(ob->action);
@@ -1124,7 +1124,7 @@ void pose_adds_vgroups(Scene *scene, Object *meshobj, int heatweights)
// and all its relations
- DAG_object_flush_update(scene, meshobj, OB_RECALC_DATA);
+ DAG_id_flush_update(&meshobj->id, OB_RECALC_DATA);
}
/* ********************************************** */
@@ -1540,7 +1540,6 @@ void pose_select_grouped_menu (Scene *scene)
static int pose_flip_names_exec (bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
bArmature *arm;
char newname[32];
@@ -1560,7 +1559,7 @@ static int pose_flip_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -1587,7 +1586,6 @@ void POSE_OT_flip_names (wmOperatorType *ot)
static int pose_autoside_names_exec (bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
bArmature *arm;
char newname[32];
@@ -1608,7 +1606,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -1677,7 +1675,7 @@ void pose_activate_flipped_bone(Scene *scene)
/* in weightpaint we select the associated vertex group too */
if(ob->mode & OB_MODE_WEIGHT_PAINT) {
vertexgroup_select_by_name(OBACT, name);
- DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
+ DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
}
// XXX notifiers need to be sent to other editors to update
@@ -2116,7 +2114,7 @@ void pose_relax(Scene *scene)
pchan->bone->flag &= ~ BONE_TRANSFORM;
/* do depsgraph flush */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
BIF_undo_push("Relax Pose");
}
@@ -2211,7 +2209,7 @@ void pose_clear_user_transforms(Scene *scene, Object *ob)
rest_pose(ob->pose);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
BIF_undo_push("Clear User Transform");
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 28a9d3ac7c9..4246c889de0 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -409,10 +409,10 @@ static int separate_exec(bContext *C, wmOperator *op)
load_editNurb(newob);
free_editNurb(newob);
- DAG_object_flush_update(scene, oldob, OB_RECALC_DATA); /* this is the original one */
- DAG_object_flush_update(scene, newob, OB_RECALC_DATA); /* this is the separated one */
+ DAG_id_flush_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
+ DAG_id_flush_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, oldob);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, oldob->data);
WM_cursor_wait(0);
@@ -1005,8 +1005,8 @@ static int switch_direction_exec(bContext *C, wmOperator *op)
if(isNurbsel(nu))
switchdirectionNurb(nu);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1052,8 +1052,8 @@ static int set_weight_exec(bContext *C, wmOperator *op)
}
}
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1103,8 +1103,8 @@ static int set_radius_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -1178,8 +1178,8 @@ static int smooth_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -1343,8 +1343,8 @@ static int smooth_radius_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -1493,7 +1493,7 @@ static int de_select_first_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
selectend_nurb(obedit, FIRST, 1, DESELECT);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1517,7 +1517,7 @@ static int de_select_last_exec(bContext *C, wmOperator *op)
Object *obedit= CTX_data_edit_object(C);
selectend_nurb(obedit, LAST, 1, DESELECT);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1585,7 +1585,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
select_adjacent_cp(editnurb, 1, 1, SELECT); /* cascade selection */
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1654,8 +1654,8 @@ static int hide_exec(bContext *C, wmOperator *op)
}
}
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1714,8 +1714,8 @@ static int reveal_exec(bContext *C, wmOperator *op)
}
}
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1770,7 +1770,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2166,8 +2166,8 @@ static int subdivide_exec(bContext *C, wmOperator *op)
} /* End of 'if((nu->type & 7)==CU_NURBS)' */
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2500,14 +2500,13 @@ void CURVE_OT_spline_type_set(wmOperatorType *ot)
static int set_handle_type_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
sethandlesNurb(editnurb, RNA_enum_get(op->ptr, "type"));
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2861,8 +2860,8 @@ static int merge_nurb(bContext *C, wmOperator *op)
set_actNurb(obedit, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2870,7 +2869,6 @@ static int merge_nurb(bContext *C, wmOperator *op)
static int make_segment_exec(bContext *C, wmOperator *op)
{
/* joins 2 curves */
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu, *nu1=0, *nu2=0;
@@ -3015,8 +3013,8 @@ static int make_segment_exec(bContext *C, wmOperator *op)
set_actNurb(obedit, NULL); /* for selected */
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3100,7 +3098,7 @@ void mouse_nurb(bContext *C, short mval[2], int extend)
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
if(nu!=get_actNurb(obedit))
set_actNurb(obedit, nu);
@@ -3231,8 +3229,8 @@ static int spin_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3255,7 +3253,6 @@ void CURVE_OT_spin(wmOperatorType *ot)
static int addvert_Nurb(bContext *C, short mode, float location[3])
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
@@ -3367,8 +3364,8 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
test2DNurb(nu);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3423,7 +3420,6 @@ void CURVE_OT_vertex_add(wmOperatorType *ot)
static int extrude_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu;
@@ -3438,8 +3434,8 @@ static int extrude_exec(bContext *C, wmOperator *op)
}
else {
if(extrudeflagNurb(editnurb, 1)) { /* '1'= flag */
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
}
@@ -3549,8 +3545,8 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3641,7 +3637,7 @@ static int select_linked_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -3733,7 +3729,7 @@ static int select_row_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -3760,7 +3756,7 @@ static int select_next_exec(bContext *C, wmOperator *op)
ListBase *editnurb= curve_get_editcurve(obedit);
select_adjacent_cp(editnurb, 1, 0, SELECT);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -3787,7 +3783,7 @@ static int select_previous_exec(bContext *C, wmOperator *op)
ListBase *editnurb= curve_get_editcurve(obedit);
select_adjacent_cp(editnurb, -1, 0, SELECT);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -3874,7 +3870,7 @@ static int select_more_exec(bContext *C, wmOperator *op)
select_adjacent_cp(editnurb, -1, 0, SELECT);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4035,7 +4031,7 @@ static int select_less_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4131,7 +4127,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
MEM_freeN(itemstobeselected);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4165,7 +4161,7 @@ static int select_every_nth_exec(bContext *C, wmOperator *op)
select_adjacent_cp(editnurb, n, 1, SELECT);
select_adjacent_cp(editnurb, -n, 1, SELECT);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4231,7 +4227,6 @@ void CURVE_OT_duplicate(wmOperatorType *ot)
static int delete_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb= curve_get_editcurve(obedit);
Nurb *nu, *next, *nu1;
@@ -4243,8 +4238,8 @@ static int delete_exec(bContext *C, wmOperator *op)
if(type==0) deleteflagNurb(C, op, 1);
else freeNurblist(editnurb);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -4373,8 +4368,8 @@ static int delete_exec(bContext *C, wmOperator *op)
bezt2= bezt+(nu->pntsu-1);
if( (bezt2->f1 & SELECT) || (bezt2->f2 & SELECT) || (bezt2->f3 & SELECT) ) {
nu->flagu &= ~CU_CYCLIC;
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
}
@@ -4399,8 +4394,8 @@ static int delete_exec(bContext *C, wmOperator *op)
bp2= bp+(nu->pntsu-1);
if( bp2->f1 & SELECT ) {
nu->flagu &= ~CU_CYCLIC;
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
}
@@ -4497,8 +4492,8 @@ static int delete_exec(bContext *C, wmOperator *op)
else if(type==2)
freeNurblist(editnurb);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -4569,8 +4564,8 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -5119,8 +5114,8 @@ static int clear_tilt_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 46be95063ec..ae34f30a4f1 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -273,15 +273,14 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re
BKE_text_to_curve(scene, obedit, mode);
if(recalc)
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
}
/********************** insert lorem operator *********************/
static int insert_lorem_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
char *p, *p2;
int i;
@@ -308,8 +307,8 @@ static int insert_lorem_exec(bContext *C, wmOperator *op)
insert_into_textbuf(obedit, '\n');
insert_into_textbuf(obedit, '\n');
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -614,7 +613,6 @@ static EnumPropertyItem style_items[]= {
static int set_style(bContext *C, int style, int clear)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
EditFont *ef= cu->editfont;
@@ -630,8 +628,8 @@ static int set_style(bContext *C, int style, int clear)
ef->textbufinfo[i].flag |= style;
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 6aa5f5efc41..d253948e2e8 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -328,7 +328,6 @@ void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propname
static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
{
- Scene *scene= CTX_data_scene(C);
Object *ob = ob_v;
ModifierData *md;
@@ -343,12 +342,11 @@ static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v)
}
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
{
- Scene *scene= CTX_data_scene(C);
Object *ob = ob_v;
ModifierData *md = md_v;
ModifierData *nmd = modifier_new(md->type);
@@ -361,7 +359,7 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
ob->partype = PAROBJECT;
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
ED_undo_push(C, "Modifier convert to real");
}
@@ -597,8 +595,8 @@ void do_constraint_panels(bContext *C, void *arg, int event)
if(ob->pose) update_pose_constraint_flags(ob->pose);
- if(ob->type==OB_ARMATURE) DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
- else DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
// XXX allqueue(REDRAWVIEW3D, 0);
// XXX allqueue(REDRAWBUTSOBJECT, 0);
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index c3f1637d3af..980d699dda5 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -1280,7 +1280,7 @@ void load_editMesh(Scene *scene, Object *ob)
void remake_editMesh(Scene *scene, Object *ob)
{
make_editMesh(scene, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
BIF_undo_push("Undo all changes");
}
@@ -1390,8 +1390,8 @@ static int mesh_separate_selected(Scene *scene, Base *editbase)
/* hashedges are invalid now, make new! */
editMesh_set_hash(em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- DAG_object_flush_update(scene, basenew->object, OB_RECALC_DATA);
+ DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ DAG_id_flush_update(&basenew->object->id, OB_RECALC_DATA);
BKE_mesh_end_editmesh(me, em);
@@ -1469,7 +1469,7 @@ static int mesh_separate_exec(bContext *C, wmOperator *op)
retval= mesh_separate_loose(scene, base);
if(retval) {
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, base->object);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data);
return OPERATOR_FINISHED;
}
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 19078d2f6ff..4af5ddf56fa 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -217,8 +217,8 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
}
//retopo_do_all();
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
- DAG_object_flush_update(vc.scene, vc.obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, vc.obedit->data);
+ DAG_id_flush_update(vc.obedit->data, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -343,9 +343,8 @@ static int make_fgon_exec(bContext *C, wmOperator *op)
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
if( make_fgon(em, op, 1) ) {
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -376,9 +375,8 @@ static int clear_fgon_exec(bContext *C, wmOperator *op)
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
if( make_fgon(em, op, 0) ) {
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -666,7 +664,7 @@ void addfaces_from_edgenet(EditMesh *em)
EM_select_flush(em);
-// XXX DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// XXX DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
static void addedgeface_mesh(EditMesh *em, wmOperator *op)
@@ -695,7 +693,7 @@ static void addedgeface_mesh(EditMesh *em, wmOperator *op)
eed= addedgelist(em, neweve[0], neweve[1], NULL);
EM_select_edge(eed, 1);
- // XXX DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ // XXX DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return;
}
else if(amount > 4) {
@@ -792,9 +790,8 @@ static int addedgeface_mesh_exec(bContext *C, wmOperator *op)
addedgeface_mesh(em, op);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
-
- DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1311,7 +1308,6 @@ static float new_primitive_matrix(bContext *C, float primmat[][4])
static int add_primitive_plane_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1321,8 +1317,8 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_PLANE, mat, 4, 0, 0, dia, 0.0f, 0, 1);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1344,7 +1340,6 @@ void MESH_OT_primitive_plane_add(wmOperatorType *ot)
static int add_primitive_cube_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1354,8 +1349,8 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CUBE, mat, 4, 0, 0, dia, 1.0f, 1, 1);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1377,7 +1372,6 @@ void MESH_OT_primitive_cube_add(wmOperatorType *ot)
static int add_primitive_circle_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1387,8 +1381,8 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CIRCLE, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia, 0.0f, 0,
RNA_boolean_get(op->ptr, "fill"));
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1415,7 +1409,6 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1425,8 +1418,8 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CYLINDER, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
RNA_float_get(op->ptr, "depth"), 1, 1);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1453,7 +1446,6 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
static int add_primitive_tube_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1463,8 +1455,8 @@ static int add_primitive_tube_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CYLINDER, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
RNA_float_get(op->ptr, "depth"), 1, 0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1491,7 +1483,6 @@ void MESH_OT_primitive_tube_add(wmOperatorType *ot)
static int add_primitive_cone_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1501,8 +1492,8 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_CONE, mat, RNA_int_get(op->ptr, "vertices"), 0, 0, dia,
RNA_float_get(op->ptr, "depth"), 0, RNA_boolean_get(op->ptr, "cap_end"));
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1531,7 +1522,6 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot)
static int add_primitive_grid_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1541,8 +1531,8 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_GRID, mat, RNA_int_get(op->ptr, "x_subdivisions"),
RNA_int_get(op->ptr, "y_subdivisions"), 0, dia, 0.0f, 0, 1);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1569,7 +1559,6 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float mat[4][4];
@@ -1577,8 +1566,8 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_MONKEY, mat, 0, 0, 2, 0.0f, 0.0f, 0, 0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1600,7 +1589,6 @@ void MESH_OT_primitive_monkey_add(wmOperatorType *ot)
static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1610,8 +1598,8 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_UVSPHERE, mat, RNA_int_get(op->ptr, "rings"),
RNA_int_get(op->ptr, "segments"), 0, dia, 0.0f, 0, 0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1638,7 +1626,6 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
float dia, mat[4][4];
@@ -1648,8 +1635,8 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
make_prim(obedit, PRIM_ICOSPHERE, mat, 0, 0,
RNA_int_get(op->ptr, "subdivisions"), dia, 0.0f, 0, 0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1677,7 +1664,6 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
static int mesh_duplicate_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(ob->data);
@@ -1685,8 +1671,8 @@ static int mesh_duplicate_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(ob->data, em);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ DAG_id_flush_update(ob->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index b46f745e8f5..4c3e76f2285 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -389,7 +389,7 @@ void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
EM_selectmode_set(em);
}
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return;
}
@@ -624,7 +624,6 @@ static float seg_intersect(EditEdge *e, CutCurve *c, int len, char mode, struct
static int knife_cut_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
ARegion *ar= CTX_wm_region(C);
@@ -705,8 +704,8 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index f2c5b7fb727..667a889b5fc 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -127,7 +127,7 @@ void EM_automerge(int update)
// if (len) {
// em->totvert -= len; /* saves doing a countall */
// if (update) {
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
// }
// }
// }
@@ -807,7 +807,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
if (selcount) {
/* here was an edge-mode only select flush case, has to be generalized */
EM_selectmode_flush(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(me, em);
return OPERATOR_FINISHED;
}
@@ -839,7 +839,7 @@ static EnumPropertyItem prop_simedge_types[] = {
{0, NULL, 0, NULL, NULL}
};
-static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
+static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mode)
{
EditEdge *eed, *base_eed=NULL;
unsigned int selcount=0; /* count how many new edges we select*/
@@ -849,7 +849,7 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
unsigned int deselcount=0;
short ok=0;
- float thresh= scene->toolsettings->select_thresh;
+ float thresh= ts->select_thresh;
for(eed= em->edges.first; eed; eed= eed->next) {
if (!eed->h) {
@@ -1039,17 +1039,17 @@ static int similar_edge_select__internal(Scene *scene, EditMesh *em, int mode)
/* wrap the above function but do selection flushing edge to face */
static int similar_edge_select_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
Mesh *me= obedit->data;
EditMesh *em= BKE_mesh_get_editmesh(me);
- int selcount = similar_edge_select__internal(scene, em, RNA_int_get(op->ptr, "type"));
+ int selcount = similar_edge_select__internal(ts, em, RNA_int_get(op->ptr, "type"));
if (selcount) {
/* here was an edge-mode only select flush case, has to be generalized */
EM_selectmode_flush(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(me, em);
return OPERATOR_FINISHED;
}
@@ -1081,7 +1081,7 @@ static EnumPropertyItem prop_simvertex_types[] = {
static int similar_vert_select_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
Mesh *me= obedit->data;
EditMesh *em= BKE_mesh_get_editmesh(me);
@@ -1094,7 +1094,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
int mode= RNA_enum_get(op->ptr, "type");
short ok=0;
- float thresh= scene->toolsettings->select_thresh;
+ float thresh= ts->select_thresh;
for(eve= em->verts.first; eve; eve= eve->next) {
if (!eve->h) {
@@ -1207,7 +1207,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
} /* end basevert loop */
if(selcount) {
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(me, em);
return OPERATOR_FINISHED;
}
@@ -1413,7 +1413,7 @@ void EM_mesh_copy_edge(EditMesh *em, short type)
}
if (change) {
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
}
@@ -1541,7 +1541,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
}
if (change) {
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
}
@@ -1671,7 +1671,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
}
if (change) {
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
}
@@ -1991,7 +1991,7 @@ static int loop_multiselect(bContext *C, wmOperator *op)
MEM_freeN(edarray);
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2060,7 +2060,7 @@ static void mouse_mesh_loop(bContext *C, short mval[2], short extend, short ring
EM_selectmode_flush(em);
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
}
}
@@ -2159,9 +2159,8 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2])
break;
}
- DAG_object_flush_update(vc.scene, vc.obedit, OB_RECALC_DATA);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
+ DAG_id_flush_update(vc.obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
}
}
@@ -2261,7 +2260,7 @@ void mouse_mesh(bContext *C, short mval[2], short extend)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
}
@@ -2405,12 +2404,12 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
/* return warning! */
if(limit) {
int retval= select_linked_limited_invoke(&vc, 0, sel);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return retval;
}
if( unified_findnearest(&vc, &eve, &eed, &efa)==0 ) {
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_CANCELLED;
}
@@ -2464,7 +2463,7 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2545,7 +2544,7 @@ static int select_linked_exec(bContext *C, wmOperator *op)
else
selectconnected_mesh_all(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2671,7 +2670,7 @@ void EM_hide_mesh(EditMesh *em, int swap)
em->totedgesel= em->totfacesel= em->totvertsel= 0;
// if(EM_texFaceCheck())
- // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ // DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
static int hide_mesh_exec(bContext *C, wmOperator *op)
@@ -2681,7 +2680,7 @@ static int hide_mesh_exec(bContext *C, wmOperator *op)
EM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected"));
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2738,7 +2737,7 @@ void EM_reveal_mesh(EditMesh *em)
EM_selectmode_flush(em);
// if (EM_texFaceCheck())
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
static int reveal_mesh_exec(bContext *C, wmOperator *op)
@@ -2748,7 +2747,7 @@ static int reveal_mesh_exec(bContext *C, wmOperator *op)
EM_reveal_mesh(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2798,7 +2797,7 @@ int select_by_number_vertices_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2924,7 +2923,7 @@ static int select_sharp_edges_exec(bContext *C, wmOperator *op)
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); //TODO is this needed ?
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); //TODO is this needed ?
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3092,7 +3091,7 @@ static int select_linked_flat_faces_exec(bContext *C, wmOperator *op)
select_linked_flat_faces(em, op, RNA_float_get(op->ptr, "sharpness"));
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3193,7 +3192,7 @@ static int select_non_manifold_exec(bContext *C, wmOperator *op)
select_non_manifold(em, op);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3257,7 +3256,7 @@ static int select_inverse_mesh_exec(bContext *C, wmOperator *op)
EM_select_swap(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3295,7 +3294,7 @@ static int toggle_select_all_exec(bContext *C, wmOperator *op)
EM_toggle_select_all(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3366,7 +3365,7 @@ static int select_more(bContext *C, wmOperator *op)
// if (EM_texFaceCheck(em))
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3456,7 +3455,7 @@ static int select_less(bContext *C, wmOperator *op)
EM_select_less(em);
// if (EM_texFaceCheck(em))
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3526,7 +3525,7 @@ static int mesh_select_random_exec(bContext *C, wmOperator *op)
selectrandom_mesh(em, RNA_float_get(op->ptr,"percent"));
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3577,7 +3576,7 @@ void EM_deselect_by_material(EditMesh *em, int index)
EM_selectmode_flush(em);
}
-static void mesh_selection_type(Scene *scene, EditMesh *em, int val)
+static void mesh_selection_type(ToolSettings *ts, EditMesh *em, int val)
{
if(val>0) {
if(val==1) {
@@ -3598,7 +3597,7 @@ static void mesh_selection_type(Scene *scene, EditMesh *em, int val)
/* note, em stores selectmode to be able to pass it on everywhere without scene,
this is only until all select modes and toolsettings are settled more */
- scene->toolsettings->selectmode= em->selectmode;
+ ts->selectmode= em->selectmode;
// if (EM_texFaceCheck())
}
}
@@ -3612,13 +3611,13 @@ static EnumPropertyItem prop_mesh_edit_types[] = {
static int mesh_selection_type_exec(bContext *C, wmOperator *op)
{
-
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
- mesh_selection_type(CTX_data_scene(C), em, RNA_enum_get(op->ptr,"type"));
+ mesh_selection_type(ts, em, RNA_enum_get(op->ptr,"type"));
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -3648,7 +3647,6 @@ void MESH_OT_selection_type(wmOperatorType *ot)
static int editmesh_mark_seam(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
Mesh *me= ((Mesh *)obedit->data);
@@ -3681,8 +3679,8 @@ static int editmesh_mark_seam(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -3706,7 +3704,6 @@ void MESH_OT_mark_seam(wmOperatorType *ot)
static int editmesh_mark_sharp(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
Mesh *me= ((Mesh *)obedit->data);
@@ -3734,8 +3731,8 @@ static int editmesh_mark_sharp(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -3965,7 +3962,7 @@ void righthandfaces(EditMesh *em, int select) /* makes faces righthand turning *
recalc_editnormals(em);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
waitcursor(0);
}
@@ -3973,7 +3970,6 @@ void righthandfaces(EditMesh *em, int select) /* makes faces righthand turning *
static int righthandfaces_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
@@ -3984,8 +3980,8 @@ static int righthandfaces_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit); //TODO is this needed ?
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); //TODO is this needed ?
return OPERATOR_FINISHED;
}
@@ -4185,7 +4181,7 @@ void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *o
static int smooth_vertex(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EditVert *eve, *eve_mir = NULL;
@@ -4273,7 +4269,7 @@ static int smooth_vertex(bContext *C, wmOperator *op)
if(eve->f & SELECT) {
if(eve->f1) {
- if (scene->toolsettings->editbutflag & B_MESH_X_MIRROR) {
+ if (ts->editbutflag & B_MESH_X_MIRROR) {
eve_mir= editmesh_get_x_mirror_vert(obedit, em, eve->co);
}
@@ -4315,8 +4311,8 @@ static int smooth_vertex(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4393,7 +4389,7 @@ void vertexnoise(Object *obedit, EditMesh *em)
}
recalc_editnormals(em);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
@@ -4450,23 +4446,23 @@ static void vertices_to_sphere(Scene *scene, View3D *v3d, Object *obedit, EditMe
}
recalc_editnormals(em);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
static int vertices_to_sphere_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
View3D *v3d = CTX_wm_view3d(C);
- Scene *scene = CTX_data_scene(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
vertices_to_sphere(scene, v3d, obedit, em, RNA_float_get(op->ptr,"percent"));
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4512,7 +4508,6 @@ void flipface(EditMesh *em, EditFace *efa)
static int flip_normals(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EditFace *efa;
@@ -4530,8 +4525,8 @@ static int flip_normals(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index ac65820bfea..5a4397256de 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -484,11 +484,11 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
static int removedoublesflag_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
char msg[100];
- int cnt = removedoublesflag(em,1,0,scene->toolsettings->doublimit);
+ int cnt = removedoublesflag(em,1,0,ts->doublimit);
if(cnt)
{
@@ -496,8 +496,8 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_INFO, msg);
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -677,7 +677,7 @@ void extrude_mesh(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op)
* This shouldn't be necessary, derived queries should be
* automatically building this data if invalid. Or something.
*/
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
object_handle_update(scene, obedit);
/* individual faces? */
@@ -711,8 +711,8 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *event)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
RNA_enum_set(op->ptr, "proportional", 0);
RNA_boolean_set(op->ptr, "mirror", 0);
@@ -736,8 +736,8 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op)
extrude_mesh(scene, obedit, em, op);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -762,7 +762,6 @@ void MESH_OT_extrude(wmOperatorType *ot)
static int split_mesh(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -776,8 +775,8 @@ static int split_mesh(bContext *C, wmOperator *op)
WM_cursor_wait(0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -801,7 +800,6 @@ void MESH_OT_split(wmOperatorType *ot)
static int extrude_repeat_mesh(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -837,8 +835,8 @@ static int extrude_repeat_mesh(bContext *C, wmOperator *op)
EM_fgon_flags(em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -869,7 +867,7 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float degr, int dupli )
{
Object *obedit= CTX_data_edit_object(C);
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditVert *eve,*nextve;
float nor[3]= {0.0f, 0.0f, 0.0f};
@@ -891,7 +889,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
phi= degr*M_PI/360.0;
phi/= steps;
- if(scene->toolsettings->editbutflag & B_CLOCKWISE) phi= -phi;
+ if(ts->editbutflag & B_CLOCKWISE) phi= -phi;
RNA_float_get_array(op->ptr, "axis", n);
Normalize(n);
@@ -907,7 +905,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
Mat3MulMat3(bmat,imat,tmat);
if(dupli==0)
- if(scene->toolsettings->editbutflag & B_KEEPORIG)
+ if(ts->editbutflag & B_KEEPORIG)
adduplicateflag(em, 1);
for(a=0; a<steps; a++) {
@@ -941,7 +939,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
EM_fgon_flags(em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
BKE_mesh_end_editmesh(obedit->data, em);
@@ -950,7 +948,6 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
static int spin_mesh_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
int ok;
@@ -960,8 +957,8 @@ static int spin_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -1006,7 +1003,6 @@ void MESH_OT_spin(wmOperatorType *ot)
static int screw_mesh_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditVert *eve,*v1=0,*v2=0;
@@ -1062,8 +1058,8 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
}
if(spin_mesh(C, op, dvec, turns*steps, 360.0f*turns, 0)) {
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1308,14 +1304,13 @@ static EnumPropertyItem prop_mesh_delete_types[] = {
static int delete_mesh_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
delete_mesh(obedit, em, op, RNA_enum_get(op->ptr, "type"));
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2722,7 +2717,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
}
}
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
// Now for each face in the mesh we need to figure out How many edges were cut
// and which filling method to use for that face
for(ef = em->faces.first;ef;ef = ef->next) {
@@ -3696,7 +3691,6 @@ static void edge_rotate(EditMesh *em, wmOperator *op, EditEdge *eed, int dir)
/* only accepts 1 selected edge, or 2 selected faces */
static int edge_rotate_selected(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
EditEdge *eed;
@@ -3760,8 +3754,8 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -4611,7 +4605,7 @@ useless:
} else {
draw = 0;
}
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
@@ -4631,7 +4625,7 @@ useless:
if(!immediate)
EM_automerge(0);
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
// scrarea_queue_winredraw(curarea);
//BLI_ghash_free(edgesgh, freeGHash, NULL);
@@ -4681,7 +4675,7 @@ int EdgeLoopDelete(EditMesh *em, wmOperator *op)
EM_select_more(em);
removedoublesflag(em, 1,0, 0.001);
EM_select_flush(em);
- // DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ // DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return 1;
}
@@ -4793,7 +4787,6 @@ static void mesh_rip_setface(EditMesh *em, EditFace *sefa)
/* based on mouse cursor position, it defines how is being ripped */
static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- Scene *scene= CTX_data_scene(C);
ARegion *ar= CTX_wm_region(C);
RegionView3D *rv3d= ar->regiondata;
Object *obedit= CTX_data_edit_object(C);
@@ -4989,8 +4982,8 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -5061,7 +5054,7 @@ void shape_propagate(Scene *scene, Object *obedit, EditMesh *em, wmOperator *op)
}
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
return;
}
@@ -5106,7 +5099,7 @@ void shape_copy_from_lerp(EditMesh *em, KeyBlock* thisBlock, KeyBlock* fromBlock
}
}
sprintf(str,"Blending at %d%c MMB to Copy at 100%c",(int)(perc*100),'%','%');
-// DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
// headerprint(str);
// force_draw(0);
@@ -5764,7 +5757,6 @@ int merge_target(EditMesh *em, int target, int uvmerge)
static int merge_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
int count= 0, uvs= RNA_boolean_get(op->ptr, "uvs");
@@ -5794,8 +5786,8 @@ static int merge_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -6040,7 +6032,7 @@ int select_vertex_path_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -6108,7 +6100,7 @@ static int region_to_loop(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -6284,7 +6276,7 @@ static int loop_to_region(bContext *C, wmOperator *op)
freecollections(&allcollections);
BKE_mesh_end_editmesh(obedit->data, em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -6311,7 +6303,6 @@ void MESH_OT_loop_to_region(wmOperatorType *ot)
static int mesh_rotate_uvs(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6378,15 +6369,14 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
static int mesh_mirror_uvs(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6468,15 +6458,14 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
static int mesh_rotate_colors(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6525,8 +6514,8 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -6534,7 +6523,6 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
static int mesh_mirror_colors(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6582,8 +6570,8 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -6664,7 +6652,7 @@ void MESH_OT_colors_mirror(wmOperatorType *ot)
static int subdivide_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
int cuts= RNA_int_get(op->ptr,"number_cuts");
@@ -6677,10 +6665,10 @@ static int subdivide_exec(bContext *C, wmOperator *op)
if(fractal != 0.0f)
flag |= B_FRACTAL;
- esubdivideflag(obedit, em, 1, smooth, fractal, scene->toolsettings->editbutflag|flag, cuts, 0);
+ esubdivideflag(obedit, em, 1, smooth, fractal, ts->editbutflag|flag, cuts, 0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -6953,7 +6941,6 @@ static void fill_mesh(EditMesh *em)
static int fill_mesh_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6961,8 +6948,8 @@ static int fill_mesh_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -6985,7 +6972,6 @@ void MESH_OT_fill(wmOperatorType *ot)
static int beauty_fill_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -6993,8 +6979,8 @@ static int beauty_fill_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -7018,14 +7004,13 @@ void MESH_OT_beauty_fill(wmOperatorType *ot)
static int quads_convert_to_tris_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
convert_to_triface(em,0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -7048,14 +7033,13 @@ void MESH_OT_quads_convert_to_tris(wmOperatorType *ot)
static int tris_convert_to_quads_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
join_triangles(em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -7078,14 +7062,13 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot)
static int edge_flip_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
edge_flip(em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -7124,7 +7107,6 @@ void mesh_set_smooth_faces(EditMesh *em, short smooth)
static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -7132,8 +7114,8 @@ static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -7155,14 +7137,13 @@ void MESH_OT_faces_shade_smooth(wmOperatorType *ot)
static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
mesh_set_smooth_faces(em, 0);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mesh/mesh_layers.c b/source/blender/editors/mesh/mesh_layers.c
index 17a448ecf90..a36c7a56b7c 100644
--- a/source/blender/editors/mesh/mesh_layers.c
+++ b/source/blender/editors/mesh/mesh_layers.c
@@ -152,20 +152,21 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
/*********************** UV texture operators ************************/
+static int layers_poll(bContext *C)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ ID *data= (ob)? ob->data: NULL;
+ return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib);
+}
+
static int uv_texture_add_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me;
+ Mesh *me= ob->data;
EditMesh *em;
int layernum;
- if(!ob || ob->type!=OB_MESH)
- return OPERATOR_CANCELLED;
-
- me= (Mesh*)ob->data;
-
- if(scene->obedit == ob) {
+ if(me->edit_mesh) {
em= me->edit_mesh;
layernum= CustomData_number_of_layers(&em->fdata, CD_MTFACE);
@@ -175,7 +176,7 @@ static int uv_texture_add_exec(bContext *C, wmOperator *op)
EM_add_data_layer(em, &em->fdata, CD_MTFACE);
CustomData_set_layer_active(&em->fdata, CD_MTFACE, layernum);
}
- else if(ob) {
+ else {
layernum= CustomData_number_of_layers(&me->fdata, CD_MTFACE);
if(layernum >= MAX_MTFACE)
return OPERATOR_CANCELLED;
@@ -189,8 +190,8 @@ static int uv_texture_add_exec(bContext *C, wmOperator *op)
mesh_update_customdata_pointers(me);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
}
@@ -203,6 +204,7 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot)
ot->idname= "MESH_OT_uv_texture_add";
/* api callbacks */
+ ot->poll= layers_poll;
ot->exec= uv_texture_add_exec;
/* flags */
@@ -211,16 +213,11 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot)
static int uv_texture_remove_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me;
+ Mesh *me= ob->data;
CustomDataLayer *cdl;
int index;
- if(!ob || ob->type!=OB_MESH)
- return OPERATOR_CANCELLED;
-
- me= (Mesh*)ob->data;
index= CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
cdl= (index == -1)? NULL: &me->fdata.layers[index];
@@ -229,8 +226,8 @@ static int uv_texture_remove_exec(bContext *C, wmOperator *op)
delete_customdata_layer(C, ob, cdl);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
}
@@ -243,6 +240,7 @@ void MESH_OT_uv_texture_remove(wmOperatorType *ot)
ot->idname= "MESH_OT_uv_texture_remove";
/* api callbacks */
+ ot->poll= layers_poll;
ot->exec= uv_texture_remove_exec;
/* flags */
@@ -255,17 +253,12 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me;
+ Mesh *me= ob->data;
EditMesh *em;
MCol *mcol;
int layernum;
- if(!ob || ob->type!=OB_MESH)
- return OPERATOR_CANCELLED;
-
- me= (Mesh*)ob->data;
-
- if(scene->obedit == ob) {
+ if(me->edit_mesh) {
em= me->edit_mesh;
layernum= CustomData_number_of_layers(&em->fdata, CD_MCOL);
@@ -294,8 +287,8 @@ static int vertex_color_add_exec(bContext *C, wmOperator *op)
shadeMeshMCol(scene, ob, me);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
}
@@ -308,6 +301,7 @@ void MESH_OT_vertex_color_add(wmOperatorType *ot)
ot->idname= "MESH_OT_vertex_color_add";
/* api callbacks */
+ ot->poll= layers_poll;
ot->exec= vertex_color_add_exec;
/* flags */
@@ -316,16 +310,11 @@ void MESH_OT_vertex_color_add(wmOperatorType *ot)
static int vertex_color_remove_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me;
+ Mesh *me= ob->data;
CustomDataLayer *cdl;
int index;
- if(!ob || ob->type!=OB_MESH)
- return OPERATOR_CANCELLED;
-
- me= (Mesh*)ob->data;
index= CustomData_get_active_layer_index(&me->fdata, CD_MCOL);
cdl= (index == -1)? NULL: &me->fdata.layers[index];
@@ -334,8 +323,8 @@ static int vertex_color_remove_exec(bContext *C, wmOperator *op)
delete_customdata_layer(C, ob, cdl);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
}
@@ -349,6 +338,7 @@ void MESH_OT_vertex_color_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec= vertex_color_remove_exec;
+ ot->poll= layers_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -358,22 +348,16 @@ void MESH_OT_vertex_color_remove(wmOperatorType *ot)
static int sticky_add_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me;
-
- if(!ob || ob->type!=OB_MESH)
- return OPERATOR_CANCELLED;
-
- me= (Mesh*)ob->data;
+ Mesh *me= ob->data;
if(me->msticky)
return OPERATOR_CANCELLED;
// XXX RE_make_sticky();
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
}
@@ -386,6 +370,7 @@ void MESH_OT_sticky_add(wmOperatorType *ot)
ot->idname= "MESH_OT_sticky_add";
/* api callbacks */
+ ot->poll= layers_poll;
ot->exec= sticky_add_exec;
/* flags */
@@ -394,14 +379,8 @@ void MESH_OT_sticky_add(wmOperatorType *ot)
static int sticky_remove_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Mesh *me;
-
- if(!ob || ob->type!=OB_MESH)
- return OPERATOR_CANCELLED;
-
- me= (Mesh*)ob->data;
+ Mesh *me= ob->data;
if(!me->msticky)
return OPERATOR_CANCELLED;
@@ -409,8 +388,8 @@ static int sticky_remove_exec(bContext *C, wmOperator *op)
CustomData_free_layer_active(&me->vdata, CD_MSTICKY, me->totvert);
me->msticky= NULL;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
}
@@ -423,6 +402,7 @@ void MESH_OT_sticky_remove(wmOperatorType *ot)
ot->idname= "MESH_OT_sticky_remove";
/* api callbacks */
+ ot->poll= layers_poll;
ot->exec= sticky_remove_exec;
/* flags */
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 5d4be254593..2ef1d3b214d 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -681,7 +681,7 @@ void sort_faces(Scene *scene, View3D *v3d)
MEM_freeN(index);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(ob->data, OB_RECALC_DATA);
}
diff --git a/source/blender/editors/metaball/editmball.c b/source/blender/editors/metaball/editmball.c
index b9bb219783f..9ab985fb3fb 100644
--- a/source/blender/editors/metaball/editmball.c
+++ b/source/blender/editors/metaball/editmball.c
@@ -212,8 +212,8 @@ static int select_deselect_all_metaelems_exec(bContext *C, wmOperator *op)
else ml->flag |= SELECT;
ml= ml->next;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
- //DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
+ //DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -251,7 +251,7 @@ static int select_inverse_metaelems_exec(bContext *C, wmOperator *op)
ml->flag |= SELECT;
ml= ml->next;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
}
return OPERATOR_FINISHED;
@@ -296,7 +296,7 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
ml= ml->next;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
return OPERATOR_FINISHED;
}
@@ -325,7 +325,6 @@ void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot)
/* Duplicate selected MetaElements */
static int duplicate_metaelems_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb = (MetaBall*)obedit->data;
MetaElem *ml, *newml;
@@ -341,8 +340,8 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *op)
}
ml= ml->prev;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -384,7 +383,6 @@ void MBALL_OT_duplicate_metaelems(wmOperatorType *ot)
/* Delete all selected MetaElems (not MetaBall) */
static int delete_metaelems_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb= (MetaBall*)obedit->data;
MetaElem *ml, *next;
@@ -400,8 +398,8 @@ static int delete_metaelems_exec(bContext *C, wmOperator *op)
}
ml= next;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -426,7 +424,6 @@ void MBALL_OT_delete_metaelems(wmOperatorType *ot)
/* Hide selected MetaElems */
static int hide_metaelems_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb= (MetaBall*)obedit->data;
MetaElem *ml;
@@ -450,8 +447,8 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op)
ml= ml->next;
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -479,7 +476,6 @@ void MBALL_OT_hide_metaelems(wmOperatorType *ot)
/* Unhide all edited MetaElems */
static int reveal_metaelems_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
MetaBall *mb= (MetaBall*)obedit->data;
MetaElem *ml;
@@ -491,8 +487,8 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *op)
ml->flag &= ~MB_HIDE;
ml= ml->next;
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
}
return OPERATOR_FINISHED;
@@ -584,7 +580,7 @@ void mouse_mball(bContext *C, short mval[2], int extend)
}
mb->lastelem= act;
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, mb);
}
}
}
diff --git a/source/blender/editors/object/editconstraint.c b/source/blender/editors/object/editconstraint.c
index dc0442a5af9..c1b1062bfc4 100644
--- a/source/blender/editors/object/editconstraint.c
+++ b/source/blender/editors/object/editconstraint.c
@@ -825,7 +825,6 @@ void CONSTRAINT_OT_move_up (wmOperatorType *ot)
static int pose_constraints_clear_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* free constraints for all selected bones */
@@ -836,7 +835,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
/* do updates */
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_POSE|ND_CONSTRAINT|NA_REMOVED, ob);
return OPERATOR_FINISHED;
@@ -857,7 +856,6 @@ void POSE_OT_constraints_clear(wmOperatorType *ot)
static int object_constraints_clear_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* do freeing */
@@ -865,7 +863,7 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *op)
free_constraints(&ob->constraints);
/* do updates */
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
return OPERATOR_FINISHED;
@@ -1138,10 +1136,10 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
if ((ob->type==OB_ARMATURE) && (pchan)) {
ob->pose->flag |= POSE_RECALC; /* sort pose channels */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
}
else
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* notifiers for updates */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, ob);
@@ -1376,7 +1374,6 @@ void POSE_OT_ik_add(wmOperatorType *ot)
/* remove IK constraints from selected bones */
static int pose_ik_clear_exec(bContext *C, wmOperator *op)
{
- Scene *scene = CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
/* only remove IK Constraints */
@@ -1397,7 +1394,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
/* */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
diff --git a/source/blender/editors/object/editkey.c b/source/blender/editors/object/editkey.c
index 82194a4c3b4..2ec3edd846a 100644
--- a/source/blender/editors/object/editkey.c
+++ b/source/blender/editors/object/editkey.c
@@ -473,7 +473,7 @@ int ED_object_shape_key_remove(bContext *C, Scene *scene, Object *ob)
free_libblock_us(&(bmain->key), key);
}
- DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return 1;
@@ -481,14 +481,18 @@ int ED_object_shape_key_remove(bContext *C, Scene *scene, Object *ob)
/********************** shape key operators *********************/
+static int shape_key_poll(bContext *C)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ ID *data= (ob)? ob->data: NULL;
+ return (ob && !ob->id.lib && data && !data->lib);
+}
+
static int shape_key_add_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- if(!ob)
- return OPERATOR_CANCELLED;
-
ED_object_shape_key_add(C, scene, ob);
return OPERATOR_FINISHED;
@@ -501,6 +505,7 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
ot->idname= "OBJECT_OT_shape_key_add";
/* api callbacks */
+ ot->poll= shape_key_poll;
ot->exec= shape_key_add_exec;
/* flags */
@@ -509,12 +514,9 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
static int shape_key_remove_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
Scene *scene= CTX_data_scene(C);
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- if(!ob)
- return OPERATOR_CANCELLED;
-
if(!ED_object_shape_key_remove(C, scene, ob))
return OPERATOR_CANCELLED;
@@ -528,97 +530,10 @@ void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
ot->idname= "OBJECT_OT_shape_key_remove";
/* api callbacks */
+ ot->poll= shape_key_poll;
ot->exec= shape_key_remove_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-void move_keys(Object *ob)
-{
-#if 0
- /* XXX probably goes away entirely */
- Key *key;
- KeyBlock *kb;
- float div, dy, oldpos, vec[3], dvec[3];
- int afbreek=0, firsttime= 1;
- unsigned short event = 0;
- short mval[2], val, xo, yo;
- char str[32];
-
- if(G.sipo->blocktype!=ID_KE) return;
-
- if(G.sipo->ipo && G.sipo->ipo->id.lib) return;
- if(G.sipo->editipo==NULL) return;
-
- key= ob_get_key(ob);
- if(key==NULL) return;
-
- /* which kb is involved */
- kb= BLI_findlink(&key->block, ob->shapenr-1);
- if(kb==NULL) return;
-
- oldpos= kb->pos;
-
- getmouseco_areawin(mval);
- xo= mval[0];
- yo= mval[1];
- dvec[0]=dvec[1]=dvec[2]= 0.0;
-
- while(afbreek==0) {
- getmouseco_areawin(mval);
- if(mval[0]!=xo || mval[1]!=yo || firsttime) {
- firsttime= 0;
-
- dy= (float)(mval[1]- yo);
-
- div= (float)(G.v2d->mask.ymax-G.v2d->mask.ymin);
- dvec[1]+= (G.v2d->cur.ymax-G.v2d->cur.ymin)*(dy)/div;
-
- VECCOPY(vec, dvec);
-
- apply_keyb_grid(vec, 0.0, 1.0, 0.1, U.flag & USER_AUTOGRABGRID);
- apply_keyb_grid(vec+1, 0.0, 1.0, 0.1, U.flag & USER_AUTOGRABGRID);
-
- kb->pos= oldpos+vec[1];
-
- sprintf(str, "Y: %.3f ", vec[1]);
- headerprint(str);
-
- xo= mval[0];
- yo= mval[1];
-
- force_draw(0);
- }
- else BIF_wait_for_statechange();
-
- while(qtest()) {
- event= extern_qread(&val);
- if(val) {
- switch(event) {
- case ESCKEY:
- case LEFTMOUSE:
- case SPACEKEY:
- afbreek= 1;
- break;
- default:
- arrows_move_cursor(event);
- }
- }
- }
- }
-
- if(event==ESCKEY) {
- kb->pos= oldpos;
- }
-
- sort_keys(key);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
-
- /* for boundbox */
- editipo_changed(G.sipo, 0);
-
- BIF_undo_push("Move Shapekey(s)");
-#endif
-}
-
diff --git a/source/blender/editors/object/editlattice.c b/source/blender/editors/object/editlattice.c
index 3e30efd635a..3ec1f3af014 100644
--- a/source/blender/editors/object/editlattice.c
+++ b/source/blender/editors/object/editlattice.c
@@ -203,7 +203,7 @@ int de_select_all_exec(bContext *C, wmOperator *op)
else
setflagsLatt(obedit, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
return OPERATOR_FINISHED;
}
@@ -234,7 +234,6 @@ int make_regular_poll(bContext *C)
int make_regular_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
Lattice *lt;
@@ -248,8 +247,8 @@ int make_regular_exec(bContext *C, wmOperator *op)
resizelattice(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -318,7 +317,7 @@ void mouse_lattice(bContext *C, short mval[2], int extend)
else
bp->f1 ^= SELECT; /* swap */
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, vc.obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data);
}
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index a5e92096ef9..53882ad8424 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -193,7 +193,7 @@ void ED_base_object_activate(bContext *C, Base *base)
for(tbase=FIRSTBASE; tbase; tbase= tbase->next) {
if(base!=tbase && (tbase->object->shapeflag & OB_SHAPE_TEMPLOCK)) {
tbase->object->shapeflag &= ~OB_SHAPE_TEMPLOCK;
- DAG_object_flush_update(scene, tbase->object, OB_RECALC_DATA);
+ DAG_id_flush_update(&tbase->object->id, OB_RECALC_DATA);
}
}
WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
@@ -343,7 +343,7 @@ static int object_add_mesh_exec(bContext *C, wmOperator *op)
ED_object_enter_editmode(C, EM_DO_UNDO);
newob = 1;
}
- else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
switch(RNA_enum_get(op->ptr, "type")) {
case 0:
@@ -379,7 +379,7 @@ static int object_add_mesh_exec(bContext *C, wmOperator *op)
ED_object_exit_editmode(C, EM_FREEDATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -425,7 +425,7 @@ static int object_add_curve_exec(bContext *C, wmOperator *op)
ED_object_enter_editmode(C, 0);
newob = 1;
}
- else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
obedit= CTX_data_edit_object(C);
nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
@@ -437,7 +437,7 @@ static int object_add_curve_exec(bContext *C, wmOperator *op)
ED_object_exit_editmode(C, EM_FREEDATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -500,7 +500,7 @@ static int object_add_surface_exec(bContext *C, wmOperator *op)
ED_object_enter_editmode(C, 0);
newob = 1;
}
- else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
obedit= CTX_data_edit_object(C);
nu= add_nurbs_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
@@ -512,7 +512,7 @@ static int object_add_surface_exec(bContext *C, wmOperator *op)
ED_object_exit_editmode(C, EM_FREEDATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -557,7 +557,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
ED_object_enter_editmode(C, 0);
newob = 1;
}
- else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
obedit= CTX_data_edit_object(C);
elem= (MetaElem*)add_metaball_primitive(C, RNA_enum_get(op->ptr, "type"), newob);
@@ -569,7 +569,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
ED_object_exit_editmode(C, EM_FREEDATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -621,7 +621,7 @@ static int object_add_text_exec(bContext *C, wmOperator *op)
if(U.flag & USER_ADD_EDITMODE)
ED_object_enter_editmode(C, 0);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -653,7 +653,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
ED_object_enter_editmode(C, 0);
newob = 1;
}
- else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
+ else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
if(v3d)
rv3d= CTX_wm_region(C)->regiondata;
@@ -666,7 +666,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
ED_object_exit_editmode(C, EM_FREEDATA);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
return OPERATOR_FINISHED;
}
@@ -3034,7 +3034,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op)
/* depsgraph flushes are needed for the new data */
DAG_scene_sort(scene);
- DAG_object_flush_update(scene, newob, OB_RECALC);
+ DAG_id_flush_update(&newob->id, OB_RECALC);
WM_event_add_notifier(C, NC_OBJECT, NULL);
}
@@ -3543,7 +3543,7 @@ static int object_center_set_exec(bContext *C, wmOperator *op)
recalc_editnormals(em);
tot_change++;
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
BKE_mesh_end_editmesh(me, em);
}
}
@@ -3735,7 +3735,7 @@ static int object_center_set_exec(bContext *C, wmOperator *op)
tot_change++;
if(obedit) {
if (centermode==0) {
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
}
break;
}
@@ -3884,7 +3884,7 @@ void ED_object_exit_editmode(bContext *C, int flag)
scene->obedit= NULL; // XXX for context
/* also flush ob recalc, doesn't take much overhead, but used for particles */
- DAG_object_flush_update(scene, obedit, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_flush_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);
ED_undo_push(C, "Editmode");
@@ -3963,7 +3963,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
scene->obedit= ob;
ED_armature_to_edit(ob);
/* to ensure all goes in restposition and without striding */
- DAG_object_flush_update(scene, ob, OB_RECALC);
+ DAG_id_flush_update(&ob->id, OB_RECALC);
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene);
}
@@ -3997,7 +3997,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
}
if(ok) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
scene->obedit= NULL; // XXX for context
@@ -4327,7 +4327,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
}
}
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else if(ob->mode & OB_MODE_VERTEX_PAINT) {
Mesh *me= get_mesh(ob);
@@ -4339,7 +4339,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
// XXX do_shared_vertexcol(me);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
else if(ob->mode & OB_MODE_WEIGHT_PAINT) {
@@ -4386,7 +4386,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
break;
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
if(nr>0) waitcursor(0);
#endif
@@ -4809,7 +4809,7 @@ static void object_flip_subdivison_particles(Scene *scene, Object *ob, int *set,
}
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
if(ob->dup_group && depth<=4) {
@@ -6790,7 +6790,6 @@ void OBJECT_OT_join(wmOperatorType *ot)
static int shade_smooth_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob;
Curve *cu;
Nurb *nu;
@@ -6803,7 +6802,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
if(ob->type==OB_MESH) {
mesh_set_smooth_flag(ob, !clear);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
done= 1;
@@ -6817,7 +6816,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
nu= nu->next;
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
done= 1;
@@ -6904,7 +6903,7 @@ void image_aspect(Scene *scene, View3D *v3d)
else ob->size[1]= ob->size[0]*y/x;
done= 1;
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
}
if(done) break;
@@ -7184,7 +7183,7 @@ void hookmenu(Scene *scene, View3D *v3d)
Mat4MulSerie(hmd->parentinv, hmd->object->imat, ob->obmat, NULL, NULL, NULL, NULL, NULL, NULL);
changed= 1;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
} else {
float *curs = give_cursor(scene, v3d);
@@ -7202,7 +7201,7 @@ void hookmenu(Scene *scene, View3D *v3d)
Mat3MulVecfl(imat, hmd->cent);
changed= 1;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
}
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 96e485e5462..aecb778db06 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -119,7 +119,7 @@ int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int ty
DAG_scene_sort(scene);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
return 1;
}
@@ -168,7 +168,7 @@ int ED_object_modifier_remove(ReportList *reports, Scene *scene, Object *ob, Mod
BLI_remlink(&ob->modifiers, md);
modifier_free(md);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
return 1;
}
@@ -376,7 +376,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
MEM_freeN(vertexCos);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type");
@@ -408,7 +408,8 @@ int ED_object_modifier_copy(ReportList *reports, Object *ob, ModifierData *md)
static int modifier_poll(bContext *C)
{
- return (CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier).data != NULL);
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
+ return (ptr.data != NULL && !((ID*)ptr.id.data)->lib);
}
/************************ add modifier operator *********************/
@@ -518,7 +519,6 @@ void OBJECT_OT_modifier_remove(wmOperatorType *ot)
static int modifier_move_up_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
Object *ob= ptr.id.data;
ModifierData *md= ptr.data;
@@ -526,7 +526,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op)
if(!ED_object_modifier_move_up(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -550,7 +550,6 @@ void OBJECT_OT_modifier_move_up(wmOperatorType *ot)
static int modifier_move_down_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
Object *ob= ptr.id.data;
ModifierData *md= ptr.data;
@@ -558,7 +557,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -590,7 +589,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_apply(op->reports, scene, ob, md))
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -622,7 +621,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_convert(op->reports, scene, ob, md))
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -646,7 +645,6 @@ void OBJECT_OT_modifier_convert(wmOperatorType *ot)
static int modifier_copy_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
Object *ob= ptr.id.data;
ModifierData *md= ptr.data;
@@ -654,7 +652,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_copy(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -718,8 +716,9 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op)
static int multires_subdivide_poll(bContext *C)
{
- return (CTX_data_pointer_get_type(C, "modifier", &RNA_MultiresModifier).data != NULL) &&
- CTX_data_edit_object(C) == NULL;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_MultiresModifier);
+ ID *id= ptr.id.data;
+ return (ptr.data && id && !id->lib);
}
void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
@@ -739,7 +738,9 @@ void OBJECT_OT_multires_subdivide(wmOperatorType *ot)
static int meshdeform_poll(bContext *C)
{
- return CTX_data_pointer_get_type(C, "modifier", &RNA_MeshDeformModifier).data != NULL;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_MeshDeformModifier);
+ ID *id= ptr.id.data;
+ return (ptr.data && id && !id->lib);
}
static int meshdeform_bind_exec(bContext *C, wmOperator *op)
@@ -864,12 +865,13 @@ static uiBlock *modifiers_add_menu(void *ob_v)
static int hook_poll(bContext *C)
{
- return CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier).data != NULL;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
+ ID *id= ptr.id.data;
+ return (ptr.data && id && !id->lib);
}
static int hook_reset_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
Object *ob= ptr.id.data;
HookModifierData *hmd= ptr.data;
@@ -892,7 +894,7 @@ static int hook_reset_exec(bContext *C, wmOperator *op)
}
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -925,7 +927,7 @@ static int hook_recenter_exec(bContext *C, wmOperator *op)
VECSUB(hmd->cent, scene->cursor, ob->obmat[3]);
Mat3MulVecfl(imat, hmd->cent);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -952,7 +954,7 @@ static int hook_select_exec(bContext *C, wmOperator *op)
object_hook_select(ob, hmd);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
return OPERATOR_FINISHED;
}
@@ -972,7 +974,6 @@ void OBJECT_OT_hook_select(wmOperatorType *ot)
static int hook_assign_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_HookModifier);
Object *ob= ptr.id.data;
HookModifierData *hmd= ptr.data;
@@ -992,7 +993,7 @@ static int hook_assign_exec(bContext *C, wmOperator *op)
hmd->indexar= indexar;
hmd->totindex= tot;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -1015,19 +1016,20 @@ void OBJECT_OT_hook_assign(wmOperatorType *ot)
static int explode_refresh_poll(bContext *C)
{
- return CTX_data_pointer_get_type(C, "modifier", &RNA_ExplodeModifier).data != NULL;
+ PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_ExplodeModifier);
+ ID *id= ptr.id.data;
+ return (ptr.data && id && !id->lib);
}
static int explode_refresh_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_ExplodeModifier);
Object *ob= ptr.id.data;
ExplodeModifierData *emd= ptr.data;
emd->flag |= eExplodeFlag_CalcFaces;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 767a04d9170..1660160b56c 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -1102,17 +1102,21 @@ void vgroup_operation_with_menu(Object *ob)
/********************** vertex group operators *********************/
-static int vertex_group_add_exec(bContext *C, wmOperator *op)
+static int vertex_group_poll(bContext *C)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- Scene *scene= CTX_data_scene(C);
+ ID *data= (ob)? ob->data: NULL;
+ return (ob && !ob->id.lib && data && !data->lib);
+}
- if(!ob)
- return OPERATOR_CANCELLED;
+static int vertex_group_add_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
add_defgroup(ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -1124,6 +1128,7 @@ void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_add";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_add_exec;
/* flags */
@@ -1135,18 +1140,16 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op)
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
Scene *scene= CTX_data_scene(C);
- if(!ob)
- return OPERATOR_CANCELLED;
-
if(scene->obedit == ob) {
del_defgroup(ob);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
}
else {
del_defgroup_in_object_mode(ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
+
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -1158,6 +1161,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_remove";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_remove_exec;
/* flags */
@@ -1166,16 +1170,12 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
static int vertex_group_assign_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
ToolSettings *ts= CTX_data_tool_settings(C);
Object *ob= CTX_data_edit_object(C);
- if(!ob)
- return OPERATOR_CANCELLED;
-
assign_verts_defgroup(ob, ts->vgroup_weight);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -1187,6 +1187,7 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_assign";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_assign_exec;
/* flags */
@@ -1195,15 +1196,11 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_edit_object(C);
- if(!ob)
- return OPERATOR_CANCELLED;
-
remove_verts_defgroup(ob, 0);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -1215,6 +1212,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_remove_from";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_remove_from_exec;
/* flags */
@@ -1225,11 +1223,11 @@ static int vertex_group_select_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_edit_object(C);
- if(!ob)
+ if(!ob || ob->id.lib)
return OPERATOR_CANCELLED;
- sel_verts_defgroup(ob, 1); /* runs countall() */
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ sel_verts_defgroup(ob, 1);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
return OPERATOR_FINISHED;
}
@@ -1241,6 +1239,7 @@ void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_select";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_select_exec;
/* flags */
@@ -1251,11 +1250,8 @@ static int vertex_group_deselect_exec(bContext *C, wmOperator *op)
{
Object *ob= CTX_data_edit_object(C);
- if(!ob)
- return OPERATOR_CANCELLED;
-
- sel_verts_defgroup(ob, 0); /* runs countall() */
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ sel_verts_defgroup(ob, 0);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
return OPERATOR_FINISHED;
}
@@ -1267,6 +1263,7 @@ void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_deselect";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_deselect_exec;
/* flags */
@@ -1275,15 +1272,12 @@ void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
static int vertex_group_copy_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
- if(!ob)
- return OPERATOR_CANCELLED;
-
duplicate_defgroup(ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -1295,6 +1289,7 @@ void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_copy";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_copy_exec;
/* flags */
@@ -1308,9 +1303,6 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *op)
Base *base;
int retval= OPERATOR_CANCELLED;
- if(!ob)
- return retval;
-
for(base=scene->base.first; base; base= base->next) {
if(base->object->type==ob->type) {
if(base->object!=ob && base->object->data==ob->data) {
@@ -1318,8 +1310,9 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *op)
BLI_duplicatelist(&base->object->defbase, &ob->defbase);
base->object->actdef= ob->actdef;
- DAG_object_flush_update(scene, base->object, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, base->object);
+ DAG_id_flush_update(&base->object->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, base->object);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data);
retval = OPERATOR_FINISHED;
}
@@ -1336,6 +1329,7 @@ void OBJECT_OT_vertex_group_copy_to_linked(wmOperatorType *ot)
ot->idname= "OBJECT_OT_vertex_group_copy_to_linked";
/* api callbacks */
+ ot->poll= vertex_group_poll;
ot->exec= vertex_group_copy_to_linked_exec;
/* flags */
diff --git a/source/blender/editors/physics/editparticle.c b/source/blender/editors/physics/editparticle.c
index 220928cb79c..3ddc143b5a3 100644
--- a/source/blender/editors/physics/editparticle.c
+++ b/source/blender/editors/physics/editparticle.c
@@ -1018,7 +1018,6 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys)
static void PE_update_selection(Scene *scene, Object *ob, int useflag)
{
- ParticleEditSettings *pset= PE_settings(scene);
PTCacheEdit *edit= PE_get_current(scene, ob);
HairKey *hkey;
POINT_P; KEY_K;
@@ -1156,7 +1155,7 @@ void PE_update_object(Scene *scene, Object *ob, int useflag)
point->flag &= ~PEP_EDIT_RECALC;
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
/************************************************/
@@ -1235,7 +1234,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1283,7 +1282,7 @@ int PE_mouse_particles(bContext *C, short *mval, int extend)
for_mouse_hit_keys(&data, toggle_key_select, 1); /* nearest only */
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1301,7 +1300,7 @@ static int select_first_exec(bContext *C, wmOperator *op)
PE_set_data(C, &data);
foreach_point(&data, select_root);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1334,7 +1333,7 @@ static int select_last_exec(bContext *C, wmOperator *op)
PE_set_data(C, &data);
foreach_point(&data, select_tip);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1374,7 +1373,7 @@ static int select_linked_exec(bContext *C, wmOperator *op)
for_mouse_hit_keys(&data, select_keys, 1); /* nearest only */
PE_update_selection(data.scene, data.ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1429,7 +1428,7 @@ int PE_border_select(bContext *C, rcti *rect, int select)
for_mouse_hit_keys(&data, select_key, 0);
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1454,7 +1453,7 @@ int PE_circle_select(bContext *C, int selecting, short *mval, float rad)
for_mouse_hit_keys(&data, select_key, 0);
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1520,7 +1519,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1554,7 +1553,7 @@ static int hide_exec(bContext *C, wmOperator *op)
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1596,7 +1595,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
}
PE_update_selection(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
return OPERATOR_FINISHED;
}
@@ -1650,7 +1649,7 @@ static int select_less_exec(bContext *C, wmOperator *op)
PE_set_data(C, &data);
foreach_point(&data, select_less_keys);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1708,7 +1707,7 @@ static int select_more_exec(bContext *C, wmOperator *op)
PE_set_data(C, &data);
foreach_point(&data, select_more_keys);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob);
return OPERATOR_FINISHED;
}
@@ -1796,7 +1795,7 @@ static int rekey_exec(bContext *C, wmOperator *op)
recalc_lengths(data.edit);
PE_update_object(data.scene, data.ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob);
return OPERATOR_FINISHED;
}
@@ -2091,7 +2090,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
recalc_lengths(data.edit);
PE_update_object(data.scene, data.ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob);
return OPERATOR_FINISHED;
}
@@ -2180,8 +2179,8 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles.", totremoved);
PE_update_object(scene, ob, 0);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob);
return OPERATOR_FINISHED;
}
@@ -2358,8 +2357,8 @@ static int delete_exec(bContext *C, wmOperator *op)
PE_update_object(data.scene, data.ob, 0);
- DAG_object_flush_update(data.scene, data.ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, data.ob);
+ DAG_id_flush_update(&data.ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob);
return OPERATOR_FINISHED;
}
@@ -2512,8 +2511,8 @@ static int mirror_exec(bContext *C, wmOperator *op)
PE_mirror_x(scene, ob, 0);
update_world_cos(ob, edit);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -2593,11 +2592,11 @@ static int set_edit_mode_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_edit_type_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set Brush";
+ ot->name= "Set Edit Type";
ot->idname= "PARTICLE_OT_edit_type_set";
/* api callbacks */
- ot->exec= set_brush_exec;
+ ot->exec= set_edit_mode_exec;
ot->invoke= WM_menu_invoke;
ot->poll= PE_poll;
@@ -2627,11 +2626,9 @@ static void brush_comb(PEData *data, float mat[][4], float imat[][4], int point_
static void brush_cut(PEData *data, int pa_index)
{
PTCacheEdit *edit = data->edit;
- ParticleSystem *psys= edit->psys;
ARegion *ar= data->vc.ar;
Object *ob= data->ob;
ParticleEditSettings *pset= PE_settings(data->scene);
- ParticleData *pa= &psys->particles[pa_index];
ParticleCacheKey *key= edit->pathcache[pa_index];
float rad2, cut_time= 1.0;
float x0, x1, v0, v1, o0, o1, xo0, xo1, d, dv;
@@ -3237,12 +3234,12 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
update_world_cos(ob,edit);
psys_free_path_cache(NULL, edit);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else
PE_update_object(scene, ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob);
bedit->lastmouse[0]= mouse[0];
bedit->lastmouse[1]= mouse[1];
@@ -3553,7 +3550,7 @@ void PE_undo_step(Scene *scene, int step)
}
PE_update_object(scene, OBACT, 0);
- DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
+ DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
}
static void PTCacheUndo_number(Scene *scene, PTCacheEdit *edit, int nr)
@@ -3780,9 +3777,7 @@ static int particle_edit_toggle_poll(bContext *C)
static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- PTCacheEdit *edit= PE_get_current(scene, ob);
if(!(ob->mode & OB_MODE_PARTICLE_EDIT)) {
ob->mode |= OB_MODE_PARTICLE_EDIT;
@@ -3795,7 +3790,7 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
return OPERATOR_FINISHED;
}
@@ -3819,7 +3814,6 @@ void PARTICLE_OT_particle_edit_toggle(wmOperatorType *ot)
static int clear_edited_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
ParticleSystem *psys = psys_get_current(ob);
@@ -3833,7 +3827,7 @@ static int clear_edited_exec(bContext *C, wmOperator *op)
psys->recalc |= PSYS_RECALC_RESET;
psys_reset(psys, PSYS_RESET_DEPSGRAPH);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index d082e17cda3..870b66cdbbd 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5184,7 +5184,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
toggle_paint_cursor(C, 1);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index f66a9fbc1ed..953a055c9e5 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -295,7 +295,7 @@ void make_vertexcol(Scene *scene, int shade) /* single ob */
else
memset(me->mcol, 255, 4*sizeof(MCol)*me->totface);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
@@ -358,7 +358,7 @@ void clear_vpaint(Scene *scene, int selected)
}
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
@@ -468,7 +468,7 @@ void clear_wpaint_selectedfaces(Scene *scene)
MEM_freeN(indexar);
copy_wpaint_prev(wp, NULL, 0);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
@@ -923,7 +923,7 @@ void sample_wpaint(Scene *scene, ARegion *ar, View3D *v3d, int mode)
val= 0; // XXX pupmenu(str);
if(val>=0) {
ob->actdef= val+1;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
MEM_freeN(str);
}
@@ -1049,7 +1049,7 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
* exit (exit needs doing regardless because we
* should redeform).
*/
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
if(ob->mode & OB_MODE_WEIGHT_PAINT) {
Object *par;
@@ -1446,7 +1446,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
MTC_Mat4SwapMat4(vc->rv3d->persmat, mat);
- DAG_object_flush_update(vc->scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(ob->data, OB_RECALC_DATA);
ED_region_tag_redraw(vc->ar);
}
@@ -1478,7 +1478,7 @@ static void wpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
}
}
- DAG_object_flush_update(CTX_data_scene(C), ob, OB_RECALC_DATA);
+ DAG_id_flush_update(ob->data, OB_RECALC_DATA);
MEM_freeN(wpd);
}
@@ -1564,7 +1564,7 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */
if (me)
/* update modifier stack for mapping requirements */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene);
@@ -1735,7 +1735,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
ED_region_tag_redraw(vc->ar);
- DAG_object_flush_update(vc->scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(ob->data, OB_RECALC_DATA);
}
static void vpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 2977d07d845..b7a3df563ea 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -372,6 +372,10 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn)
}*/
ED_area_tag_refresh(sa);
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_DOPESHEET)
+ ED_area_tag_redraw(sa);
+ break;
}
}
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 954a52c54aa..8cdc6b0cd2b 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -260,7 +260,6 @@ void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
static int material_slot_assign_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
if(!ob)
@@ -298,8 +297,8 @@ static int material_slot_assign_exec(bContext *C, wmOperator *op)
}
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
}
@@ -377,7 +376,7 @@ static int material_slot_de_select(bContext *C, int select)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, ob);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data);
return OPERATOR_FINISHED;
}
@@ -648,7 +647,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *op)
psys_check_boid_data(psys);
DAG_scene_sort(scene);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -695,7 +694,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *op)
BLI_addtail(&psys->targets, pt);
DAG_scene_sort(scene);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -742,7 +741,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *op)
pt->flag |= PTARGET_CURRENT;
DAG_scene_sort(scene);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -766,7 +765,6 @@ void PARTICLE_OT_remove_target(wmOperatorType *ot)
static int target_move_up_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
Object *ob = ptr.id.data;
@@ -781,7 +779,7 @@ static int target_move_up_exec(bContext *C, wmOperator *op)
BLI_remlink(&psys->targets, pt);
BLI_insertlink(&psys->targets, pt->prev->prev, pt);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
break;
}
@@ -806,7 +804,6 @@ void PARTICLE_OT_target_move_up(wmOperatorType *ot)
static int target_move_down_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
ParticleSystem *psys= ptr.data;
Object *ob = ptr.id.data;
@@ -820,7 +817,7 @@ static int target_move_down_exec(bContext *C, wmOperator *op)
BLI_remlink(&psys->targets, pt);
BLI_insertlink(&psys->targets, pt->next, pt);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
break;
}
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 71f8642afd4..5d1dbe47345 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -335,7 +335,6 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_TRANSFORM:
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
- case ND_GEOM_SELECT:
case ND_CONSTRAINT:
ED_area_tag_redraw(sa);
break;
@@ -346,6 +345,13 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
break;
}
break;
+ case NC_GEOM:
+ switch(wmn->data) {
+ case ND_SELECT:
+ ED_area_tag_redraw(sa);
+ break;
+ }
+ break;
case NC_MATERIAL:
ED_area_tag_redraw(sa);
@@ -358,14 +364,15 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_WORLD:
- ED_area_tag_redraw(sa);
- sbuts->preview= 1;
case NC_LAMP:
- ED_area_tag_redraw(sa);
- sbuts->preview= 1;
case NC_TEXTURE:
ED_area_tag_redraw(sa);
sbuts->preview= 1;
+ break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_PROPERTIES)
+ ED_area_tag_redraw(sa);
+ break;
}
if(wmn->data == ND_KEYS)
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 48890d6cac2..7e0dfe94432 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -321,11 +321,11 @@ static void console_main_area_listener(ScrArea *sa, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
- case NC_CONSOLE:
- if(wmn->data == ND_CONSOLE) { /* generic redraw request */
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_CONSOLE) { /* generic redraw request */
ED_area_tag_redraw(sa);
}
- else if(wmn->data == ND_CONSOLE_REPORT && sc->type==CONSOLE_TYPE_REPORT) {
+ else if(wmn->data == ND_SPACE_CONSOLE_REPORT && sc->type==CONSOLE_TYPE_REPORT) {
/* redraw also but only for report view, could do less redraws by checking the type */
ED_area_tag_redraw(sa);
}
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index a06c1663d8e..e1a6e346ce2 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -190,9 +190,9 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
if (FILE_SELECT_DIR == file_select(sfile, ar, &rect, val )) {
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
} else {
- WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
}
return OPERATOR_FINISHED;
}
@@ -239,12 +239,12 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
file_deselect_all(sfile);
if (FILE_SELECT_DIR == file_select(sfile, ar, &rect, val ))
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
else
- WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
WM_event_add_mousemove(C); /* for directory changes */
- WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
return OPERATOR_FINISHED;
}
@@ -322,7 +322,7 @@ static int bookmark_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
BLI_cleanup_dir(G.sce, params->dir);
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
return OPERATOR_FINISHED;
@@ -587,7 +587,7 @@ int file_parent_exec(bContext *C, wmOperator *unused)
BLI_parent_dir(sfile->params->dir);
BLI_cleanup_dir(G.sce, sfile->params->dir);
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
}
@@ -614,7 +614,7 @@ int file_refresh_exec(bContext *C, wmOperator *unused)
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
return OPERATOR_FINISHED;
@@ -645,7 +645,7 @@ int file_previous_exec(bContext *C, wmOperator *unused)
file_change_dir(sfile);
}
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
return OPERATOR_FINISHED;
}
@@ -676,7 +676,7 @@ int file_next_exec(bContext *C, wmOperator *unused)
file_change_dir(sfile);
}
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
return OPERATOR_FINISHED;
}
@@ -705,7 +705,7 @@ int file_directory_new_exec(bContext *C, wmOperator *unused)
BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), FILE_MAX);
}
}
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
return OPERATOR_FINISHED;
}
@@ -754,7 +754,7 @@ int file_directory_exec(bContext *C, wmOperator *unused)
BLI_cleanup_dir(G.sce, sfile->params->dir);
BLI_add_slash(sfile->params->dir);
file_change_dir(sfile);
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
@@ -769,7 +769,7 @@ int file_filename_exec(bContext *C, wmOperator *unused)
if (file_select_match(sfile, sfile->params->file))
{
sfile->params->file[0] = '\0';
- WM_event_add_notifier(C, NC_FILE|ND_PARAMS, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
}
}
@@ -796,7 +796,7 @@ int file_hidedot_exec(bContext *C, wmOperator *unused)
sfile->params->flag ^= FILE_HIDE_DOT;
filelist_free(sfile->files);
sfile->params->active_file = -1;
- WM_event_add_notifier(C, NC_FILE|ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
return OPERATOR_FINISHED;
@@ -958,7 +958,7 @@ int file_delete_exec(bContext *C, wmOperator *op)
file = filelist_file(sfile->files, sfile->params->active_file);
BLI_make_file_string(G.sce, str, sfile->params->dir, file->relname);
BLI_delete(str, 0, 0);
- WM_event_add_notifier(C, NC_FILE | ND_FILELIST, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 793f7cf8815..722fa475727 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -212,14 +212,14 @@ static void file_listener(ScrArea *sa, wmNotifier *wmn)
/* context changes */
switch(wmn->category) {
- case NC_FILE:
+ case NC_SPACE:
switch (wmn->data) {
- case ND_FILELIST:
+ case ND_SPACE_FILE_LIST:
if (sfile->files) filelist_free(sfile->files);
ED_area_tag_refresh(sa);
ED_area_tag_redraw(sa);
break;
- case ND_PARAMS:
+ case ND_SPACE_FILE_PARAMS:
ED_area_tag_refresh(sa);
ED_area_tag_redraw(sa);
break;
@@ -249,12 +249,12 @@ static void file_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
- case NC_FILE:
+ case NC_SPACE:
switch (wmn->data) {
- case ND_FILELIST:
+ case ND_SPACE_FILE_LIST:
ED_region_tag_redraw(ar);
break;
- case ND_PARAMS:
+ case ND_SPACE_FILE_PARAMS:
ED_region_tag_redraw(ar);
break;
}
@@ -470,9 +470,9 @@ static void file_ui_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
- case NC_FILE:
+ case NC_SPACE:
switch (wmn->data) {
- case ND_FILELIST:
+ case ND_SPACE_FILE_LIST:
ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 3717ccc8244..8887d464f30 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -423,6 +423,10 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
}*/
ED_area_tag_refresh(sa);
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_GRAPH)
+ ED_area_tag_redraw(sa);
+ break;
default:
if(wmn->data==ND_KEYS)
ED_area_tag_refresh(sa);
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index bb647e68917..c57bc5773b0 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -295,10 +295,14 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
case NC_IMAGE:
ED_area_tag_redraw(sa);
break;
- case NC_OBJECT:
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_IMAGE)
+ ED_area_tag_redraw(sa);
+ break;
+ case NC_GEOM:
switch(wmn->data) {
- case ND_GEOM_SELECT:
- case ND_GEOM_DATA:
+ case ND_DATA:
+ case ND_SELECT:
ED_area_tag_redraw(sa);
break;
}
@@ -625,7 +629,7 @@ void ED_space_image_set(bContext *C, SpaceImage *sima, Scene *scene, Object *obe
if(C) {
if(obedit)
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
ED_area_tag_redraw(CTX_wm_area(C));
}
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index b6f9cbeabb5..d3f9c97205c 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -167,8 +167,9 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn)
if(wmn->data==ND_RENDER_RESULT)
ED_region_tag_redraw(ar);
break;
- case NC_INFO:
- ED_region_tag_redraw(ar);
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_INFO)
+ ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index c4f929274c7..89d4e7cddf2 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -488,6 +488,10 @@ static void nla_listener(ScrArea *sa, wmNotifier *wmn)
}*/
ED_area_tag_refresh(sa);
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_NLA)
+ ED_area_tag_redraw(sa);
+ break;
}
}
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 2233a4db3a0..d3a445b18c0 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -163,6 +163,15 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
if(wmn->data==ND_NODES)
ED_area_tag_refresh(sa);
break;
+ case NC_TEXT:
+ /* pynodes */
+ if(wmn->data==ND_SHADING)
+ ED_area_tag_refresh(sa);
+ break;
+ case NC_SPACE:
+ if(wmn->data==ND_SPACE_NODE)
+ ED_area_tag_refresh(sa);
+ break;
}
}
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index a9a9a5dab5f..a3b47d505fd 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -1994,7 +1994,7 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement *
ob= (Object *)tselem->id;
if(set) {
ob->actdef= te->index+1;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
}
else {
@@ -2121,7 +2121,7 @@ static int tree_element_active_psys(bContext *C, Scene *scene, TreeElement *te,
if(set) {
Object *ob= (Object *)tselem->id;
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob);
// XXX extern_set_butspace(F7KEY, 0);
}
@@ -4682,7 +4682,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *poin, void *poin2)
Scene *scene = (Scene *)poin;
Object *ob = (Object *)poin2;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
object_handle_update(scene, ob);
WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index f57445a32f1..5058a167a29 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -137,6 +137,10 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
/* all actions now, todo: check outliner view mode? */
ED_region_tag_redraw(ar);
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_OUTLINER)
+ ED_region_tag_redraw(ar);
+ break;
}
}
@@ -190,6 +194,10 @@ static void outliner_header_area_listener(ARegion *ar, wmNotifier *wmn)
if(wmn->data == ND_KEYINGSET)
ED_region_tag_redraw(ar);
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_OUTLINER)
+ ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 084416f3a60..26ffd88ae67 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -219,6 +219,10 @@ static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_SEQUENCER)
+ ED_region_tag_redraw(ar);
+ break;
}
}
@@ -241,6 +245,10 @@ static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_SEQUENCER)
+ ED_region_tag_redraw(ar);
+ break;
}
}
@@ -293,6 +301,7 @@ void ED_spacetype_sequencer(void)
art->init= sequencer_header_area_init;
art->draw= sequencer_header_area_draw;
+ art->listener= sequencer_main_area_listener;
BLI_addhead(&st->regiontypes, art);
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 4394fbfe1f5..0d08490cfb0 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -143,6 +143,10 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_TEXT)
+ ED_area_tag_redraw(sa);
+ break;
}
}
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 14b72e13856..a8ef72e3273 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -549,7 +549,6 @@ static int refresh_pyconstraints_exec(bContext *C, wmOperator *op)
{
#ifndef DISABLE_PYTHON
Text *text= CTX_data_edit_text(C);
- Scene *scene= CTX_data_scene(C);
Object *ob;
bConstraint *con;
short update;
@@ -579,7 +578,7 @@ static int refresh_pyconstraints_exec(bContext *C, wmOperator *op)
}
if(update) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
#endif
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index ce6846a4489..8f7486f81d9 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -260,6 +260,11 @@ static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch(wmn->category) {
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_TIME)
+ ED_region_tag_redraw(ar);
+ break;
+
case NC_ANIMATION:
ED_region_tag_redraw(ar);
break;
@@ -293,6 +298,7 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
if(wmn->data==ND_ANIMPLAY)
ED_region_tag_redraw(ar);
break;
+
case NC_SCENE:
switch (wmn->data) {
case ND_FRAME:
@@ -300,6 +306,11 @@ static void time_header_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
}
+
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_TIME)
+ ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 97c5549e1ea..2250c2e7718 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -452,16 +452,24 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_TRANSFORM:
- case ND_GEOM_SELECT:
- case ND_GEOM_DATA:
case ND_DRAW:
case ND_MODIFIER:
case ND_CONSTRAINT:
case ND_KEYS:
- case ND_PARTICLE:
+ case ND_PARTICLE_SELECT:
+ case ND_PARTICLE_DATA:
ED_region_tag_redraw(ar);
break;
}
+ break;
+ case NC_GEOM:
+ switch(wmn->data) {
+ case ND_DATA:
+ case ND_SELECT:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
case NC_GROUP:
/* all group ops for now */
ED_region_tag_redraw(ar);
@@ -483,6 +491,10 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
* more context than just the region */
ED_region_tag_redraw(ar);
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_VIEW3D)
+ ED_region_tag_redraw(ar);
+ break;
}
}
@@ -528,6 +540,10 @@ static void view3d_header_area_listener(ARegion *ar, wmNotifier *wmn)
break;
}
break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_VIEW3D)
+ ED_region_tag_redraw(ar);
+ break;
}
}
@@ -576,13 +592,24 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_TRANSFORM:
- case ND_GEOM_SELECT:
- case ND_GEOM_DATA:
case ND_DRAW:
case ND_KEYS:
ED_region_tag_redraw(ar);
break;
}
+ break;
+ case NC_GEOM:
+ switch(wmn->data) {
+ case ND_DATA:
+ case ND_SELECT:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ case NC_SPACE:
+ if(wmn->data == ND_SPACE_VIEW3D)
+ ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 7c305d59866..c854de8e54d 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -660,7 +660,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
return; /* no notifier! */
case B_OBJECTPANEL:
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
break;
case B_OBJECTPANELROT:
@@ -668,7 +668,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
ob->rot[0]= M_PI*tfp->ob_eul[0]/180.0;
ob->rot[1]= M_PI*tfp->ob_eul[1]/180.0;
ob->rot[2]= M_PI*tfp->ob_eul[2]/180.0;
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
break;
@@ -706,7 +706,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
VECCOPY(ob->size, tfp->ob_scale);
}
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
break;
@@ -752,14 +752,14 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
/* prevent multiple B_OBJECTPANELDIMS events to keep scaling, cycling with TAB on buttons can cause that */
VECCOPY(tfp->ob_dims, old_dims);
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
break;
case B_OBJECTPANELMEDIAN:
if(ob) {
v3d_editvertex_buts(C, NULL, v3d, ob, 1.0);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
break;
@@ -770,7 +770,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
ob->parent= NULL;
else {
DAG_scene_sort(scene);
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
}
break;
@@ -847,7 +847,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
case B_ARMATUREPANEL2:
{
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
break;
case B_TRANSFORMSPACEADD:
@@ -900,7 +900,7 @@ static void do_view3d_region_buttons(bContext *C, void *arg, int event)
int a;
for(a=0; a<me->totvert; a++)
remove_vert_defgroup (ob, defGroup, a);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
break;
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 305b6956037..2283d36e018 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -1725,7 +1725,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
em->selectmode= SCE_SELECT_VERTEX;
ts->selectmode= em->selectmode;
EM_selectmode_set(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
ED_undo_push(C, "Selectmode Set: Vertex");
}
break;
@@ -1739,7 +1739,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
}
ts->selectmode= em->selectmode;
EM_selectmode_set(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
ED_undo_push(C, "Selectmode Set: Edge");
}
break;
@@ -1753,7 +1753,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event)
}
ts->selectmode= em->selectmode;
EM_selectmode_set(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
ED_undo_push(C, "Selectmode Set: Face");
}
break;
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 7743ede399b..5c6a22f5157 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1359,7 +1359,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
vc.em= me->edit_mesh;
do_mesh_box_select(&vc, &rect, (val==LEFTMOUSE));
// if (EM_texFaceCheck())
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
}
else if(ELEM(obedit->type, OB_CURVE, OB_SURF)) {
@@ -1802,7 +1802,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
if(CTX_data_edit_object(C)) {
obedit_circle_select(&vc, selecting, mval, (float)radius);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obact);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data);
}
else
return PE_circle_select(C, selecting, mval, (float)radius);
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 335bc2c9e56..2e5696170e2 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -106,7 +106,7 @@ static void special_transvert_update(Scene *scene, Object *obedit)
if(obedit) {
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
if(obedit->type==OB_MESH) {
Mesh *me= obedit->data;
@@ -514,7 +514,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *op)
/* auto-keyframing */
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;
@@ -640,7 +640,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *op)
/* auto-keyframing */
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;
@@ -1028,7 +1028,7 @@ static int snap_selected_to_center(bContext *C, wmOperator *op)
/* auto-keyframing */
ob->pose->flag |= POSE_DO_UNLOCK;
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index f0de28476f0..370e98ebd07 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -333,7 +333,7 @@ static void viewRedrawForce(bContext *C, TransInfo *t)
else force_draw(0);
#endif
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, t->obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, t->obedit->data);
}
}
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 302d9b675a0..0fce9592d1d 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4722,9 +4722,9 @@ void special_aftertrans_update(TransInfo *t)
ob->ctime= -1234567.0f;
if (ob->pose || ob_get_key(ob))
- DAG_object_flush_update(scene, ob, OB_RECALC);
+ DAG_id_flush_update(&ob->id, OB_RECALC);
else
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
/* Do curve cleanups? */
@@ -4748,7 +4748,7 @@ void special_aftertrans_update(TransInfo *t)
}
#endif // XXX old animation system
- DAG_object_flush_update(scene, OBACT, OB_RECALC_DATA);
+ DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
}
#if 0 // XXX future of this is still not clear
else if (ac.datatype == ANIMCONT_GPENCIL) {
@@ -4912,15 +4912,15 @@ void special_aftertrans_update(TransInfo *t)
/* automatic inserting of keys and unkeyed tagging - only if transform wasn't cancelled (or TFM_DUMMY) */
if (!cancelled && (t->mode != TFM_DUMMY)) {
autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik);
- DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else if (arm->flag & ARM_DELAYDEFORM) {
/* old optimize trick... this enforces to bypass the depgraph */
- DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
ob->recalc= 0; // is set on OK position already by recalcData()
}
else
- DAG_object_flush_update(t->scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
//if (t->mode==TFM_BONESIZE || t->mode==TFM_BONE_ENVELOPE)
// allqueue(REDRAWBUTSEDIT, 0);
@@ -4948,7 +4948,7 @@ void special_aftertrans_update(TransInfo *t)
/* Creates troubles for moving animated objects without */
/* autokey though, probably needed is an anim sys override? */
/* Please remove if some other solution is found. -jahka */
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
/* Set autokey if necessary */
if (!cancelled)
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 0f715f1d35a..0b7029adde0 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -283,7 +283,7 @@ static void animedit_refresh_id_tags (Scene *scene, ID *id)
case ID_OB:
{
Object *ob= (Object *)id;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
}
break;
}
@@ -621,7 +621,7 @@ void recalcData(TransInfo *t)
Curve *cu= t->obedit->data;
Nurb *nu= cu->editnurb->first;
- DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
if (t->state == TRANS_CANCEL) {
while(nu) {
@@ -641,7 +641,7 @@ void recalcData(TransInfo *t)
}
else if(t->obedit->type==OB_LATTICE) {
Lattice *la= t->obedit->data;
- DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
if(la->editlatt->flag & LT_OUTSIDE) outside_lattice(la->editlatt);
}
@@ -653,7 +653,7 @@ void recalcData(TransInfo *t)
if(sima->flag & SI_LIVE_UNWRAP)
ED_uvedit_live_unwrap_re_solve();
- DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA);
} else {
EditMesh *em = ((Mesh*)t->obedit->data)->edit_mesh;
/* mirror modifier clipping? */
@@ -668,7 +668,7 @@ void recalcData(TransInfo *t)
if((t->options & CTX_NO_MIRROR) == 0 && (t->flag & T_MIRROR))
editmesh_apply_to_mirror(t);
- DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
recalc_editnormals(em);
}
@@ -752,7 +752,7 @@ void recalcData(TransInfo *t)
}
else
- DAG_object_flush_update(scene, t->obedit, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(t->obedit->data, OB_RECALC_DATA); /* sets recalc flags */
}
else if( (t->flag & T_POSE) && t->poseobj) {
Object *ob= t->poseobj;
@@ -772,7 +772,7 @@ void recalcData(TransInfo *t)
/* old optimize trick... this enforces to bypass the depgraph */
if (!(arm->flag & ARM_DELAYDEFORM)) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
}
else
where_is_pose(scene, ob);
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 17a1e0b6cdb..2d73a9f1d25 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -267,7 +267,7 @@ void undo_editmode_step(bContext *C, int step)
}
}
-// DAG_object_flush_update(G.scene, obedit, OB_RECALC_DATA);
+// DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
/* XXX notifiers */
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index bb5a8b1dd40..a44421e8145 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -139,7 +139,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre
/* and update depdency graph */
if(update)
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
BKE_mesh_end_editmesh(obedit->data, em);
}
@@ -169,8 +169,8 @@ void ED_uvedit_set_tile(bContext *C, Scene *scene, Object *obedit, Image *ima, i
tf->tile= curtile; /* set tile index */
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
}
@@ -1058,8 +1058,8 @@ static void weld_align_uv(bContext *C, int tool)
}
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
}
@@ -1279,8 +1279,8 @@ static int stitch_exec(bContext *C, wmOperator *op)
MEM_freeN(uv_average);
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1336,7 +1336,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1406,7 +1406,7 @@ static int de_select_all_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1710,8 +1710,8 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
}
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED;
@@ -1834,8 +1834,8 @@ static int select_linked_exec(bContext *C, wmOperator *op)
uvedit_pixel_to_float(sima, limit, 0.05f);
select_linked(scene, ima, em, limit, NULL, extend);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1890,8 +1890,8 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
}
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2167,7 +2167,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2262,7 +2262,7 @@ int circle_select_exec(bContext *C, wmOperator *op)
if(select) EM_select_flush(em);
else EM_deselect_flush(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2567,8 +2567,8 @@ static int snap_selection_exec(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
}
@@ -2627,7 +2627,7 @@ static int pin_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2672,7 +2672,7 @@ static int select_pinned_exec(bContext *C, wmOperator *op)
}
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2704,7 +2704,7 @@ static int hide_exec(bContext *C, wmOperator *op)
if(ts->uv_flag & UV_SYNC_SELECTION) {
EM_hide_mesh(em, swap);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2812,7 +2812,7 @@ static int hide_exec(bContext *C, wmOperator *op)
}
EM_validate_selections(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2847,7 +2847,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
/* call the mesh function if we are in mesh sync sel */
if(ts->uv_flag & UV_SYNC_SELECTION) {
EM_reveal_mesh(em);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -2943,7 +2943,7 @@ static int reveal_exec(bContext *C, wmOperator *op)
EM_select_face(efa, 1);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_SELECT, obedit);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index c4f4704e47e..c18c9f8e022 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -263,8 +263,8 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, int interact
ms->lasttime = PIL_check_seconds_timer();
- DAG_object_flush_update(ms->scene, ms->obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ms->obedit);
+ DAG_id_flush_update(ms->obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ms->obedit->data);
}
}
@@ -286,8 +286,8 @@ static void minimize_stretch_exit(bContext *C, wmOperator *op, int cancel)
param_stretch_end(ms->handle);
param_delete(ms->handle);
- DAG_object_flush_update(ms->scene, ms->obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ms->obedit);
+ DAG_id_flush_update(ms->obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, ms->obedit->data);
MEM_freeN(ms);
op->customdata= NULL;
@@ -413,8 +413,8 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
param_flush(handle);
param_delete(handle);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -446,8 +446,8 @@ static int average_islands_scale_exec(bContext *C, wmOperator *op)
param_flush(handle);
param_delete(handle);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -810,8 +810,8 @@ static int unwrap_exec(bContext *C, wmOperator *op)
param_delete(handle);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -943,8 +943,8 @@ static int from_view_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1010,8 +1010,8 @@ static int reset_exec(bContext *C, wmOperator *op)
}
}
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1098,8 +1098,8 @@ static int sphere_project_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1170,8 +1170,8 @@ static int cylinder_project_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
@@ -1257,8 +1257,8 @@ static int cube_project_exec(bContext *C, wmOperator *op)
uv_map_clip_correct(em, op);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
+ DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_FINISHED;
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 7bab7947843..3f4b75508fe 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -48,29 +48,17 @@
static void rna_Armature_update_data(bContext *C, PointerRNA *ptr)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
ID *id= ptr->id.data;
- Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob->data == id) {
- /* XXX this will loop over all objects again (slow) */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- }
- }
+ DAG_id_flush_update(id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
static void rna_Armature_redraw_data(bContext *C, PointerRNA *ptr)
{
- Main *bmain= CTX_data_main(C);
ID *id= ptr->id.data;
- Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next)
- if(ob->data == id)
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
static void rna_bone_layer_set(short *layer, const int *values)
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 0c5565e253a..8002aa89313 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -41,6 +41,7 @@
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
+#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem boidrule_type_items[] ={
@@ -82,14 +83,15 @@ static void rna_Boids_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- if(ob) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- }
+ if(ob)
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Boids_reset_deps(bContext *C, PointerRNA *ptr)
{
@@ -102,15 +104,16 @@ static void rna_Boids_reset_deps(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- if(ob) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- }
+ if(ob)
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
DAG_scene_sort(scene);
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static StructRNA* rna_BoidRule_refine(struct PointerRNA *ptr)
@@ -247,12 +250,12 @@ static void rna_def_boidrule_goal(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Goal object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
static void rna_def_boidrule_avoid(BlenderRNA *brna)
@@ -268,17 +271,17 @@ static void rna_def_boidrule_avoid(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to avoid.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "fear_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fear factor", "Avoid object if danger from it is above this threshol.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
static void rna_def_boidrule_avoid_collision(BlenderRNA *brna)
@@ -292,17 +295,17 @@ static void rna_def_boidrule_avoid_collision(BlenderRNA *brna)
prop= RNA_def_property(srna, "boids", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_BOIDS);
RNA_def_property_ui_text(prop, "Boids", "Avoid collision with other boids.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "deflectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_DEFLECTORS);
RNA_def_property_ui_text(prop, "Deflectors", "Avoid collision with deflector objects.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "look_ahead", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Look ahead", "Time to look ahead in seconds.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
@@ -317,22 +320,22 @@ static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Follow this object instead of a boid.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset_deps");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Distance", "Distance behind leader to follow.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "queue_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Queue Size", "How many boids in a line.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "line", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_LEADER_IN_LINE);
RNA_def_property_ui_text(prop, "Line", "Follow leader in a line.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
static void rna_def_boidrule_average_speed(BlenderRNA *brna)
@@ -346,17 +349,17 @@ static void rna_def_boidrule_average_speed(BlenderRNA *brna)
prop= RNA_def_property(srna, "wander", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Wander", "How fast velocity's direction is randomized.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "level", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Level", "How much velocity's z-component is kept constant.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Speed", "Percentage of maximum speed.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
static void rna_def_boidrule_fight(BlenderRNA *brna)
@@ -370,12 +373,12 @@ static void rna_def_boidrule_fight(BlenderRNA *brna)
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fight Distance", "Attack boids at max this distance.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "flee_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Flee Distance", "Flee to this distance.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
static void rna_def_boidrule(BlenderRNA *brna)
@@ -405,12 +408,12 @@ static void rna_def_boidrule(BlenderRNA *brna)
prop= RNA_def_property(srna, "in_air", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_IN_AIR);
RNA_def_property_ui_text(prop, "In Air", "Use rule when boid is flying.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "on_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_ON_LAND);
RNA_def_property_ui_text(prop, "On Land", "Use rule when boid is on land.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
//prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
//RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
@@ -457,17 +460,17 @@ static void rna_def_boidstate(BlenderRNA *brna)
prop= RNA_def_property(srna, "rule_fuzziness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Rule Fuzzines", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Volume", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Falloff", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
static void rna_def_boid_settings(BlenderRNA *brna)
{
@@ -480,17 +483,17 @@ static void rna_def_boid_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "landing_smoothness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Landing Smoothness", "How smoothly the boids land.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "banking", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Banking", "Amount of rotation around velocity vector on turns.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Height", "Boid height relative to particle size.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
/* states */
prop= RNA_def_property(srna, "states", PROP_COLLECTION, PROP_NONE);
@@ -510,99 +513,99 @@ static void rna_def_boid_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "health", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Health", "Initial boid health when born.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Strength", "Maximum caused damage on attack per second.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "aggression", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Aggression", "Boid will fight this times stronger enemy.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Accuracy", "Accuracy of attack.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Range", "The maximum distance from which a boid can attack.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
/* physical properties */
prop= RNA_def_property(srna, "air_min_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Min Air Speed", "Minimum speed in air (relative to maximum speed).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Air Speed", "Maximum speed in air.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_acc", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Acceleration", "Maximum acceleration in air (relative to maximum speed).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_max_ave", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Angular Velocity", "Maximum angular velocity in air (relative to 180 degrees).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "air_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Air Personal Space", "Radius of boids personal space in air (% of particle size).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_jump_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Jump Speed", "Maximum speed for jumping.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Land Speed", "Maximum speed on land.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_acc", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Acceleration", "Maximum acceleration on land (relative to maximum speed).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_max_ave", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Angular Velocity", "Maximum angular velocity on land (relative to 180 degrees).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Land Personal Space", "Radius of boids personal space on land (% of particle size).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "land_stick_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Land Stick Force", "How strong a force must be to start effecting a boid on land.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
/* options */
prop= RNA_def_property(srna, "allow_flight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_FLIGHT);
RNA_def_property_ui_text(prop, "Allow Flight", "Allow boids to move in air.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "allow_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_LAND);
RNA_def_property_ui_text(prop, "Allow Land", "Allow boids to move on land.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop= RNA_def_property(srna, "allow_climb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_CLIMB);
RNA_def_property_ui_text(prop, "Allow Climbing", "Allow boids to climb goal objects.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Boids_reset");
+ RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
void RNA_def_boid(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 9096bfc2844..38086502d6f 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -37,6 +37,7 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "WM_api.h"
#include "WM_types.h"
#ifdef RNA_RUNTIME
@@ -46,10 +47,10 @@
static void rna_cloth_update(bContext *C, PointerRNA *ptr)
{
- Scene *scene = CTX_data_scene(C);
- Object *ob = ptr->id.data;
+ Object *ob= (Object*)ptr->id.data;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
}
static void rna_ClothSettings_max_bend_set(struct PointerRNA *ptr, float value)
@@ -180,50 +181,50 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
/* mass */
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Mass", "Mass of cloth material.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "mass_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_mass_vgroup_get", "rna_ClothSettings_mass_vgroup_length", "rna_ClothSettings_mass_vgroup_set");
RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -100.0, 100.0);
RNA_def_property_float_funcs(prop, "rna_ClothSettings_gravity_get", "rna_ClothSettings_gravity_set", NULL);
RNA_def_property_ui_text(prop, "Gravity", "Gravity or external force vector.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
/* various */
@@ -231,73 +232,73 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "Cvi");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Air Damping", "Air has normally some thickness which slows falling things down.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "pin_cloth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_GOAL);
RNA_def_property_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "pin_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 50.0);
RNA_def_property_ui_text(prop, "Pin Stiffness", "Pin (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "stepsPerFrame");
RNA_def_property_range(prop, 4, 80);
RNA_def_property_ui_text(prop, "Quality", "Quality of the simulation in steps per frame. (higher is better quality but slower)");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
/* springs */
prop= RNA_def_property(srna, "stiffness_scaling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_SCALING);
RNA_def_property_ui_text(prop, "Stiffness Scaling", "If enabled, stiffness can be scaled along a weight painted vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "Cdis");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Spring Damping", "Damping of cloth velocity. (higher = more smooth, less jiggling)");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "structural");
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Structural Stiffness", "Overall stiffness of structure.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_struct");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_struct_set", NULL);
RNA_def_property_ui_text(prop, "Structural Stiffness Maximum", "Maximum structural stiffness value.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_struct_vgroup_get", "rna_ClothSettings_struct_vgroup_length", "rna_ClothSettings_struct_vgroup_set");
RNA_def_property_ui_text(prop, "Structural Stiffness Vertex Group", "Vertex group for fine control over structural stiffness.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bending");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Bending Stiffness", "Wrinkle coefficient. (higher = less smaller but more big wrinkles)");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_bend");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_bend_set", NULL);
RNA_def_property_ui_text(prop, "Bending Stiffness Maximum", "Maximum bending stiffness value.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_bend_vgroup_get", "rna_ClothSettings_bend_vgroup_length", "rna_ClothSettings_bend_vgroup_set");
RNA_def_property_ui_text(prop, "Bending Stiffness Vertex Group", "Vertex group for fine control over bending stiffness.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
/* unused */
@@ -358,48 +359,48 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "enable_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_ENABLED);
RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions with other objects.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "epsilon");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened. (higher = less movement)");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "loop_count");
RNA_def_property_range(prop, 1, 20);
RNA_def_property_ui_text(prop, "Collision Quality", "How many collision iterations should be done. (higher is better quality but slower)");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
/* self collision */
prop= RNA_def_property(srna, "enable_self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_SELF);
RNA_def_property_ui_text(prop, "Enable Self Collision", "Enable self collisions.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "self_min_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "selfepsilon");
RNA_def_property_range(prop, 0.5f, 1.0f);
RNA_def_property_ui_text(prop, "Self Minimum Distance", "0.5 means no distance at all, 1.0 is maximum distance.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "self_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Self Friction", "Friction/damping with self contact.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "self_collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "self_loop_count");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Self Collision Quality", "How many self collision iterations should be done. (higher is better quality but slower)");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
}
void RNA_def_cloth(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index a8dc0454cef..c09a71f752a 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -160,15 +160,14 @@ static char *rna_Constraint_path(PointerRNA *ptr)
static void rna_Constraint_update(bContext *C, PointerRNA *ptr)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= ptr->id.data;
if(ob->pose) update_pose_constraint_flags(ob->pose);
object_test_constraints(ob);
- if(ob->type==OB_ARMATURE) DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB);
- else DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
}
static void rna_Constraint_dependency_update(bContext *C, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 503ca031fb6..d19a2289490 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -156,21 +156,10 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA
static void rna_Curve_update_data(bContext *C, PointerRNA *ptr)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Curve *cu= ptr->id.data;
- Object *ob;
-
- if (cu == NULL)
- return;
-
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob->data == cu) {
- /* XXX this will loop over all objects again (slow) */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- }
- }
+ ID *id= ptr->id.data;
+
+ DAG_id_flush_update(id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
#else
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 1f51b3ff34c..69e6698bd3b 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -2559,13 +2559,14 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
}
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- if(eprop->item) MEM_freeN((void*)eprop->item);
for(a=0; a<eprop->totitem; a++) {
if(eprop->item[a].identifier) MEM_freeN((void*)eprop->item[a].identifier);
if(eprop->item[a].name) MEM_freeN((void*)eprop->item[a].name);
if(eprop->item[a].description) MEM_freeN((void*)eprop->item[a].description);
}
+
+ if(eprop->item) MEM_freeN((void*)eprop->item);
break;
}
case PROP_STRING: {
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index dda21f63528..a62002365c9 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -72,10 +72,17 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
}
}
+static void rna_fluid_update(bContext *C, PointerRNA *ptr)
+{
+ Object *ob= ptr->id.data;
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+}
+
static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
FluidsimModifierData *fluidmd;
ParticleSystemModifierData *psmd;
@@ -124,8 +131,7 @@ static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
}
}
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ rna_fluid_update(C, ptr);
}
static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *value)
@@ -216,7 +222,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "guiDisplayMode");
RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Viewport Display Mode", "How to display the mesh in the viewport.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_fluid_update");
prop= RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "renderDisplayMode");
@@ -231,7 +237,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store baked fluid simulation files in.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_fluid_update");
prop= RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -431,7 +437,7 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
RNA_def_property_string_maxlength(prop, 240);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_fluid_update");
}
static void rna_def_fluidsim_control(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 0a9ef9f90d1..13cc2ae9017 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -195,6 +195,7 @@ void rna_object_vcollayer_name_set(struct PointerRNA *ptr, const char *value, ch
void rna_Object_update(struct bContext *C, struct PointerRNA *ptr);
void rna_Object_update_data(struct bContext *C, struct PointerRNA *ptr);
+void rna_Mesh_update_draw(struct bContext *C, struct PointerRNA *ptr);
/* API functions */
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 88047cda12b..fbe339fe7f3 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -260,14 +260,13 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
static void rna_Key_update_data(bContext *C, PointerRNA *ptr)
{
Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
Key *key= ptr->id.data;
Object *ob;
for(ob=bmain->object.first; ob; ob= ob->id.next) {
if(ob_get_key(ob) == key) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
}
}
}
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index b53a0589ba6..1f7eee4d2d8 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -89,18 +89,10 @@ static void rna_Lattice_points_begin(CollectionPropertyIterator *iter, PointerRN
static void rna_Lattice_update_data(bContext *C, PointerRNA *ptr)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Lattice *lt= ptr->id.data;
- Object *ob;
+ ID *id= ptr->id.data;
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob->data == lt) {
- /* XXX this will loop over all objects again (slow) */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- }
- }
+ DAG_id_flush_update(id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
static void rna_Lattice_update_size(bContext *C, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index edecfc8cdb0..f7235db49a5 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -52,18 +52,24 @@
static void rna_Mesh_update_data(bContext *C, PointerRNA *ptr)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
ID *id= ptr->id.data;
- Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob->data == id) {
- /* XXX this will loop over all objects again (slow) */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- }
- }
+ DAG_id_flush_update(id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
+}
+
+static void rna_Mesh_update_select(bContext *C, PointerRNA *ptr)
+{
+ ID *id= ptr->id.data;
+
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, id);
+}
+
+void rna_Mesh_update_draw(bContext *C, PointerRNA *ptr)
+{
+ ID *id= ptr->id.data;
+
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value)
@@ -867,10 +873,12 @@ static void rna_def_mvert_group(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "def_nr");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Group Index", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Weight", "Vertex Weight");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mvert(BlenderRNA *brna)
@@ -886,6 +894,7 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_ui_text(prop, "Location", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "no");
@@ -896,14 +905,17 @@ static void rna_def_mvert(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Selected", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MeshVertex_bevel_weight_get", "rna_MeshVertex_bevel_weight_set", NULL);
RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier 'Only Vertices' option");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0, 0);
@@ -931,26 +943,32 @@ static void rna_def_medge(BlenderRNA *brna)
prop= RNA_def_property(srna, "crease", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MEdge_crease_get", "rna_MEdge_crease_set", NULL);
RNA_def_property_ui_text(prop, "Crease", "Weight used by the Subsurf modifier for creasing");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MEdge_bevel_weight_get", "rna_MEdge_bevel_weight_set", NULL);
RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Selected", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "seam", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SEAM);
RNA_def_property_ui_text(prop, "Seam", "Seam edge for UV unwrapping");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SHARP);
RNA_def_property_ui_text(prop, "Sharp", "Sharp edge for the EdgeSplit modifier");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mface(BlenderRNA *brna)
@@ -984,18 +1002,22 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshFace_material_index_range");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FACE_SEL);
RNA_def_property_ui_text(prop, "Selected", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE);
RNA_def_property_ui_text(prop, "Hidden", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_array(prop, 3);
@@ -1021,20 +1043,24 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Mesh Texture Face Layer", "Layer of texture faces in a Mesh datablock.");
RNA_def_struct_sdna(srna, "CustomDataLayer");
RNA_def_struct_path_func(srna, "rna_MeshTextureFaceLayer_path");
+ RNA_def_struct_ui_icon(srna, ICON_GROUP_UVS);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshTextureFaceLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_get", "rna_MeshTextureFaceLayer_active_set");
RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshTextureFaceLayer_active_render_get", "rna_MeshTextureFaceLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshTextureFace");
@@ -1052,88 +1078,109 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_TextureFace_image_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "tex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TEX);
RNA_def_property_ui_text(prop, "Tex", "Render face with texture");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_LIGHT);
RNA_def_property_ui_text(prop, "Light", "Use light for face");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "invisible", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_INVISIBLE);
RNA_def_property_ui_text(prop, "Invisible", "Make face invisible");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_DYNAMIC);
RNA_def_property_ui_text(prop, "Collision", "Use face for collision and ray-sensor detection");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "shared", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHAREDCOL);
RNA_def_property_ui_text(prop, "Shared", "Blend vertex colors across face when vertices are shared");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "twoside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TWOSIDE);
RNA_def_property_ui_text(prop, "Twoside", "Render face twosided");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_OBCOL);
RNA_def_property_ui_text(prop, "Object Color", "Use ObColor instead of vertex colors");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD);
RNA_def_property_ui_text(prop, "Halo", "Screen aligned billboard");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "billboard", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD2);
RNA_def_property_ui_text(prop, "Billboard", "Billboard with Z-axis constraint");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHADOW);
RNA_def_property_ui_text(prop, "Shadow", "Face is used for shadow");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BMFONT);
RNA_def_property_ui_text(prop, "Text", "Enable bitmap text on face");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "alpha_sort", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_ALPHASORT);
RNA_def_property_ui_text(prop, "Alpha Sort", "Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible)");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "transp", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, transp_items);
RNA_def_property_ui_text(prop, "Transparency", "Transparency blending mode");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TF_SEL1);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "UV Selected", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "uv_pinned", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "unwrap", TF_PIN1);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "UV Pinned", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_select");
prop= RNA_def_property(srna, "uv1", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv1_get", "rna_MeshTextureFace_uv1_set", NULL);
RNA_def_property_ui_text(prop, "UV 1", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv2", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv2_get", "rna_MeshTextureFace_uv2_set", NULL);
RNA_def_property_ui_text(prop, "UV 2", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv3", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv3_get", "rna_MeshTextureFace_uv3_set", NULL);
RNA_def_property_ui_text(prop, "UV 3", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv4", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv4_get", "rna_MeshTextureFace_uv4_set", NULL);
RNA_def_property_ui_text(prop, "UV 4", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "uv", PROP_FLOAT, PROP_XYZ);
RNA_def_property_multidimensional_array(prop, 4 * 2, 2, uv_dim);
@@ -1141,6 +1188,7 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_dynamic_array_funcs(prop, "rna_MeshTextureFace_uv_get_length", "rna_MeshTextureFace_uv_set_length");
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv_get", "rna_MeshTextureFace_uv_set", NULL);
RNA_def_property_ui_text(prop, "UV", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_msticky(BlenderRNA *brna)
@@ -1155,6 +1203,7 @@ static void rna_def_msticky(BlenderRNA *brna)
prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location.");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mcol(BlenderRNA *brna)
@@ -1166,20 +1215,24 @@ static void rna_def_mcol(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Mesh Vertex Color Layer", "Layer of vertex colors in a Mesh datablock.");
RNA_def_struct_sdna(srna, "CustomDataLayer");
RNA_def_struct_path_func(srna, "rna_MeshColorLayer_path");
+ RNA_def_struct_ui_icon(srna, ICON_GROUP_VCOL);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshColorLayer_name_set");
RNA_def_property_ui_text(prop, "Name", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_get", "rna_MeshColorLayer_active_set");
RNA_def_property_ui_text(prop, "Active", "Sets the layer as active for display and editing");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_render_get", "rna_MeshColorLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshColor");
@@ -1196,24 +1249,28 @@ static void rna_def_mcol(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color1_get", "rna_MeshColor_color1_set", NULL);
RNA_def_property_ui_text(prop, "Color 1", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color2", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color2_get", "rna_MeshColor_color2_set", NULL);
RNA_def_property_ui_text(prop, "Color 2", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color3", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color3_get", "rna_MeshColor_color3_set", NULL);
RNA_def_property_ui_text(prop, "Color 3", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "color4", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshColor_color4_get", "rna_MeshColor_color4_set", NULL);
RNA_def_property_ui_text(prop, "Color 4", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
static void rna_def_mproperties(BlenderRNA *brna)
@@ -1230,6 +1287,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshFloatProperty");
@@ -1244,6 +1302,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f");
RNA_def_property_ui_text(prop, "Value", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
/* Int */
srna= RNA_def_struct(brna, "MeshIntPropertyLayer", NULL);
@@ -1254,6 +1313,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshIntProperty");
@@ -1268,6 +1328,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "i");
RNA_def_property_ui_text(prop, "Value", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
/* String */
srna= RNA_def_struct(brna, "MeshStringPropertyLayer", NULL);
@@ -1278,6 +1339,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshStringProperty");
@@ -1292,6 +1354,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "s");
RNA_def_property_ui_text(prop, "Value", "");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
@@ -1307,17 +1370,20 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location.");
RNA_def_property_editable_func(prop, texspace_editable);
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size.");
RNA_def_property_editable_func(prop, texspace_editable);
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
/* not supported yet
prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER);
RNA_def_property_float(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation");
- RNA_def_property_editable_func(prop, texspace_editable);*/
+ RNA_def_property_editable_func(prop, texspace_editable);
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");*/
/* materials */
prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
@@ -1445,58 +1511,58 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "draw_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEDGES);
RNA_def_property_ui_text(prop, "Draw Edges", "Displays selected edges using hilights in the 3d view and UV editor");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3d view and UV editor");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWNORMALS);
RNA_def_property_ui_text(prop, "Draw Normals", "Displays face normals as lines");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_vertex_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_VNORMALS);
RNA_def_property_ui_text(prop, "Draw Vertex Normals", "Displays vertex normals as lines");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_creases", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWCREASES);
RNA_def_property_ui_text(prop, "Draw Creases", "Displays creases created for subsurf weighting");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_bevel_weights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWBWEIGHTS);
RNA_def_property_ui_text(prop, "Draw Bevel Weights", "Displays weights created for the Bevel modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_seams", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSEAMS);
RNA_def_property_ui_text(prop, "Draw Seams", "Displays UV unwrapping seams");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSHARP);
RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_edge_lenght", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGELEN);
RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGEANG);
RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
prop= RNA_def_property(srna, "draw_face_area", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FACEAREA);
RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces");
- RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index c98b3fb7b09..686d91e4fe2 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -102,20 +102,13 @@ static void rna_Mesh_calc_edges(Mesh *mesh)
static void rna_Mesh_update(Mesh *mesh, bContext *C)
{
- Main *bmain= CTX_data_main(C);
- Object *ob;
-
if(mesh->totface && mesh->totedge == 0)
rna_Mesh_calc_edges(mesh);
mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mface, mesh->totface, NULL);
- for(ob=bmain->object.first; ob; ob=ob->id.next) {
- if(ob->data == mesh) {
- ob->recalc |= OB_RECALC_DATA;
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- }
- }
+ DAG_id_flush_update(&mesh->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh);
}
static void rna_Mesh_add_verts(Mesh *mesh, int len)
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 7b14a7a4712..f3160a7bb18 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -57,14 +57,12 @@ static void rna_MetaBall_update_data(bContext *C, PointerRNA *ptr)
MetaBall *mb= ptr->id.data;
Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob->data == mb) {
+ for(ob=bmain->object.first; ob; ob= ob->id.next)
+ if(ob->data == mb)
copy_mball_properties(scene, ob);
- /* XXX this will loop over all objects again (slow) */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- }
- }
+
+ DAG_id_flush_update(&mb->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, mb);
}
#else
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index bb073d19a46..f8c8ddb9431 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -40,6 +40,7 @@
#include "BKE_bmesh.h" /* For BevelModifierData */
#include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */
+#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem modifier_type_items[] ={
@@ -170,7 +171,8 @@ static char *rna_Modifier_path(PointerRNA *ptr)
static void rna_Modifier_update(bContext *C, PointerRNA *ptr)
{
- DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ptr->id.data);
}
static void rna_Modifier_dependency_update(bContext *C, PointerRNA *ptr)
@@ -441,7 +443,7 @@ static void rna_def_property_subdivision_common(StructRNA *srna, const char type
RNA_def_property_enum_sdna(prop, NULL, type);
RNA_def_property_enum_items(prop, prop_subdivision_type_items);
RNA_def_property_ui_text(prop, "Subdivision Type", "Selects type of subdivision algorithm.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_subsurf(BlenderRNA *brna)
@@ -461,7 +463,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 6);
RNA_def_property_ui_range(prop, 1, 6, 1, 0);
RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "renderLevels");
@@ -472,12 +474,12 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
prop= RNA_def_property(srna, "optimal_draw", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_ControlEdges);
RNA_def_property_ui_text(prop, "Optimal Draw", "Skip drawing/rendering of interior subdivided edges");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "subsurf_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_SubsurfUv);
RNA_def_property_ui_text(prop, "Subsurf UV", "Use subsurf to subdivide UVs.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_multires(BlenderRNA *brna)
@@ -496,7 +498,7 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "lvl");
RNA_def_property_ui_text(prop, "Level", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_lattice(BlenderRNA *brna)
@@ -513,13 +515,13 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_LatticeModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_curve(BlenderRNA *brna)
@@ -545,19 +547,19 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Curve object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CurveModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CurveModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "defaxis");
RNA_def_property_enum_items(prop, prop_deform_axis_items);
RNA_def_property_ui_text(prop, "Deform Axis", "The axis that the curve deforms along.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_build(BlenderRNA *brna)
@@ -573,21 +575,21 @@ static void rna_def_modifier_build(BlenderRNA *brna)
prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start", "Specify the start frame of the effect.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Length", "Specify the total time the build effect requires");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "randomize", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Randomize", "Randomize the faces or edges during build.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Seed", "Specify the seed for random if used.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_mirror(BlenderRNA *brna)
@@ -603,50 +605,50 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_X);
RNA_def_property_ui_text(prop, "X", "Enable X axis mirror.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Y);
RNA_def_property_ui_text(prop, "Y", "Enable Y axis mirror.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Z);
RNA_def_property_ui_text(prop, "Z", "Enable Z axis mirror.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_CLIPPING);
RNA_def_property_ui_text(prop, "Clip", "Prevents vertices from going through the mirror during transform.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_VGROUP);
RNA_def_property_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L).");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_U);
RNA_def_property_ui_text(prop, "Mirror U", "Mirror the U texture coordinate around the 0.5 point.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_V);
RNA_def_property_ui_text(prop, "Mirror V", "Mirror the V texture coordinate around the 0.5 point.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_limit", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tolerance");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Merge Limit", "Distance from axis within which mirrored vertices are merged.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob");
RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_decimate(BlenderRNA *brna)
@@ -663,7 +665,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "percent");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Ratio", "Defines the ratio of triangles to reduce to.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "faceCount");
@@ -691,135 +693,135 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_X);
RNA_def_property_ui_text(prop, "X", "X axis motion.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_Y);
RNA_def_property_ui_text(prop, "Y", "Y axis motion.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_CYCL);
RNA_def_property_ui_text(prop, "Cyclic", "Cyclic wave effect.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM);
RNA_def_property_ui_text(prop, "Normals", "Dispace along normals.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "x_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_X);
RNA_def_property_ui_text(prop, "X Normal", "Enable displacement along the X normal");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "y_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Y);
RNA_def_property_ui_text(prop, "Y Normal", "Enable displacement along the Y normal");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "z_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Z);
RNA_def_property_ui_text(prop, "Z Normal", "Enable displacement along the Z normal");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timeoffs");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Time Offset", "Either the starting frame (for positive speed) or ending frame (for negative speed.)");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "damp");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Damping Time", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "falloff");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff Radius", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "startx");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position X", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starty");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position Y", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "start_position_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "objectcenter");
RNA_def_property_ui_text(prop, "Start Position Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the wave.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "Texture for modulating the wave.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texmapping");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used for modulating input.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_uvlayer_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "map_object");
RNA_def_property_ui_text(prop, "Texture Coordinates Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -1, 1, 10, 2);
RNA_def_property_ui_text(prop, "Speed", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -2, 2, 10, 2);
RNA_def_property_ui_text(prop, "Height", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 5, 10, 2);
RNA_def_property_ui_text(prop, "Width", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "narrowness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "narrow");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10, 10, 2);
RNA_def_property_ui_text(prop, "Narrowness", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_armature(BlenderRNA *brna)
@@ -836,43 +838,43 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Armature object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArmatureModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ArmatureModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
RNA_def_property_ui_text(prop, "Use Vertex Groups", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
RNA_def_property_ui_text(prop, "Use Bone Envelopes", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "quaternion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
RNA_def_property_ui_text(prop, "Quaternion", "Deform rotation interpolation with quaternions.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "b_bone_rest", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_B_BONE_REST);
RNA_def_property_ui_text(prop, "B-Bone Rest", "Make B-Bones deform already in rest position");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "multi_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
RNA_def_property_ui_text(prop, "Multi Modifier", "Use same input as previous modifier, and mix results using overall vgroup");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_hook(BlenderRNA *brna)
@@ -889,28 +891,28 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Force", "Relative force of the hook.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "Name of Parent Bone for hook (if applicable), also recalculates and clears offset");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_HookModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_softbody(BlenderRNA *brna)
@@ -954,12 +956,12 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Mesh object to use for boolean operation.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_BooleanModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_operation_items);
RNA_def_property_ui_text(prop, "Operation", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_array(BlenderRNA *brna)
@@ -982,90 +984,90 @@ static void rna_def_modifier_array(BlenderRNA *brna)
prop= RNA_def_property(srna, "fit_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fit_type_items);
RNA_def_property_ui_text(prop, "Fit Type", "Array length calculation method.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Count", "Number of duplicates to make.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Length", "Length to fit array within.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curve_ob");
RNA_def_property_ui_text(prop, "Curve", "Curve object to fit array length to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_curve_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
/* Offset parameters */
prop= RNA_def_property(srna, "constant_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
RNA_def_property_ui_text(prop, "Constant Offset", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "constant_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_ui_text(prop, "Constant Offset Displacement", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "relative_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_RELATIVE);
RNA_def_property_ui_text(prop, "Relative Offset", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "relative_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_ui_text(prop, "Relative Offset Displacement", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
/* Vertex merging parameters */
prop= RNA_def_property(srna, "merge_adjacent_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGE);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in adjacent duplicates.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_end_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGEFINAL);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in first and last duplicates.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "merge_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "merge_dist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 1, 4);
RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
/* Offset object */
prop= RNA_def_property(srna, "add_offset_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_OBJ);
RNA_def_property_ui_text(prop, "Add Offset Object", "Add an object transformation to the total offset.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "offset_ob");
RNA_def_property_ui_text(prop, "Offset Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
/* Caps */
prop= RNA_def_property(srna, "start_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Start Cap", "Mesh object to use as a start cap.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_start_cap_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "end_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "End Cap", "Mesh object to use as an end cap.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_end_cap_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_edgesplit(BlenderRNA *brna)
@@ -1082,17 +1084,17 @@ static void rna_def_modifier_edgesplit(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMANGLE);
RNA_def_property_ui_text(prop, "Use Edge Angle", "Split edges with high angle between faces.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMFLAG);
RNA_def_property_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_displace(BlenderRNA *brna)
@@ -1124,47 +1126,47 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "midlevel", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Midlevel", "Material value that gives no displacement.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
RNA_def_property_ui_text(prop, "Strength", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_direction_items);
RNA_def_property_ui_text(prop, "Direction", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinates", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texmapping");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_uvlayer_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture_coordinate_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "map_object");
RNA_def_property_ui_text(prop, "Texture Coordinate Object", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
}
static void rna_def_modifier_uvproject(BlenderRNA *brna)
@@ -1181,13 +1183,13 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Layer", "UV layer name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVProjectModifier_uvlayer_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "num_projectors", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use.");
RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAX);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "UVProjector");
@@ -1197,26 +1199,26 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "horizontal_aspect_ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspectx");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 100, 2);
RNA_def_property_ui_text(prop, "Horizontal Aspect Ratio", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertical_aspect_ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspecty");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 100, 2);
RNA_def_property_ui_text(prop, "Vertical Aspect Ratio", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "override_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_UVPROJECT_OVERRIDEIMAGE);
RNA_def_property_ui_text(prop, "Override Image", "Override faces' current images with the given image.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
srna= RNA_def_struct(brna, "UVProjector", NULL);
RNA_def_struct_ui_text(srna, "UVProjector", "UV projector used by the UV project modifier.");
@@ -1241,35 +1243,35 @@ static void rna_def_modifier_smooth(BlenderRNA *brna)
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_X);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Y);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Z);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "repeat", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 30, 1, 0);
RNA_def_property_ui_text(prop, "Repeat", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SmoothModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_cast(BlenderRNA *brna)
@@ -1292,63 +1294,63 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_cast_type_items);
RNA_def_property_ui_text(prop, "Cast Type", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Control object: if available, its location determines the center of the effect");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CastModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Y);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Z);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "from_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_SIZE_FROM_RADIUS);
RNA_def_property_ui_text(prop, "From Radius", "Use radius as size of projection shape (0 = auto)");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_USE_OB_TRANSFORM);
RNA_def_property_ui_text(prop, "Use transform", "Use object transform to control projection shape");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 10, 2);
RNA_def_property_ui_text(prop, "Radius", "Only deform vertices within this distance from the center of the effect (leave as 0 for infinite.)");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 10, 2);
RNA_def_property_ui_text(prop, "Size", "Size of projection shape (leave as 0 for auto.)");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CastModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_meshdeform(BlenderRNA *brna)
@@ -1365,29 +1367,29 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshDeformModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "precision", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsize");
RNA_def_property_range(prop, 2, 10);
RNA_def_property_ui_text(prop, "Precision", "The grid size for binding.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "dynamic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_DYNAMIC_BIND);
RNA_def_property_ui_text(prop, "Dynamic", "Recompute binding dynamically on top of other deformers (slower and more memory consuming.)");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
@@ -1422,71 +1424,71 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_ui_text(prop, "Object", "Object that has the particle system.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "particle_system_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Particle System Number", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axis");
RNA_def_property_enum_items(prop, particleinstance_axis);
RNA_def_property_ui_text(prop, "Axis", "Pole axis for rotation");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Parents);
RNA_def_property_ui_text(prop, "Normal", "Create instances from normal particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Children);
RNA_def_property_ui_text(prop, "Children", "Create instances from child particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Path);
RNA_def_property_ui_text(prop, "Path", "Create instances along particle paths.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show instances when particles are unborn.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show instances when particles are alive.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show instances when particles are dead.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "keep_shape", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_KeepShape);
RNA_def_property_ui_text(prop, "Keep Shape", "Don't stretch the object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_UseSize);
RNA_def_property_ui_text(prop, "Size", "Use particle size to scale the instances.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Position", "Position along path.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "random_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "random_position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Random Position", "Randomize position along path.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_explode(BlenderRNA *brna)
@@ -1506,27 +1508,27 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
prop= RNA_def_property(srna, "protect", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Protect", "Clean vertex group edges");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "split_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_EdgeSplit);
RNA_def_property_ui_text(prop, "Split Edges", "Split face edges for nicer shrapnel.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show mesh when particles are unborn.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show mesh when particles are alive.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show mesh when particles are dead.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_cloth(BlenderRNA *brna)
@@ -1583,7 +1585,7 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
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", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_set_type");
+ RNA_def_property_update(prop, 0, "rna_Smoke_set_type");
}
static void rna_def_modifier_collision(BlenderRNA *brna)
@@ -1605,7 +1607,7 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "absorption");
RNA_def_property_ui_range(prop, 0, 100, 1, 2);
RNA_def_property_ui_text(prop, "Absorption %", "How much of effector force gets lost during collision with this object (in percent).");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_bevel(BlenderRNA *brna)
@@ -1634,31 +1636,31 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "value");
RNA_def_property_range(prop, 0, 0.5);
RNA_def_property_ui_text(prop, "Width", "Bevel value/amount.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "only_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_VERT);
RNA_def_property_ui_text(prop, "Only Vertices", "Bevel verts/corners, not edges.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "lim_flags");
RNA_def_property_enum_items(prop, prop_limit_method_items);
RNA_def_property_ui_text(prop, "Limit Method", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "edge_weight_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "e_flags");
RNA_def_property_enum_items(prop, prop_edge_weight_method_items);
RNA_def_property_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
RNA_def_property_ui_text(prop, "Angle", "Angle above which to bevel edges.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
@@ -1681,80 +1683,80 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Target", "Mesh target to shrink to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_target_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "auxiliary_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "auxTarget");
RNA_def_property_ui_text(prop, "Auxiliary Target", "Additional mesh target to shrink to.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_auxiliary_target_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShrinkwrapModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "keepDist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 1, 2);
RNA_def_property_ui_text(prop, "Offset", "Distance to keep from the target.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS);
RNA_def_property_ui_text(prop, "X", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS);
RNA_def_property_ui_text(prop, "Y", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS);
RNA_def_property_ui_text(prop, "Z", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "subsurf_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "subsurfLevels");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
RNA_def_property_ui_text(prop, "Subsurf Levels", "Number of subdivisions that must be performed before extracting vertices' positions and normals.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR);
RNA_def_property_ui_text(prop, "Negative", "Allow vertices to move in the negative direction of axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "positive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR);
RNA_def_property_ui_text(prop, "Positive", "Allow vertices to move in the positive direction of axis.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "cull_front_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE);
RNA_def_property_ui_text(prop, "Cull Front Faces", "Stop vertices from projecting to a front face on the target.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "cull_back_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_CULL_TARGET_BACKFACE);
RNA_def_property_ui_text(prop, "Cull Back Faces", "Stop vertices from projecting to a back face on the target.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "keep_above_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE);
RNA_def_property_ui_text(prop, "Keep Above Surface", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_fluidsim(BlenderRNA *brna)
@@ -1790,25 +1792,25 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_arm");
RNA_def_property_ui_text(prop, "Armature", "Armature to use as source of bones to mask.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MaskModifier_armature_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MaskModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "inverse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MASK_INV);
RNA_def_property_ui_text(prop, "Inverse", "Use vertices that are not part of region defined.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_simpledeform(BlenderRNA *brna)
@@ -1831,29 +1833,29 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name.");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SimpleDeformModifier_vgroup_set");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Origin", "Origin of modifier space coordinates.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "originOpts", MOD_SIMPLEDEFORM_ORIGIN_LOCAL);
RNA_def_property_ui_text(prop, "Relative", "Sets the origin of deform space to be relative to the object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "limit");
@@ -1861,17 +1863,17 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 5, 2);
RNA_def_property_ui_text(prop, "Limits", "Lower/Upper limits for deform.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "lock_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_X);
RNA_def_property_ui_text(prop, "Lock X Axis", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "lock_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_Y);
RNA_def_property_ui_text(prop, "Lock Y Axis", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_surface(BlenderRNA *brna)
@@ -1911,7 +1913,7 @@ void RNA_def_modifier(BlenderRNA *brna)
prop= RNA_def_property(srna, "realtime", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Realtime);
RNA_def_property_ui_text(prop, "Realtime", "Realtime display of a modifier.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
prop= RNA_def_property(srna, "render", PROP_BOOLEAN, PROP_NONE);
@@ -1922,13 +1924,13 @@ void RNA_def_modifier(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Editmode);
RNA_def_property_ui_text(prop, "Editmode", "Use modifier while in the edit mode.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
prop= RNA_def_property(srna, "on_cage", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_OnCage);
RNA_def_property_ui_text(prop, "On Cage", "Enable direct editing of modifier control cage.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index bbb10991564..50ccbc86719 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -39,9 +39,9 @@
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
+#include "WM_api.h"
#include "WM_types.h"
-
EnumPropertyItem object_mode_items[] = {
{OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object", ""},
{OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit", ""},
@@ -84,17 +84,18 @@ static EnumPropertyItem parent_type_items[] = {
void rna_Object_update(bContext *C, PointerRNA *ptr)
{
- DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
}
void rna_Object_update_data(bContext *C, PointerRNA *ptr)
{
- DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ptr->id.data);
}
static void rna_Object_dependency_update(bContext *C, PointerRNA *ptr)
{
- DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_OB);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
DAG_scene_sort(CTX_data_scene(C));
}
@@ -1042,7 +1043,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_Object_data_editable");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Data", "Object data.");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_Object_update_data");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
@@ -1223,13 +1224,13 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "VertexGroup");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_vertex_group_get", "rna_Object_active_vertex_group_set", NULL);
RNA_def_property_ui_text(prop, "Active Vertex Group", "Vertex groups of the object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_Object_update_data");
prop= RNA_def_property(srna, "active_vertex_group_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actdef");
RNA_def_property_int_funcs(prop, "rna_Object_active_vertex_group_index_get", "rna_Object_active_vertex_group_index_set", "rna_Object_active_vertex_group_index_range");
RNA_def_property_ui_text(prop, "Active Vertex Group Index", "Active index in vertex group array.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_Object_update_data");
/* empty */
@@ -1490,7 +1491,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, NULL, "rna_Object_shape_key_lock_set");
RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object.");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_Object_update_data");
prop= RNA_def_property(srna, "active_shape_key", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ShapeKey");
@@ -1501,7 +1502,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "shapenr");
RNA_def_property_int_funcs(prop, "rna_Object_active_shape_key_index_get", "rna_Object_active_shape_key_index_set", "rna_Object_active_shape_key_index_range");
RNA_def_property_ui_text(prop, "Active Shape Key Index", "Current shape key index.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_Object_update_data");
RNA_api_object(srna);
}
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 932bef9969d..3dfbfcccacf 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -54,7 +54,6 @@
static void rna_Cache_change(bContext *C, PointerRNA *ptr)
{
- Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
PointCache *cache = (PointCache*)ptr->data;
PTCacheID *pid = NULL;
@@ -67,7 +66,7 @@ static void rna_Cache_change(bContext *C, PointerRNA *ptr)
BKE_ptcache_ids_from_object(&pidlist, ob);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache==cache)
@@ -105,7 +104,6 @@ static void rna_Cache_toggle_disk_cache(bContext *C, PointerRNA *ptr)
static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
{
- Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
PointCache *cache = (PointCache*)ptr->data;
PTCacheID *pid = NULL, *pid2= NULL;
@@ -133,7 +131,7 @@ static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
cache->flag &= ~(PTCACHE_OUTDATED|PTCACHE_FRAMES_SKIPPED);
BKE_ptcache_load_external(pid);
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
for(pid=pidlist.first; pid; pid=pid->next) {
@@ -362,7 +360,6 @@ static void rna_SoftBodySettings_goal_vgroup_set(PointerRNA *ptr, const char *va
static void rna_FieldSettings_update(bContext *C, PointerRNA *ptr)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
@@ -370,7 +367,7 @@ static void rna_FieldSettings_update(bContext *C, PointerRNA *ptr)
ob->pd->tex= 0;
}
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
@@ -413,9 +410,9 @@ static void rna_FieldSettings_dependency_update(bContext *C, PointerRNA *ptr)
DAG_scene_sort(scene);
if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
- DAG_object_flush_update(scene, ob, OB_RECALC);
+ DAG_id_flush_update(&ob->id, OB_RECALC);
else
- DAG_object_flush_update(scene, ob, OB_RECALC_OB);
+ DAG_id_flush_update(&ob->id, OB_RECALC_OB);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
@@ -437,13 +434,20 @@ static void rna_CollisionSettings_dependency_update(bContext *C, PointerRNA *ptr
static void rna_CollisionSettings_update(bContext *C, PointerRNA *ptr)
{
- Scene *scene= CTX_data_scene(C);
Object *ob= (Object*)ptr->id.data;
- DAG_object_flush_update(scene, ob, OB_RECALC);
+ DAG_id_flush_update(&ob->id, OB_RECALC);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
+static void rna_softbody_update(bContext *C, PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+}
+
#else
static void rna_def_pointcache(BlenderRNA *brna)
@@ -896,25 +900,25 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mediafrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Friction", "General media friction for point movements");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "nodemass");
RNA_def_property_range(prop, 0.0f, 50000.0f);
RNA_def_property_ui_text(prop, "Mass", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "grav");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Gravitation", "Apply gravitation to point movement");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "physics_speed");
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Speed", "Tweak timing for physics to control frequency and speed");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
/* Goal */
@@ -927,31 +931,31 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
/* Edge Spring Settings */
@@ -959,43 +963,43 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "inspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Pull", "Edge spring stiffness when longer than rest length");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "push", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "inpush");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Push", "Edge spring stiffness when shorter than rest length");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "damp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "infrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Damp", "Edge spring friction");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "spring_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "springpreload");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "SL", "Alter spring length to shrink/blow up (unit %) 0 to disable");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "aero", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aeroedge");
RNA_def_property_range(prop, 0.0f, 30000.0f);
RNA_def_property_ui_text(prop, "Aero", "Make edges 'sail'");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "plastic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "plastic");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Plastic", "Permanent deform");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "bending", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "secondspring");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Bending", "Bending Stiffness");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shearstiff");
@@ -1008,25 +1012,25 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sbc_mode");
RNA_def_property_enum_items(prop, collision_type_items);
RNA_def_property_ui_text(prop, "Collision Type", "Choose Collision Type");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "ball_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colball");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Absolute ball size or factor if not manual adjusted");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "ball_stiff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ballstiff");
RNA_def_property_range(prop, 0.001f, 100.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Ball inflating presure");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "ball_damp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "balldamp");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Blending to inelastic collision");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
/* Solver */
@@ -1034,36 +1038,36 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "rklimit");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Error Limit", "The Runge-Kutta ODE solver error limit, low value gives more precision, high values speed");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "minstep", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Min Step", "Minimal # solver steps/frame");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "maxstep", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Max Step", "Maximal # solver steps/frame");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "choke", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "choke");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Choke", "'Viscosity' inside collision target");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "fuzzy", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fuzzyness");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Fuzzy", "Fuzzyness while on collision, high values make collsion handling faster but less stable");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "auto_step", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_OLDERR);
RNA_def_property_ui_text(prop, "V", "Use velocities for automagic step sizes");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "diagnose", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_MONITOR);
@@ -1074,37 +1078,37 @@ static void rna_def_softbody(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_goal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_goal_get", "rna_SoftBodySettings_use_goal_set");
RNA_def_property_ui_text(prop, "Use Goal", "Define forces for vertices to stick to animated position.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "use_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_edges_get", "rna_SoftBodySettings_use_edges_set");
RNA_def_property_ui_text(prop, "Use Edges", "Use Edges as springs");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "stiff_quads", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_stiff_quads_get", "rna_SoftBodySettings_stiff_quads_set");
RNA_def_property_ui_text(prop, "Stiff Quads", "Adds diagonal springs on 4-gons.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "edge_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_edge_collision_get", "rna_SoftBodySettings_edge_collision_set");
RNA_def_property_ui_text(prop, "Edge Collision", "Edges collide too.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "face_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_face_collision_get", "rna_SoftBodySettings_face_collision_set");
RNA_def_property_ui_text(prop, "Face Collision", "Faces collide too, SLOOOOOW warning.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "new_aero", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_new_aero_get", "rna_SoftBodySettings_new_aero_set");
RNA_def_property_ui_text(prop, "N", "New aero(uses angle and length).");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
prop= RNA_def_property(srna, "self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_self_collision_get", "rna_SoftBodySettings_self_collision_set");
RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
+ RNA_def_property_update(prop, 0, "rna_softbody_update");
}
void RNA_def_object_force(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index a1f35eca3c2..2525209c3be 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -114,12 +114,14 @@ static void rna_Particle_redo(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_REDO;
if(ob)
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_REDO);
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
@@ -134,13 +136,15 @@ static void rna_Particle_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
if(ob) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET);
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_target_reset(bContext *C, PointerRNA *ptr)
@@ -172,22 +176,23 @@ static void rna_Particle_target_reset(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
DAG_scene_sort(scene);
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_target_redo(bContext *C, PointerRNA *ptr)
{
- Scene *scene = CTX_data_scene(C);
-
if(ptr->type==&RNA_ParticleTarget) {
Object *ob = (Object*)ptr->id.data;
ParticleSystem *psys = psys_get_current(ob);
psys->recalc = PSYS_RECALC_REDO;
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
}
@@ -203,13 +208,15 @@ static void rna_Particle_change_type(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET|PSYS_RECALC_TYPE;
if(ob) {
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_TYPE);
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
@@ -217,6 +224,7 @@ static void rna_Particle_change_physics(bContext *C, PointerRNA *ptr)
Scene *scene = CTX_data_scene(C);
ParticleSettings *part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
@@ -231,13 +239,15 @@ static void rna_Particle_redo_child(bContext *C, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_CHILD;
if(ob)
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
else {
part = ptr->id.data;
psys_flush_particle_settings(scene, part, PSYS_RECALC_CHILD);
}
+
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, NULL);
}
static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
{
@@ -892,19 +902,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "react_multiple", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_MULTIPLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Multi React", "React multiple times.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "loop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_LOOP);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Loop", "Loop particle lives.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* TODO: used somewhere? */
prop= RNA_def_property(srna, "hair_geometry", PROP_BOOLEAN, PROP_NONE);
@@ -914,94 +924,94 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_UNBORN);
RNA_def_property_ui_text(prop, "Unborn", "Show particles before they are emitted.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "died", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIED);
RNA_def_property_ui_text(prop, "Died", "Show particles after they have died");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "trand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_TRAND);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Random", "Emit in random order of elements");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "even_distribution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_EDISTR);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Even Distribution", "Use even distribution from faces based on face areas or edge lengths.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "sticky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_STICKY);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Sticky", "Particles stick to collided objects if they die in the collision.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "die_on_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIE_ON_COL);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Die on hit", "Particles die when they collide with a deflector object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "size_deflect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZE_DEFL);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Size Deflect", "Use particle's size in deflection.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "rotation_dynamic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ROT_DYN);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Dynamic", "Sets rotation to dynamic/constant");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "sizemass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZEMASS);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Mass from Size", "Multiply mass with particle size.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "boids_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BOIDS_2D);
RNA_def_property_ui_text(prop, "Boids 2D", "Constrain boids to a surface");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BRANCHING);
RNA_def_property_ui_text(prop, "Branching", "Branch child paths from each other.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "animate_branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ANIM_BRANCHING);
RNA_def_property_ui_text(prop, "Animated", "Animate branching");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "symmetric_branching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SYMM_BRANCHING);
RNA_def_property_ui_text(prop, "Symmetric", "Start and end points are the same.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "hair_bspline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_BSPLINE);
RNA_def_property_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "grid_invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_INVERT);
RNA_def_property_ui_text(prop, "Invert", "Invert what is considered object and what is not.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "child_effector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_EFFECT);
RNA_def_property_ui_text(prop, "Children", "Apply effectors to children.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_SEAMS);
RNA_def_property_ui_text(prop, "Use seams", "Use seams to determine parents");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* TODO: used somewhere? */
prop= RNA_def_property(srna, "child_render", PROP_BOOLEAN, PROP_NONE);
@@ -1011,19 +1021,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "child_guide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_GUIDE);
RNA_def_property_ui_text(prop, "child_guide", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "self_effect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SELF_EFFECT);
RNA_def_property_ui_text(prop, "Self Effect", "Particle effectors effect themselves.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Type", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_change_type");
+ RNA_def_property_update(prop, 0, "rna_Particle_change_type");
prop= RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "from");
@@ -1031,14 +1041,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_from_itemf");
RNA_def_property_ui_text(prop, "Emit From", "Where to emit particles from");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "distr");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, dist_items);
RNA_def_property_ui_text(prop, "Distribution", "How to distribute particles on selected element");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* physics modes */
prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
@@ -1046,130 +1056,130 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, phys_type_items);
RNA_def_property_ui_text(prop, "Physics Type", "Particle physics type");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_change_physics");
+ RNA_def_property_update(prop, 0, "rna_Particle_change_physics");
prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, rot_mode_items);
RNA_def_property_ui_text(prop, "Rotation", "Particles initial rotation");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "avemode");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, ave_mode_items);
RNA_def_property_ui_text(prop, "Angular Velocity Mode", "Particle angular velocity mode.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "react_event", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reactevent");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_enum_items(prop, react_event_items);
RNA_def_property_ui_text(prop, "React On", "The event of target particles to react on.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/*draw flag*/
prop= RNA_def_property(srna, "velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL);
RNA_def_property_ui_text(prop, "Velocity", "Show particle velocity");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "show_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_SIZE);
RNA_def_property_ui_text(prop, "Size", "Show particle size");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "emitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_EMITTER);
RNA_def_property_ui_text(prop, "Emitter", "Render emitter Object also.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_health", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_HEALTH);
RNA_def_property_ui_text(prop, "Health", "Draw boid health");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "abs_path_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_ABS_PATH_TIME);
RNA_def_property_ui_text(prop, "Absolute Path Time", "Path timing is in absolute frames");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_abspathtime_update");
+ RNA_def_property_update(prop, 0, "rna_Particle_abspathtime_update");
prop= RNA_def_property(srna, "billboard_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_BB_LOCK);
RNA_def_property_ui_text(prop, "Lock Billboard", "Lock the billboards align axis");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_PARENT);
RNA_def_property_ui_text(prop, "Parents", "Render parent particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "num", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_NUM);
RNA_def_property_ui_text(prop, "Number", "Show particle number");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "rand_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_RAND_GR);
RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_adaptive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT);
RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "velocity_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL_LENGTH);
RNA_def_property_ui_text(prop, "Speed", "Multiply line length by particle speed");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "material_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_MAT_COL);
RNA_def_property_ui_text(prop, "Material Color", "Draw particles using material's diffuse color.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "whole_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_WHOLE_GR);
RNA_def_property_ui_text(prop, "Whole Group", "Use whole group at once.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_strand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_STRAND);
RNA_def_property_ui_text(prop, "Strand render", "Use the strand primitive for rendering");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_as", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "draw_as");
RNA_def_property_enum_items(prop, part_draw_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_draw_as_itemf");
RNA_def_property_ui_text(prop, "Particle Drawing", "How particles are drawn in viewport");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "ren_as", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ren_as");
RNA_def_property_enum_items(prop, part_ren_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_ren_as_itemf");
RNA_def_property_ui_text(prop, "Particle Rendering", "How particles are rendered");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "draw_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in pixels (0=default)");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "childtype");
RNA_def_property_enum_items(prop, child_type_items);
RNA_def_property_ui_text(prop, "Children From", "Create child particles");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 7);
RNA_def_property_ui_range(prop, 0, 10, 1, 0);
RNA_def_property_ui_text(prop, "Steps", "How many steps paths are drawn with (power of 2)");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "render_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_step");
@@ -1180,7 +1190,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 2, 50);
RNA_def_property_ui_text(prop, "Segments", "Number of hair segments");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
//TODO: not found in UI, readonly?
@@ -1203,13 +1213,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "disp");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Display", "Percentage of particles to display in 3d view");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "omat");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Material", "Specify material used for the particles");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
//TODO: is this read only/internal?
@@ -1221,24 +1231,24 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, integrator_type_items);
RNA_def_property_ui_text(prop, "Integration", "Select physics integrator type");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "kink", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_type_items);
RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the path");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_axis_items);
RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* billboards */
prop= RNA_def_property(srna, "billboard_align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_align");
RNA_def_property_enum_items(prop, bb_align_items);
RNA_def_property_ui_text(prop, "Align to", "In respect to what the billboards are aligned");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_uv_split", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bb_uv_split");
@@ -1260,13 +1270,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "bb_tilt");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tilt", "Tilt of the billboards");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_random_tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bb_rand_tilt");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Tilt", "Random tilt of the billboards");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "bb_offset");
@@ -1274,7 +1284,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, -100.0f, 100.0f);
RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Billboard Offset", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* simplification */
prop= RNA_def_property(srna, "enable_simplify", PROP_BOOLEAN, PROP_NONE);
@@ -1309,7 +1319,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL);
RNA_def_property_ui_text(prop, "Start", "Frame # to start emitting particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "end", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
@@ -1317,37 +1327,37 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_end_set", NULL);
RNA_def_property_ui_text(prop, "End", "Frame # to stop emitting particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "Specify the life span of the particles");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_lifetime", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlife");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random", "Give the particle life a random variation.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timetweak");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_float_sdna(prop, NULL, "jitfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Amount", "Amount of jitter applied to the sampling.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "eff_hair");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Stiffnes", "Hair stiffness for effectors");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "amount", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totpart");
@@ -1358,14 +1368,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 10000000);
RNA_def_property_ui_range(prop, 0, 100000, 1, 0);
RNA_def_property_ui_text(prop, "Amount", "Total number of particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "userjit", PROP_INT, PROP_UNSIGNED);//TODO: can we get a better name for userjit?
RNA_def_property_int_sdna(prop, NULL, "userjit");
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "grid_res");
@@ -1373,102 +1383,102 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 46); /* ~100k particles in a cube */
RNA_def_property_ui_range(prop, 1, 215, 1, 0); /* ~10M particles in a cube */
RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* initial velocity factors */
prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "normfac");//optional if prop names are the same
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting speed.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "obfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting speed");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randfac");//optional if prop names are the same
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "Random", "Give the starting speed a random variation.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting speed.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting speed.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanphase");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Rot", "Rotate the surface tangent.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "reactor_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reactfac");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Reactor", "Let the vector away from the target particles location give the particle a starting speed.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "avefac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "phasefac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Phase", "Initial rotation phase");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_rotation_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randrotfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Rotation", "Randomize rotation");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_phase_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randphasefac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Phase", "Randomize rotation phase");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* physical properties */
prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Mass", "Specify the mass of the particles");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size", "The size of the particles");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "random_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "reaction_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reactshape");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Shape", "Power of reaction strength dependence on distance to target.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* global physical properties */
@@ -1477,38 +1487,38 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Acceleration", "Constant acceleration");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "acc[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in global Z axis direction");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dragfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Drag", "Specify the amount of air-drag.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "brownfac");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "Brownian", "Specify the amount of brownian motion");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "damp_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damp", "Specify the amount of damping");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* random length */
prop= RNA_def_property(srna, "random_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Length", "Give path length a random variation.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* children */
prop= RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
@@ -1516,7 +1526,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_range(prop, 0, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Children Per Parent", "Amount of children/parent");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rendered_child_nbr", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_child_nbr");
@@ -1528,45 +1538,45 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "parents");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childsize");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_random_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrandsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrad");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childflat");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Child Roundness", "Roundness of children around parent.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* clumping */
prop= RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumpfac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clump", "Amount of clumping");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "clumppow", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumppow");
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Shape of clumping");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* kink */
@@ -1575,19 +1585,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_freq");
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* rough */
@@ -1595,64 +1605,64 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough1", "Amount of location dependent rough.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough1_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size1", "Size of location dependent rough.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough2", "Amount of random rough.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_size");
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size2", "Size of random rough.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough2_thres", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by random rough.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough_endpoint", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough_end");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough Endpoint", "Amount of end point rough.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "rough_end_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Shape", "Shape of end point rough");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Length", "Length of child paths");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "child_length_thres", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by child path length.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* branching */
prop= RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "branch_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Threshold of branching.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* drawing stuff */
prop= RNA_def_property(srna, "line_length_tail", PROP_FLOAT, PROP_NONE);
@@ -1660,33 +1670,33 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Back", "Length of the line's tail");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_PartSetting_linelenhead_get", "rna_PartSetting_linelenhead_set", NULL);
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Head", "Length of the line's head");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "path_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_start");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path Start", "Starting time of drawn path.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "path_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_end");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path End", "End time of drawn path.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "trail_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "trail_count");
RNA_def_property_range(prop, 1, 100000);
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
RNA_def_property_ui_text(prop, "Trail Count", "Number of trail particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* keyed particles */
prop= RNA_def_property(srna, "keyed_loops", PROP_INT, PROP_NONE);
@@ -1694,7 +1704,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_range(prop, 1.0f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Loop count", "Number of times the keys are looped.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* boids */
prop= RNA_def_property(srna, "boids", PROP_POINTER, PROP_NONE);
@@ -1709,21 +1719,21 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bb_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Billboard Object", "Billboards face this object (default is active camera)");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* effectors */
prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
@@ -1731,77 +1741,77 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_all", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[0]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "All", "All effector's weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_spherical", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[1]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Spherical", "Spherical effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_vortex", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Vortex", "Vortex effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_magnetic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[3]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Magnetic", "Magnetic effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_wind", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[4]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Wind", "Wind effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_curveguide", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[5]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Curve Guide", "Curve guide effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_texture", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[6]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Magnetic", "Texture effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_harmonic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[7]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Harmonic", "Harmonic effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_charge", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[8]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Charge", "Charge effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "eweight_lennardjones", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "effector_weight[9]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Lennard-Jones", "Lennard-Jones effector weight.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* animation here? */
rna_def_animdata_common(srna);
@@ -1836,25 +1846,25 @@ static void rna_def_particle_target(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target Object", "The object that has the target particle system (empty if same object).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
prop= RNA_def_property(srna, "system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_text(prop, "Target Particle System", "The index of particle system on the target object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
RNA_def_property_ui_text(prop, "Time", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
prop= RNA_def_property(srna, "duration", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "duration");
RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
RNA_def_property_ui_text(prop, "Duration", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
prop= RNA_def_property(srna, "valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTARGET_VALID);
@@ -1865,7 +1875,7 @@ static void rna_def_particle_target(BlenderRNA *brna)
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Mode", "");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
}
static void rna_def_particle_system(BlenderRNA *brna)
@@ -1889,7 +1899,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_particle_settings_get", "rna_particle_settings_set", NULL);
RNA_def_property_ui_text(prop, "Settings", "Particle system settings.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "particles", "totpart");
@@ -1903,7 +1913,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Seed", "Offset in the random number table, to get a different randomized result.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* hair */
prop= RNA_def_property(srna, "softbody", PROP_POINTER, PROP_NONE);
@@ -1919,20 +1929,20 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "target_ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Reactor Target Object", "For reactor systems, the object that has the target particle system (empty if same object).");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "target_psys");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_text(prop, "Reactor Target Particle System", "For reactor systems, index of particle system on the target object.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* keyed */
prop= RNA_def_property(srna, "keyed_timing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_KEYED_TIMING);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_ui_text(prop, "Keyed timing", "Use key times");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleTarget");
@@ -1968,122 +1978,122 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "vertex_group_density", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[0]");
RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_density_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_DENSITY));
RNA_def_property_ui_text(prop, "Vertex Group Density Negate", "Negate the effect of the density vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_velocity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[1]");
RNA_def_property_ui_text(prop, "Vertex Group Velocity", "Vertex group to control velocity.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_velocity_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_VEL));
RNA_def_property_ui_text(prop, "Vertex Group Velocity Negate", "Negate the effect of the velocity vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_length", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[2]");
RNA_def_property_ui_text(prop, "Vertex Group Length", "Vertex group to control length.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "vertex_group_length_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_LENGTH));
RNA_def_property_ui_text(prop, "Vertex Group Length Negate", "Negate the effect of the length vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "vertex_group_clump", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[3]");
RNA_def_property_ui_text(prop, "Vertex Group Clump", "Vertex group to control clump.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_clump_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_CLUMP));
RNA_def_property_ui_text(prop, "Vertex Group Clump Negate", "Negate the effect of the clump vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_kink", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[4]");
RNA_def_property_ui_text(prop, "Vertex Group Kink", "Vertex group to control kink.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_kink_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_KINK));
RNA_def_property_ui_text(prop, "Vertex Group Kink Negate", "Negate the effect of the kink vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness1", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[5]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1", "Vertex group to control roughness 1.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness1_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH1));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1 Negate", "Negate the effect of the roughness 1 vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness2", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[6]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2", "Vertex group to control roughness 2.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness2_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH2));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2 Negate", "Negate the effect of the roughness 2 vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[7]");
RNA_def_property_ui_text(prop, "Vertex Group Roughness End", "Vertex group to control roughness end.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_roughness_end_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGHE));
RNA_def_property_ui_text(prop, "Vertex Group Roughness End Negate", "Negate the effect of the roughness end vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo_child");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
prop= RNA_def_property(srna, "vertex_group_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[8]");
RNA_def_property_ui_text(prop, "Vertex Group Size", "Vertex group to control size.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_size_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_SIZE));
RNA_def_property_ui_text(prop, "Vertex Group Size Negate", "Negate the effect of the size vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_tangent", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[9]");
RNA_def_property_ui_text(prop, "Vertex Group Tangent", "Vertex group to control tangent.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_tangent_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_TAN));
RNA_def_property_ui_text(prop, "Vertex Group Tangent Negate", "Negate the effect of the tangent vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_rotation", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[10]");
RNA_def_property_ui_text(prop, "Vertex Group Rotation", "Vertex group to control rotation.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_rotation_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROT));
RNA_def_property_ui_text(prop, "Vertex Group Rotation Negate", "Negate the effect of the rotation vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_field", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[11]");
RNA_def_property_ui_text(prop, "Vertex Group Field", "Vertex group to control field.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "vertex_group_field_negate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_EFFECTOR));
RNA_def_property_ui_text(prop, "Vertex Group Field Negate", "Negate the effect of the field vertex group.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
+ RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* pointcache */
prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NEVER_NULL);
@@ -2101,7 +2111,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "parent");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent", "Use this object's coordinate system instead of global coordinate system.");
- RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* hair or cache editing */
prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 727e3ff6a6d..6c951b5a1b7 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -55,7 +55,7 @@ static void rna_Pose_update(bContext *C, PointerRNA *ptr)
{
// XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
}
static char *rna_PoseChannel_path(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index b00119efaf6..5575b170398 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -45,13 +45,6 @@ static EnumPropertyItem particle_edit_hair_brush_items[] = {
{PE_BRUSH_CUT, "CUT", 0, "Cut", "Cut hairs."},
{0, NULL, 0, NULL, NULL}};
-static EnumPropertyItem particle_edit_cache_brush_items[] = {
- {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
- {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths."},
- {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth paths."},
- {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make paths longer or shorter."},
- {0, NULL, 0, NULL, NULL}};
-
#ifdef RNA_RUNTIME
#include "BKE_context.h"
@@ -61,6 +54,13 @@ static EnumPropertyItem particle_edit_cache_brush_items[] = {
#include "ED_particle.h"
+static EnumPropertyItem particle_edit_cache_brush_items[] = {
+ {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
+ {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths."},
+ {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth paths."},
+ {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make paths longer or shorter."},
+ {0, NULL, 0, NULL, NULL}};
+
static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
{
ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
@@ -72,7 +72,6 @@ static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_ParticleBrush, brush);
}
-
static PointerRNA rna_ParticleBrush_curve_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_CurveMapping, NULL);
@@ -113,11 +112,9 @@ static void rna_ParticleEdit_redo(bContext *C, PointerRNA *ptr)
static void rna_ParticleEdit_update(bContext *C, PointerRNA *ptr)
{
- Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
- if(ob)
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ if(ob) DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
}
static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *ptr, int *free)
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index d7c70d8b9e9..b3192b110f4 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -52,7 +52,7 @@
static void rna_Smoke_update(bContext *C, PointerRNA *ptr)
{
- DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
+ DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
}
static void rna_Smoke_dependency_update(bContext *C, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index d6a17526a65..0ac7fa40727 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -375,65 +375,68 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sticky");
RNA_def_property_enum_items(prop, sticky_mode_items);
RNA_def_property_ui_text(prop, "Sticky Selection Mode", "Automatically select also UVs sharing the same vertex as the ones being selected.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* drawing */
prop= RNA_def_property(srna, "edge_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
RNA_def_property_enum_items(prop, dt_uv_items);
RNA_def_property_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_smooth_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_UV);
RNA_def_property_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_STRETCH);
RNA_def_property_ui_text(prop, "Draw Stretch", "Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion).");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_stretch_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch");
RNA_def_property_enum_items(prop, dt_uvstretch_items);
RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_modified_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW);
RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_other_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER);
RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "normalized_coordinates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* todo: move edge and face drawing options here from G.f */
prop= RNA_def_property(srna, "snap_to_pixels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP);
RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "constrain_to_image_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_CLIP_UV);
RNA_def_property_ui_text(prop, "Constrain to Image Bounds", "Constraint to stay within the image bounds while editing.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "live_unwrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP);
RNA_def_property_ui_text(prop, "Live Unwrap", "Continuously unwrap the selected UV island while transforming pinned vertices.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "pivot", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
}
static void rna_def_space_outliner(BlenderRNA *brna)
@@ -464,12 +467,12 @@ static void rna_def_space_outliner(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
prop= RNA_def_property(srna, "show_restriction_columns", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS);
RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show colum");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
}
@@ -486,35 +489,34 @@ static void rna_def_background_image(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image vertically from the view center");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image.");
RNA_def_property_range(prop, 0.0, FLT_MAX);
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "transparency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blend");
RNA_def_property_ui_text(prop, "Transparency", "Amount to blend the image against the background color.");
RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_update(prop, NC_WINDOW, NULL);
-
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_space_3dview(BlenderRNA *brna)
@@ -553,10 +555,12 @@ static void rna_def_space_3dview(BlenderRNA *brna)
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera).");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
RNA_def_property_ui_text(prop, "Lock Object", "3D View center is locked to this object's position");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "background_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bgpic");
@@ -566,136 +570,142 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
RNA_def_property_enum_items(prop, viewport_shading_items);
RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "localview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "localview", 0);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view.");
RNA_def_property_range(prop, 1.0f, 250.0f);
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "near");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "far");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "grid_spacing", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_ui_text(prop, "Grid Spacing", "The distance between 3D View grid lines.");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridlines");
RNA_def_property_ui_text(prop, "Grid Lines", "The number of grid lines to display in perspective view.");
RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
RNA_def_property_ui_text(prop, "Grid Subdivisions", "The number of subdivisions between grid lines.");
RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_floor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_z_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "outline_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE);
RNA_def_property_ui_text(prop, "Outline Selected", "Show an outline highlight around selected objects in non-wireframe views.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "all_object_centers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS);
RNA_def_property_ui_text(prop, "All Object Centers", "Show the object center dot for all (selected and unselected) objects.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "relationship_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_HIDE_HELPLINES);
RNA_def_property_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "textured_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX);
RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_background_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_View3D_display_background_image_set");
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPIC);
RNA_def_property_ui_text(prop, "Display Background Image", "Display a reference image behind objects in the 3D View");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE);
RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE);
RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE);
RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "transform_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twmode");
RNA_def_property_enum_items(prop, transform_orientation_items);
RNA_def_property_ui_text(prop, "Transform Orientation", "The alignment of manipulator handles.");
- RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_LOCKED);
RNA_def_property_ui_text(prop, "Lock", "Lock View Rotation");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "box_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXVIEW);
RNA_def_property_ui_text(prop, "Box", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "box_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXCLIP);
RNA_def_property_ui_text(prop, "Clip", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_space_buttons(BlenderRNA *brna)
@@ -730,19 +740,19 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, buttons_context_items);
RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
RNA_def_property_enum_items(prop, align_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
prop= RNA_def_property(srna, "brush_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_BRUSH_TEX);
RNA_def_property_ui_text(prop, "Brush Texture", "Show brush textures.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
/* pinned data */
prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
@@ -750,6 +760,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceProperties_pin_id_typef");
RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
}
static void rna_def_space_image(BlenderRNA *brna)
@@ -766,35 +777,35 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL);
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "curves", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "cumap");
RNA_def_property_ui_text(prop, "Curves", "Color curve mapping to use for displaying the image.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "image_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
RNA_def_property_ui_text(prop, "Image Pin", "Display current image regardless of object selection.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* image draw */
prop= RNA_def_property(srna, "draw_repeated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE);
RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, dc_all_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf");
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* uv */
prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NEVER_NULL);
@@ -807,7 +818,7 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL);
RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode.");
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_SpaceImageEditor_paint_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_paint_update");
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
@@ -866,64 +877,69 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "The view mode to use for displaying sequencer output.");
- RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* flag's */
prop= RNA_def_property(srna, "draw_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather then seconds.");
- RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "transform_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
RNA_def_property_ui_text(prop, "Transform Markers", "Transform markers as well as strips.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "seperate_color_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPERATED);
RNA_def_property_ui_text(prop, "Seperate Colors", "Seperate color channels in preview.");
- RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "draw_safe_margin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_SAFE_MARGINS);
RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview.");
- RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL);
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay.");
- RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "chanshown");
RNA_def_property_ui_text(prop, "Display Channel", "The channel number shown in the image preview. 0 is the result of all strips combined.");
RNA_def_property_range(prop, 0, 32); // MAXSEQ --- todo, move from BKE_sequence.h
- RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "zebra");
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes.");
RNA_def_property_range(prop, 0, 110);
- RNA_def_property_update(prop, ND_SEQUENCER|NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* not sure we need rna access to these but adding anyway */
prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image horizontally from the view center");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_ui_text(prop, "Zoom", "Display zoom level");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
}
static void rna_def_space_text(BlenderRNA *brna)
@@ -940,63 +956,68 @@ static void rna_def_space_text(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space.");
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL);
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
/* display */
prop= RNA_def_property(srna, "syntax_highlight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0);
RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting.");
RNA_def_property_ui_icon(prop, ICON_SYNTAX_OFF, 1);
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "word_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
RNA_def_property_ui_text(prop, "Word Wrap", "Wrap words if there is not enough horizontal space.");
RNA_def_property_ui_icon(prop, ICON_WORDWRAP_OFF, 1);
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "line_numbers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text.");
RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_OFF, 1);
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them.");
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "live_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tabnumber");
RNA_def_property_range(prop, 2, 8);
RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with.");
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
/* find */
prop= RNA_def_property(srna, "find_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL);
RNA_def_property_ui_text(prop, "Find All", "Search in all text datablocks, instead of only the active one.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_WRAP);
RNA_def_property_ui_text(prop, "Find Wrap", "Search again from the start of the file when reaching the end.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "findstr");
RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "replacestr");
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
}
static void rna_def_space_dopesheet(BlenderRNA *brna)
@@ -1021,25 +1042,30 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS);
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* editing */
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
// TODO... autosnap, dopesheet?
}
@@ -1064,33 +1090,40 @@ static void rna_def_space_graph(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* display */
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS);
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY);
RNA_def_property_ui_text(prop, "Only Selected Curve Keyframes", "Only keyframes of selected F-Curves are visible and editable.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* editing */
prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
// TODO... autosnap, dopesheet?
}
@@ -1109,14 +1142,17 @@ static void rna_def_space_nla(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_DRAWTIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
prop= RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES);
RNA_def_property_ui_text(prop, "Show Control Curves", "Show influence curves on strips.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
/* editing */
// TODO... autosnap, dopesheet?
@@ -1136,43 +1172,44 @@ static void rna_def_space_time(BlenderRNA *brna)
prop= RNA_def_property(srna, "play_top_left", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_REGION);
RNA_def_property_ui_text(prop, "Top-Left 3D Window", "");
- RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_all_3d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_3D_WIN);
RNA_def_property_ui_text(prop, "All 3D Windows", "");
- RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_anim", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_ANIM_WIN);
RNA_def_property_ui_text(prop, "Animation Windows", "");
- RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_buttons", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_BUTS_WIN);
RNA_def_property_ui_text(prop, "Properties Windows", "");
- RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_IMAGE_WIN);
RNA_def_property_ui_text(prop, "Image Windows", "");
- RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
prop= RNA_def_property(srna, "play_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_SEQ);
RNA_def_property_ui_text(prop, "Sequencer Windows", "");
- RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
/* Other options */
prop= RNA_def_property(srna, "continue_physics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_CONTINUE_PHYSICS);
RNA_def_property_ui_text(prop, "Continue Physics", "During playblack, continue physics simulations regardless of the frame number");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL);
RNA_def_property_ui_text(prop, "Only Selected channels", "Show keyframes only from active/selected channels.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
}
static void rna_def_console_line(BlenderRNA *brna)
@@ -1182,15 +1219,17 @@ static void rna_def_console_line(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ConsoleLine", NULL);
RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "line", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ConsoleLine_line_get", "rna_ConsoleLine_line_length", "rna_ConsoleLine_line_set");
RNA_def_property_ui_text(prop, "Line", "Text in the line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
RNA_def_property_int_sdna(prop, NULL, "cursor");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
-
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
}
static EnumPropertyItem console_type_items[] = {
@@ -1212,39 +1251,39 @@ static void rna_def_space_console(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
- RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
prop= RNA_def_property(srna, "console_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, console_type_items);
RNA_def_property_ui_text(prop, "Type", "Console type.");
- RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
/* reporting display */
prop= RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_DEBUG);
RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info.");
- RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_INFO);
RNA_def_property_ui_text(prop, "Show Info", "Display general information.");
- RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_OP);
RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log.");
- RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_warn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_WARN);
RNA_def_property_ui_text(prop, "Show Warn", "Display warnings.");
- RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
prop= RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_ERR);
RNA_def_property_ui_text(prop, "Show Error", "Display error text.");
- RNA_def_property_update(prop, NC_CONSOLE | ND_CONSOLE_REPORT, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
@@ -1292,82 +1331,82 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser.");
- RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
prop= RNA_def_property(srna, "file", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "file");
RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser.");
- RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
prop= RNA_def_property(srna, "display", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "display");
RNA_def_property_enum_items(prop, file_display_items);
RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list");
- RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
prop= RNA_def_property(srna, "do_filter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER);
RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files.");
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "hide_dot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
RNA_def_property_ui_text(prop, "Hide Dot Files", "Hide hidden dot files.");
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST , NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST , NULL);
prop= RNA_def_property(srna, "sort", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sort");
RNA_def_property_enum_items(prop, file_sort_items);
RNA_def_property_ui_text(prop, "Sort", "");
- RNA_def_property_update(prop, NC_FILE | ND_PARAMS, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
prop= RNA_def_property(srna, "filter_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE);
RNA_def_property_ui_text(prop, "Filter Images", "Show image files.");
RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "filter_blender", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE);
RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files.");
RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "filter_movie", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE);
RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files.");
RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "filter_script", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE);
RNA_def_property_ui_text(prop, "Filter Script", "Show script files.");
RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "filter_font", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE);
RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files.");
RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "filter_sound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE);
RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files.");
RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "filter_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE);
RNA_def_property_ui_text(prop, "Filter Text", "Show text files.");
RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
prop= RNA_def_property(srna, "filter_folder", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE);
RNA_def_property_ui_text(prop, "Filter Folder", "Show folders.");
RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
- RNA_def_property_update(prop, NC_FILE | ND_FILELIST, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
}
@@ -1430,13 +1469,13 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "treetype");
RNA_def_property_enum_items(prop, tree_type_items);
RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit.");
- RNA_def_property_update(prop, NC_NODE, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texfrom");
RNA_def_property_enum_items(prop, texture_type_items);
RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from.");
- RNA_def_property_update(prop, NC_NODE, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1454,7 +1493,7 @@ static void rna_def_space_node(BlenderRNA *brna)
prop= RNA_def_property(srna, "backdrop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes.");
- RNA_def_property_update(prop, NC_NODE, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
}
static void rna_def_space_logic(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index a0716cc7dc7..ffc3f1696fc 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -33,6 +33,7 @@
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
+#include "WM_api.h"
#include "WM_types.h"
#include "BKE_utildefines.h"
@@ -41,7 +42,12 @@
#ifdef RNA_RUNTIME
-static void rna_userdef_lmb_select_set(struct PointerRNA *ptr,int value)
+static void rna_userdef_update(bContext *C, PointerRNA *ptr)
+{
+ WM_event_add_notifier(C, NC_WINDOW, NULL);
+}
+
+static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -53,12 +59,12 @@ static void rna_userdef_lmb_select_set(struct PointerRNA *ptr,int value)
userdef->flag &= ~USER_LMOUSESELECT;
}
-static void rna_userdef_rmb_select_set(struct PointerRNA *ptr,int value)
+static void rna_userdef_rmb_select_set(PointerRNA *ptr,int value)
{
rna_userdef_lmb_select_set(ptr, !value);
}
-static void rna_userdef_emulate_set(struct PointerRNA *ptr,int value)
+static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -68,7 +74,7 @@ static void rna_userdef_emulate_set(struct PointerRNA *ptr,int value)
userdef->flag ^= USER_TWOBUTTONMOUSE;
}
-static int rna_userdef_autokeymode_get(struct PointerRNA *ptr)
+static int rna_userdef_autokeymode_get(PointerRNA *ptr)
{
UserDef *userdef = (UserDef*)ptr->data;
short retval = userdef->autokey_mode;
@@ -79,7 +85,7 @@ static int rna_userdef_autokeymode_get(struct PointerRNA *ptr)
return retval;
}
-static void rna_userdef_autokeymode_set(struct PointerRNA *ptr,int value)
+static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
@@ -142,38 +148,38 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 6, 48);
RNA_def_property_ui_text(prop, "Points", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "kerning");
RNA_def_property_enum_items(prop, font_kerning_style);
RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for font kerning.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0, 3 and 5 supported)");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shadx", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixels");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shady", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixels");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Alpha", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in grey value");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
@@ -195,25 +201,25 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "paneltitle");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Panel Font", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "grouplabel", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "grouplabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Group Label Font", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "widgetlabel", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Label Font", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widget");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Font", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -229,47 +235,47 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Outline", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Item", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1);
RNA_def_property_ui_text(prop, "Shaded", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Top", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Down", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
@@ -284,36 +290,36 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_ui_text(prop, "Blend", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_ui(BlenderRNA *brna)
@@ -332,102 +338,102 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_text");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Text Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_option");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Option Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_num");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Number Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_box");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Item Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "List Item Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_state");
RNA_def_property_struct_type(prop, "ThemeWidgetStateColors");
RNA_def_property_ui_text(prop, "State Colors", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "iconfile");
RNA_def_property_ui_text(prop, "Icon File", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
@@ -438,60 +444,60 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Back", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Title", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Text Highlight", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
/* header */
prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text Highlight", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
/* buttons */
if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) {
prop= RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Back", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Title", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Button Text Highlight", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
/* list/channels */
@@ -499,22 +505,22 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Back", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Title", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "List Text Highlight", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
}
@@ -525,17 +531,17 @@ static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
prop= RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex Select", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Vertex Size", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
@@ -545,22 +551,22 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
prop= RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "edge Select", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Seam", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Sharp", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
@@ -570,22 +576,22 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
prop= RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Face Dot Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Face Dot Size", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
@@ -604,51 +610,51 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Lamp", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Object", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped Active", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transform", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
rna_def_userdef_theme_spaces_vertex(srna);
rna_def_userdef_theme_spaces_edge(srna);
@@ -657,28 +663,28 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Normal", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Solid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Pose", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
@@ -697,24 +703,24 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Region", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
rna_def_userdef_theme_spaces_vertex(srna);
@@ -722,46 +728,46 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
@@ -781,37 +787,37 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected File", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "panel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tiles", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scrollbar", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Handle", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
@@ -871,55 +877,55 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Numbers Background", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Bar", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Cursor", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Builtin", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Special", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Comment", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax String", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Numbers", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
@@ -939,49 +945,49 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "wire");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wires", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "edge_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire Select", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Node Backdrop", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "In/Out Node", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Converter Node", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Operator Node", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Group Node", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
@@ -1000,7 +1006,7 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -1020,7 +1026,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
@@ -1039,13 +1045,13 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
@@ -1064,19 +1070,19 @@ static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
@@ -1097,7 +1103,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
@@ -1114,79 +1120,79 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "movie");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Movie Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "image");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Image Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "scene");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scene Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "audio");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Audio Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "effect");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Effect Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "plugin");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Plugin Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "transition");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transition Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "meta");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Meta Strip", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "vertex_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "bone_pose");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Draw Action", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
@@ -1205,73 +1211,73 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "face");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Value Sliders", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
@@ -1290,43 +1296,43 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "strips", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Strips Selected", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
@@ -1342,23 +1348,23 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "solid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "selected", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected", "Color used for selected bones.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active", "Color used for active bones.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "colored_constraints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS);
RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_themes(BlenderRNA *brna)
@@ -1547,27 +1553,27 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "display_object_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3d view.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "global_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
RNA_def_property_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_large_cursors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0);
RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
RNA_def_property_ui_text(prop, "Show Playback FPS", "Show the frames per second screen refresh rate, while animation is played back.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
/* menus */
prop= RNA_def_property(srna, "open_mouse_over", PROP_BOOLEAN, PROP_NONE);
@@ -1662,19 +1668,19 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
RNA_def_property_ui_text(prop, "Show Mini Axis", "Show a small rotating 3D axis in the bottom left corner of the 3D View.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvisize");
RNA_def_property_range(prop, 10, 64);
RNA_def_property_ui_text(prop, "Mini Axis Size", "The axis icon's size.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvibright");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
/* middle mouse button */
prop= RNA_def_property(srna, "middle_mouse_rotate", PROP_BOOLEAN, PROP_NONE);
@@ -1708,19 +1714,19 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", 1);
RNA_def_property_ui_text(prop, "Manipulator", "Use 3d transform manipulator.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_size");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
@@ -1731,7 +1737,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
RNA_def_property_range(prop, 4, 10);
RNA_def_property_ui_text(prop, "Object Center Size", "Diameter in Pixels for Object/Lamp center display.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
@@ -1951,13 +1957,13 @@ static void rna_def_userdef_language(BlenderRNA *brna)
prop= RNA_def_property(srna, "international_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dpi");
RNA_def_property_range(prop, 48, 128);
RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "scrollback");
@@ -1969,27 +1975,27 @@ static void rna_def_userdef_language(BlenderRNA *brna)
prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, language_items);
RNA_def_property_ui_text(prop, "Language", "Language use for translation.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "translate_tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "translate_buttons", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_BUTTONS);
RNA_def_property_ui_text(prop, "Translate Buttons", "Translate button labels.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "translate_toolbox", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_MENUS);
RNA_def_property_ui_text(prop, "Translate Toolbox", "Translate toolbox menu.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts.");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_system(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index eaed0100386..148af2c28e9 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -419,6 +419,7 @@ static void rna_def_windowmanager(BlenderRNA *brna)
srna= RNA_def_struct(brna, "WindowManager", "ID");
RNA_def_struct_ui_text(srna, "Window Manager", "Window manager datablock defining open windows and other user interface data.");
+ RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
RNA_def_struct_sdna(srna, "wmWindowManager");
prop= RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 5687cb565d1..806f5409b0a 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -130,11 +130,10 @@ typedef struct wmNotifier {
#define NC_BRUSH (11<<24)
#define NC_TEXT (12<<24)
#define NC_WORLD (13<<24)
-#define NC_FILE (14<<24)
-#define NC_ANIMATION (15<<24)
-#define NC_CONSOLE (16<<24)
-#define NC_NODE (17<<24)
-#define NC_INFO (18<<24)
+#define NC_ANIMATION (14<<24)
+#define NC_SPACE (15<<24)
+#define NC_NODE (15<<24)
+#define NC_GEOM (16<<24)
/* data type, 256 entries is enough, it can overlap */
#define NOTE_DATA 0x00FF0000
@@ -172,13 +171,12 @@ typedef struct wmNotifier {
#define ND_POSE (18<<16)
#define ND_BONE_ACTIVE (19<<16)
#define ND_BONE_SELECT (20<<16)
-#define ND_GEOM_SELECT (21<<16)
-#define ND_DRAW (22<<16)
-#define ND_MODIFIER (23<<16)
-#define ND_KEYS (24<<16)
-#define ND_GEOM_DATA (25<<16)
-#define ND_CONSTRAINT (26<<16)
-#define ND_PARTICLE (27<<16)
+#define ND_DRAW (21<<16)
+#define ND_MODIFIER (22<<16) /* modifiers edited */
+#define ND_KEYS (23<<16)
+#define ND_CONSTRAINT (24<<16) /* constraints edited */
+#define ND_PARTICLE_DATA (25<<16) /* particles edited */
+#define ND_PARTICLE_SELECT (26<<16) /* particles selecting change */
/* NC_MATERIAL Material */
#define ND_SHADING (30<<16)
@@ -193,10 +191,6 @@ typedef struct wmNotifier {
#define ND_CURSOR (50<<16)
#define ND_DISPLAY (51<<16)
- /* NC_FILE Filebrowser */
-#define ND_PARAMS (60<<16)
-#define ND_FILELIST (61<<16)
-
/* NC_ANIMATION Animato */
#define ND_KEYFRAME_SELECT (70<<16)
#define ND_KEYFRAME_EDIT (71<<16)
@@ -207,9 +201,28 @@ typedef struct wmNotifier {
#define ND_NLA_EDIT (76<<16)
#define ND_NLA_ACTCHANGE (77<<16)
- /* console */
-#define ND_CONSOLE (78<<16) /* general redraw */
-#define ND_CONSOLE_REPORT (79<<16) /* update for reports, could spesify type */
+ /* NC_GEOM Geometry */
+ /* Mesh, Curve, MetaBall, Armature, .. */
+#define ND_SELECT (80<<16)
+#define ND_DATA (81<<16)
+
+ /* NC_SPACE */
+#define ND_SPACE_CONSOLE (1<<16) /* general redraw */
+#define ND_SPACE_CONSOLE_REPORT (2<<16) /* update for reports, could specify type */
+#define ND_SPACE_INFO (2<<16)
+#define ND_SPACE_IMAGE (3<<16)
+#define ND_SPACE_FILE_PARAMS (4<<16)
+#define ND_SPACE_FILE_LIST (5<<16)
+#define ND_SPACE_NODE (6<<16)
+#define ND_SPACE_OUTLINER (7<<16)
+#define ND_SPACE_VIEW3D (8<<16)
+#define ND_SPACE_PROPERTIES (9<<16)
+#define ND_SPACE_TEXT (10<<16)
+#define ND_SPACE_TIME (11<<16)
+#define ND_SPACE_GRAPH (12<<16)
+#define ND_SPACE_DOPESHEET (13<<16)
+#define ND_SPACE_NLA (14<<16)
+#define ND_SPACE_SEQUENCER (15<<16)
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index fecd5c20a15..38cf39c2081 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -108,7 +108,7 @@ void wm_operator_register(bContext *C, wmOperator *op)
MEM_freeN(buf);
/* so the console is redrawn */
- WM_event_add_notifier(C, NC_CONSOLE|ND_CONSOLE_REPORT, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 717c2d25261..c2c90f055b0 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -177,9 +177,9 @@ void wm_event_do_notifiers(bContext *C)
do_anim= 1;
}
}
- if(note->category == NC_SCENE || note->category == NC_OBJECT) {
+ if(ELEM3(note->category, NC_SCENE, NC_OBJECT, NC_GEOM)) {
ED_info_stats_clear(CTX_data_scene(C));
- WM_event_add_notifier(C, NC_INFO, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL);
}
}
if(do_anim) {