diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-06 14:38:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-06 14:38:44 +0400 |
commit | e936c78251de5bafa99439803ab4fd2caa4df3b2 (patch) | |
tree | 51ccdc2efbab74903cb7b428619726832c3b1ab4 /source/blender/makesrna/intern/rna_object.c | |
parent | 735ab2b22d865570a4585e7088e66a45030ddf2d (diff) | |
parent | b18e661ffcd39b97ac0c8295d778a1cb31339ed8 (diff) |
svn merge ^/trunk/blender -r41503:41575
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 59 |
1 files changed, 19 insertions, 40 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 05dc8ac0c99..df2b2881c03 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -902,11 +902,11 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value) break; case OB_BODY_TYPE_OCCLUDER: ob->gameflag |= OB_OCCLUDER; - ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC|OB_NAVMESH); + ob->gameflag &= ~(OB_SENSOR|OB_RIGID_BODY|OB_SOFT_BODY|OB_COLLISION|OB_DYNAMIC|OB_NAVMESH); break; case OB_BODY_TYPE_NAVMESH: ob->gameflag |= OB_NAVMESH; - ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC|OB_OCCLUDER); + ob->gameflag &= ~(OB_SENSOR|OB_RIGID_BODY|OB_SOFT_BODY|OB_COLLISION|OB_DYNAMIC|OB_OCCLUDER); if (ob->type == OB_MESH) { /* could be moved into mesh UI but for now ensure mesh data layer */ @@ -915,7 +915,7 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value) break; case OB_BODY_TYPE_NO_COLLISION: - ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_OCCLUDER|OB_DYNAMIC|OB_NAVMESH); + ob->gameflag &= ~(OB_SENSOR|OB_RIGID_BODY|OB_SOFT_BODY|OB_COLLISION|OB_OCCLUDER|OB_DYNAMIC|OB_NAVMESH); break; case OB_BODY_TYPE_STATIC: ob->gameflag |= OB_COLLISION; @@ -949,10 +949,10 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value) if (ob->type == OB_MESH) { /* this is needed to refresh the derived meshes draw func */ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA); - WM_main_add_notifier(NC_OBJECT|ND_DRAW, ptr->id.data); } } + WM_main_add_notifier(NC_OBJECT|ND_DRAW, ptr->id.data); } static PointerRNA rna_Object_active_particle_system_get(PointerRNA *ptr) @@ -1533,9 +1533,10 @@ static void rna_def_object_game_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "use_collision_bounds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_BOUNDS); RNA_def_property_ui_text(prop, "Use Collision Bounds", "Specify a collision bounds type other than the default"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); prop= RNA_def_property(srna, "collision_bounds_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "boundtype"); + RNA_def_property_enum_sdna(prop, NULL, "collision_boundtype"); RNA_def_property_enum_items(prop, collision_bounds_items); RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_collision_bounds_itemf"); RNA_def_property_ui_text(prop, "Collision Bounds", "Select the collision type"); @@ -1804,8 +1805,6 @@ static void rna_def_object(BlenderRNA *brna) {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", "Draw bounds as sphere"}, {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", "Draw bounds as cylinder"}, {OB_BOUND_CONE, "CONE", 0, "Cone", "Draw bounds as cone"}, - {OB_BOUND_TRIANGLE_MESH, "POLYHEDRON", 0, "Polyhedron", "Draw bounds as polyhedron"}, - {OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", "Draw bounds as capsule"}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem dupli_items[] = { @@ -2212,13 +2211,20 @@ static void rna_def_object(BlenderRNA *brna) rna_def_animviz_common(srna); rna_def_motionpath_common(srna); - /* duplicates */ - // XXX: evil old crap + /* slow parenting */ + // XXX: evil old crap prop= RNA_def_property(srna, "use_slow_parent", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "partype", PARSLOW); - RNA_def_property_ui_text(prop, "Slow Parent", "Create a delay in the parent relationship"); + RNA_def_property_ui_text(prop, "Slow Parent", "Create a delay in the parent relationship (Beware: this isn't renderfarm safe and may be invalid after jumping around the timeline)"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); - + + prop= RNA_def_property(srna, "slow_parent_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME); + RNA_def_property_float_sdna(prop, NULL, "sf"); + RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); + RNA_def_property_ui_text(prop, "Slow Parent Offset", "Amount of delay in the parent relationship"); + RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); + + /* duplicates */ prop= RNA_def_property(srna, "dupli_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag"); RNA_def_property_enum_items(prop, dupli_items); @@ -2227,7 +2233,7 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "use_dupli_frames_speed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED); - RNA_def_property_ui_text(prop, "Dupli Frames Speed", "Set dupliframes to use the frame"); // TODO, better descriptio! + RNA_def_property_ui_text(prop, "Dupli Frames Speed", "Set dupliframes to use the current frame instead of parent curve's evaluation time"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); prop= RNA_def_property(srna, "use_dupli_vertices_rotation", PROP_BOOLEAN, PROP_NONE); @@ -2287,34 +2293,7 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "is_duplicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLI); RNA_def_property_clear_flag(prop, PROP_EDITABLE); - - /* time offset */ - prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME); - RNA_def_property_float_sdna(prop, NULL, "sf"); - RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); - RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for F-Curve and dupligroup instances"); - RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); - - prop= RNA_def_property(srna, "use_time_offset_edit", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_OB); - RNA_def_property_ui_text(prop, "Time Offset Edit", - "Use time offset when inserting keys and display time offset for F-Curve and action views"); - - prop= RNA_def_property(srna, "use_time_offset_parent", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARENT); - RNA_def_property_ui_text(prop, "Time Offset Parent", "Apply the time offset to this object's parent relationship"); - RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); - - prop= RNA_def_property(srna, "use_time_offset_particle", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARTICLE); - RNA_def_property_ui_text(prop, "Time Offset Particle", "Let the time offset work on the particle effect"); - RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); - - prop= RNA_def_property(srna, "use_time_offset_add_parent", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_OFFS_PARENTADD); - RNA_def_property_ui_text(prop, "Time Offset Add Parent", "Add the parent's time offset value"); - RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update"); - + /* drawing */ prop= RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "dt"); |