diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 6939f7d59a1..107b3f6ad57 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -347,7 +347,7 @@ static void rna_Object_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) base = scene ? BKE_scene_base_find(scene, ob) : NULL; if (!base) return; - + SWAP(unsigned int, base->lay, ob->lay); rna_Object_layer_update__internal(bmain, scene, base, ob); @@ -463,7 +463,7 @@ static const EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), if (ob->parent) { Object *par = ob->parent; - + if (par->type == OB_LATTICE) { /* special hack: prevents this overriding others */ RNA_enum_items_add_value(&item, &totitem, &parent_type_items[2], PARSKEL); @@ -530,7 +530,7 @@ static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value) { Object *ob = (Object *)ptr->data; Group *grp = (Group *)value.data; - + /* must not let this be set if the object belongs in this group already, * thus causing a cycle/infinite-recursion leading to crashes on load [#25298] */ @@ -703,7 +703,7 @@ static PointerRNA rna_Object_active_material_get(PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; Material *ma; - + ma = (ob->totcol) ? give_current_material(ob, ob->actcol) : NULL; return rna_pointer_inherit_refine(ptr, &RNA_Material, ma); } @@ -763,7 +763,7 @@ static void rna_Object_particle_update(Main *UNUSED(bmain), Scene *scene, Pointe static void rna_Object_rotation_axis_angle_get(PointerRNA *ptr, float *value) { Object *ob = ptr->data; - + /* for now, assume that rotation mode is axis-angle */ value[0] = ob->rotAngle; copy_v3_v3(&value[1], ob->rotAxis); @@ -773,21 +773,21 @@ static void rna_Object_rotation_axis_angle_get(PointerRNA *ptr, float *value) static void rna_Object_rotation_axis_angle_set(PointerRNA *ptr, const float *value) { Object *ob = ptr->data; - + /* for now, assume that rotation mode is axis-angle */ ob->rotAngle = value[0]; copy_v3_v3(ob->rotAxis, &value[1]); - + /* TODO: validate axis? */ } static void rna_Object_rotation_mode_set(PointerRNA *ptr, int value) { Object *ob = ptr->data; - + /* use API Method for conversions... */ BKE_rotMode_change_values(ob->quat, ob->rot, ob->rotAxis, &ob->rotAngle, ob->rotmode, (short)value); - + /* finally, set the new rotation type */ ob->rotmode = value; } @@ -807,7 +807,7 @@ static void rna_Object_dimensions_set(PointerRNA *ptr, const float *value) static int rna_Object_location_editable(PointerRNA *ptr, int index) { Object *ob = (Object *)ptr->data; - + /* only if the axis in question is locked, not editable... */ if ((index == 0) && (ob->protectflag & OB_LOCK_LOCX)) return 0; @@ -822,7 +822,7 @@ static int rna_Object_location_editable(PointerRNA *ptr, int index) static int rna_Object_scale_editable(PointerRNA *ptr, int index) { Object *ob = (Object *)ptr->data; - + /* only if the axis in question is locked, not editable... */ if ((index == 0) && (ob->protectflag & OB_LOCK_SCALEX)) return 0; @@ -837,7 +837,7 @@ static int rna_Object_scale_editable(PointerRNA *ptr, int index) static int rna_Object_rotation_euler_editable(PointerRNA *ptr, int index) { Object *ob = (Object *)ptr->data; - + /* only if the axis in question is locked, not editable... */ if ((index == 0) && (ob->protectflag & OB_LOCK_ROTX)) return 0; @@ -852,7 +852,7 @@ static int rna_Object_rotation_euler_editable(PointerRNA *ptr, int index) static int rna_Object_rotation_4d_editable(PointerRNA *ptr, int index) { Object *ob = (Object *)ptr->data; - + /* only consider locks if locking components individually... */ if (ob->protectflag & OB_LOCK_ROT4D) { /* only if the axis in question is locked, not editable... */ @@ -865,7 +865,7 @@ static int rna_Object_rotation_4d_editable(PointerRNA *ptr, int index) else if ((index == 3) && (ob->protectflag & OB_LOCK_ROTZ)) return 0; } - + return PROP_EDITABLE; } @@ -900,7 +900,7 @@ static void rna_MaterialSlot_link_set(PointerRNA *ptr, int value) { Object *ob = (Object *)ptr->id.data; int index = (Material **)ptr->data - ob->mat; - + if (value) { ob->matbits[index] = 1; /* ob->colbits |= (1 << index); */ /* DEPRECATED */ @@ -921,7 +921,7 @@ static int rna_MaterialSlot_name_length(PointerRNA *ptr) if (ma) return strlen(ma->id.name + 2); - + return 0; } @@ -1155,7 +1155,7 @@ static void rna_GameObjectSettings_state_set(PointerRNA *ptr, const int *values) for (i = 0; i < OB_MAX_STATES; i++) if (values[i]) tot++; - + if (tot == 0) return; @@ -1279,7 +1279,7 @@ static PointerRNA rna_Object_active_shape_key_get(PointerRNA *ptr) if (key == NULL) return PointerRNA_NULL; - + kb = BLI_findlink(&key->block, ob->shapenr - 1); RNA_pointer_create((ID *)key, &RNA_ShapeKey, kb, &keyptr); return keyptr; @@ -1292,7 +1292,7 @@ static PointerRNA rna_Object_field_get(PointerRNA *ptr) /* weak */ if (!ob->pd) ob->pd = object_add_collision_fields(0); - + return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, ob->pd); } @@ -1306,7 +1306,7 @@ static PointerRNA rna_Object_collision_get(PointerRNA *ptr) /* weak */ if (!ob->pd) ob->pd = object_add_collision_fields(0); - + return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd); } @@ -1549,7 +1549,7 @@ static void rna_def_vertex_group(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_VertexGroup_name_set"); /* update data because modifiers may use [#24761] */ RNA_def_property_update(prop, NC_GEOM | ND_DATA | NA_RENAME, "rna_Object_internal_update_data"); - + prop = RNA_def_property(srna, "lock_weight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_ui_text(prop, "", "Maintain the relative weights for the group"); RNA_def_property_boolean_sdna(prop, NULL, "flag", 0); @@ -1598,7 +1598,7 @@ static void rna_def_material_slot(BlenderRNA *brna) {0, "DATA", 0, "Data", ""}, {0, NULL, 0, NULL, NULL} }; - + /* NOTE: there is no MaterialSlot equivalent in DNA, so the internal * pointer data points to ob->mat + index, and we manually implement * get/set for the properties. */ @@ -1751,7 +1751,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed, " "in distance per second"); - + prop = RNA_def_property(srna, "angular_velocity_min", PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, "min_angvel"); RNA_def_property_range(prop, 0.0, 1000.0); @@ -1809,34 +1809,34 @@ static void rna_def_object_game_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "lock_location_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_AXIS); RNA_def_property_ui_text(prop, "Lock X Axis", "Disable simulation of linear motion along the X axis"); - + prop = RNA_def_property(srna, "lock_location_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_AXIS); RNA_def_property_ui_text(prop, "Lock Y Axis", "Disable simulation of linear motion along the Y axis"); - + prop = RNA_def_property(srna, "lock_location_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_AXIS); RNA_def_property_ui_text(prop, "Lock Z Axis", "Disable simulation of linear motion along the Z axis"); - - + + /* lock rotation */ prop = RNA_def_property(srna, "lock_rotation_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_ROT_AXIS); RNA_def_property_ui_text(prop, "Lock X Rotation Axis", "Disable simulation of angular motion along the X axis"); - + prop = RNA_def_property(srna, "lock_rotation_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_ROT_AXIS); RNA_def_property_ui_text(prop, "Lock Y Rotation Axis", "Disable simulation of angular motion along the Y axis"); - + prop = RNA_def_property(srna, "lock_rotation_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_ROT_AXIS); RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis"); - + /* is this used anywhere ? */ prop = RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflag2", OB_NEVER_DO_ACTIVITY_CULLING); RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis"); - + prop = RNA_def_property(srna, "use_material_physics_fh", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_DO_FH); @@ -1901,7 +1901,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_float_default(prop, 1.0f); RNA_def_property_ui_text(prop, "Obstacle Radius", "Radius of object representation in obstacle simulation"); - + /* state */ prop = RNA_def_property(srna, "states_visible", PROP_BOOLEAN, PROP_LAYER_MEMBER); @@ -1915,7 +1915,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Used State", "States which are being used by controllers"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_boolean_funcs(prop, "rna_GameObjectSettings_used_state_get", NULL); - + prop = RNA_def_property(srna, "states_initial", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "init_state", 1); RNA_def_property_array(prop, OB_MAX_STATES); @@ -2041,7 +2041,7 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop) static void rna_def_object_particle_systems(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; - + PropertyRNA *prop; /* FunctionRNA *func; */ @@ -2057,7 +2057,7 @@ static void rna_def_object_particle_systems(BlenderRNA *brna, PropertyRNA *cprop RNA_def_property_pointer_funcs(prop, "rna_Object_active_particle_system_get", NULL, NULL, NULL); RNA_def_property_ui_text(prop, "Active Particle System", "Active particle system being displayed"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_Object_active_particle_system_index_get", @@ -2072,7 +2072,7 @@ static void rna_def_object_particle_systems(BlenderRNA *brna, PropertyRNA *cprop static void rna_def_object_vertex_groups(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; - + PropertyRNA *prop; FunctionRNA *func; @@ -2098,7 +2098,7 @@ static void rna_def_object_vertex_groups(BlenderRNA *brna, PropertyRNA *cprop) "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_GEOM | ND_DATA, "rna_Object_internal_update_data"); - + /* vertex groups */ /* add_vertex_group */ func = RNA_def_function(srna, "new", "rna_Object_vgroup_new"); RNA_def_function_ui_description(func, "Add vertex group to object"); @@ -2196,7 +2196,7 @@ static void rna_def_object(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; - + /* XXX: this RNA enum define is currently duplicated for objects, * since there is some text here which is not applicable */ static const EnumPropertyItem prop_rotmode_items[] = { @@ -2211,7 +2211,7 @@ static void rna_def_object(BlenderRNA *brna) "Axis Angle (W+XYZ), defines a rotation around some axis defined by 3D-Vector"}, {0, NULL, 0, NULL, NULL} }; - + static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */ static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */ static float default_scale[3] = {1, 1, 1}; /* default scale values */ @@ -2276,7 +2276,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); RNA_def_property_ui_text(prop, "Parent", "Parent Object"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); - + prop = RNA_def_property(srna, "parent_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "partype"); RNA_def_property_enum_items(prop, parent_type_items); @@ -2295,7 +2295,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Object_parent_bone_set"); RNA_def_property_ui_text(prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); - + /* Track and Up flags */ /* XXX: these have been saved here for a bit longer (after old track was removed), * since some other tools still refer to this */ @@ -2314,7 +2314,7 @@ static void rna_def_object(BlenderRNA *brna) "Axis that points in the upward direction (applies to DupliFrame when " "parent 'Follow' is enabled)"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - + /* proxy */ prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls"); @@ -2346,7 +2346,7 @@ static void rna_def_object(BlenderRNA *brna) "rna_Object_active_material_index_range"); RNA_def_property_ui_text(prop, "Active Material Index", "Index of active material slot"); RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, NULL); - + /* transform */ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_float_sdna(prop, NULL, "loc"); @@ -2354,14 +2354,14 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Location", "Location of the object"); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + prop = RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION); RNA_def_property_float_sdna(prop, NULL, "quat"); RNA_def_property_editable_array_func(prop, "rna_Object_rotation_4d_editable"); RNA_def_property_float_array_default(prop, default_quat); RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + /* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but * having a single one is better for Keyframing and other property-management situations... */ @@ -2373,20 +2373,20 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_float_array_default(prop, default_axisAngle); RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + prop = RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER); RNA_def_property_float_sdna(prop, NULL, "rot"); RNA_def_property_editable_array_func(prop, "rna_Object_rotation_euler_editable"); RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rotmode"); RNA_def_property_enum_items(prop, prop_rotmode_items); /* XXX move to using a single define of this someday */ RNA_def_property_enum_funcs(prop, NULL, "rna_Object_rotation_mode_set", NULL); RNA_def_property_ui_text(prop, "Rotation Mode", ""); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "size"); RNA_def_property_flag(prop, PROP_PROPORTIONAL); @@ -2404,7 +2404,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_ui_text(prop, "Dimensions", "Absolute bounding box dimensions of the object"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + /* delta transforms */ prop = RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION); @@ -2412,20 +2412,20 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Delta Location", "Extra translation added to the location of the object"); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + prop = RNA_def_property(srna, "delta_rotation_euler", PROP_FLOAT, PROP_EULER); RNA_def_property_float_sdna(prop, NULL, "drot"); RNA_def_property_ui_text(prop, "Delta Rotation (Euler)", "Extra rotation added to the rotation of the object (when using Euler rotations)"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + prop = RNA_def_property(srna, "delta_rotation_quaternion", PROP_FLOAT, PROP_QUATERNION); RNA_def_property_float_sdna(prop, NULL, "dquat"); RNA_def_property_float_array_default(prop, default_quat); RNA_def_property_ui_text(prop, "Delta Rotation (Quaternion)", "Extra rotation added to the rotation of the object (when using Quaternion rotations)"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + #if 0 /* XXX not supported well yet... */ prop = RNA_def_property(srna, "delta_rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE); /* FIXME: this is not a single field any more! (drotAxis and drotAngle) */ @@ -2443,7 +2443,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_float_array_default(prop, default_scale); RNA_def_property_ui_text(prop, "Delta Scale", "Extra scaling added to the scale of the object"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + /* transform locks */ prop = RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX); @@ -2458,7 +2458,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface"); RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + /* XXX this is sub-optimal - it really should be included above, * but due to technical reasons we can't do this! */ prop = RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE); @@ -2572,7 +2572,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "index"); RNA_def_property_ui_text(prop, "Pass Index", "Index number for the \"Object Index\" render pass"); RNA_def_property_update(prop, NC_OBJECT, "rna_Object_internal_update_draw"); - + prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "col"); RNA_def_property_ui_text(prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled"); @@ -2603,7 +2603,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object"); rna_def_object_particle_systems(brna, prop); - + prop = RNA_def_property(srna, "rigid_body", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "rigidbody_object"); RNA_def_property_struct_type(prop, "RigidBodyObject"); @@ -2613,7 +2613,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "rigidbody_constraint"); RNA_def_property_struct_type(prop, "RigidBodyConstraint"); RNA_def_property_ui_text(prop, "Rigid Body Constraint", "Constraint constraining rigid bodies"); - + /* restrict */ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW); @@ -2635,10 +2635,10 @@ static void rna_def_object(BlenderRNA *brna) /* anim */ rna_def_animdata_common(srna); - + rna_def_animviz_common(srna); rna_def_motionpath_common(srna); - + /* slow parenting */ /* XXX: evil old crap */ prop = RNA_def_property(srna, "use_slow_parent", PROP_BOOLEAN, PROP_NONE); @@ -2647,22 +2647,22 @@ static void rna_def_object(BlenderRNA *brna) "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", "Delay in the parent relationship"); RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); - + /* depsgraph hack */ prop = RNA_def_property(srna, "use_extra_recalc_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "depsflag", OB_DEPS_EXTRA_OB_RECALC); RNA_def_property_ui_text(prop, "Extra Object Update", "Refresh this object again on frame changes, dependency graph hack"); - + prop = RNA_def_property(srna, "use_extra_recalc_data", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "depsflag", OB_DEPS_EXTRA_DATA_RECALC); RNA_def_property_ui_text(prop, "Extra Data Update", "Refresh this object's data again on frame changes, dependency graph hack"); - + /* duplicates */ prop = RNA_def_property(srna, "dupli_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag"); @@ -2733,7 +2733,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); - + /* drawing */ prop = RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "dt"); @@ -2751,22 +2751,22 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_enum_items(prop, boundtype_items); RNA_def_property_ui_text(prop, "Draw Bounds Type", "Object boundary display type"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + prop = RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWNAME); RNA_def_property_ui_text(prop, "Draw Name", "Display the object's name"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + prop = RNA_def_property(srna, "show_axis", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_AXIS); RNA_def_property_ui_text(prop, "Draw Axes", "Display the object's origin and axes"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + prop = RNA_def_property(srna, "show_texture_space", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_TEXSPACE); RNA_def_property_ui_text(prop, "Draw Texture Space", "Display the object's texture space"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + prop = RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWWIRE); RNA_def_property_ui_text(prop, "Draw Wire", "Add the object's wireframe over solid drawing"); @@ -2782,13 +2782,13 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Draw Transparent", "Display material transparency in the object (unsupported for duplicator drawing)"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + prop = RNA_def_property(srna, "show_x_ray", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWXRAY); RNA_def_property_ui_text(prop, "X-Ray", "Make the object draw in front of others (unsupported for duplicator drawing)"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + /* Grease Pencil */ prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "gpd"); @@ -2796,7 +2796,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data-block"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); - + /* pose */ prop = RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "poselib"); @@ -2936,12 +2936,12 @@ static void rna_def_object_base(BlenderRNA *brna) RNA_def_property_array(prop, 8); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Local View Layers", "3D local view layers the object base is on"); - + prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_SELECT); RNA_def_property_ui_text(prop, "Select", "Object base selection state"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Base_select_update"); - + RNA_api_object_base(srna); } |