diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 356 |
1 files changed, 183 insertions, 173 deletions
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); |