Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object.c
| Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | static const EnumPropertyItem parent_type_items[] = { | ||||
| {PARVERT1, "VERTEX", 0, "Vertex", "The object is parented to a vertex"}, | {PARVERT1, "VERTEX", 0, "Vertex", "The object is parented to a vertex"}, | ||||
| {PARVERT3, "VERTEX_3", 0, "3 Vertices", ""}, | {PARVERT3, "VERTEX_3", 0, "3 Vertices", ""}, | ||||
| {PARBONE, "BONE", 0, "Bone", "The object is parented to a bone"}, | {PARBONE, "BONE", 0, "Bone", "The object is parented to a bone"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| #define INSTANCE_ITEMS_SHARED \ | #define INSTANCE_ITEMS_SHARED \ | ||||
| {0, "NONE", 0, "None", ""}, \ | {0, "NONE", 0, "None", ""}, \ | ||||
| {OB_DUPLIFRAMES, "FRAMES", 0, "Frames", "Make instance of object for every frame"}, \ | |||||
| {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Instantiate child objects on all vertices"}, \ | {OB_DUPLIVERTS, "VERTS", 0, "Verts", "Instantiate child objects on all vertices"}, \ | ||||
| {OB_DUPLIFACES, "FACES", 0, "Faces", "Instantiate child objects on all faces"} | {OB_DUPLIFACES, "FACES", 0, "Faces", "Instantiate child objects on all faces"} | ||||
| #define INSTANCE_ITEM_COLLECTION \ | #define INSTANCE_ITEM_COLLECTION \ | ||||
| {OB_DUPLICOLLECTION, "COLLECTION", 0, "Collection", "Enable collection instancing"} | {OB_DUPLICOLLECTION, "COLLECTION", 0, "Collection", "Enable collection instancing"} | ||||
| static const EnumPropertyItem instance_items[] = { | static const EnumPropertyItem instance_items[] = { | ||||
| INSTANCE_ITEMS_SHARED, | INSTANCE_ITEMS_SHARED, | ||||
| INSTANCE_ITEM_COLLECTION, | INSTANCE_ITEM_COLLECTION, | ||||
| ▲ Show 20 Lines • Show All 2,454 Lines • ▼ Show 20 Lines | /* RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "constraints__add", "constraints__remove"); */ | ||||
| RNA_def_property_ui_text(prop, "Display Instancer", "Make instancer visible in the viewport"); | RNA_def_property_ui_text(prop, "Display Instancer", "Make instancer visible in the viewport"); | ||||
| /* anim */ | /* anim */ | ||||
| rna_def_animdata_common(srna); | rna_def_animdata_common(srna); | ||||
| rna_def_animviz_common(srna); | rna_def_animviz_common(srna); | ||||
| rna_def_motionpath_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); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "partype", PARSLOW); | |||||
| 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", "Delay in the parent relationship"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); | |||||
| /* instancing */ | /* instancing */ | ||||
| prop = RNA_def_property(srna, "instance_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "instance_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag"); | ||||
| RNA_def_property_enum_items(prop, instance_items); | RNA_def_property_enum_items(prop, instance_items); | ||||
| RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_instance_type_itemf"); | RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_instance_type_itemf"); | ||||
| RNA_def_property_ui_text(prop, "Instance Type", "If not None, object instancing method to use"); | RNA_def_property_ui_text(prop, "Instance Type", "If not None, object instancing method to use"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); | ||||
| prop = RNA_def_property(srna, "use_instance_frames_speed", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED); | |||||
| RNA_def_property_ui_text(prop, "Instance Frames Speed", | |||||
| "Set frames instancing 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_instance_vertices_rotation", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_instance_vertices_rotation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT); | RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT); | ||||
| RNA_def_property_ui_text(prop, "Instance Verts Rotation", "Rotate instance according to vertex normal"); | RNA_def_property_ui_text(prop, "Instance Verts Rotation", "Rotate instance according to vertex normal"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); | ||||
| prop = RNA_def_property(srna, "use_instance_faces_scale", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_instance_faces_scale", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFACES_SCALE); | RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFACES_SCALE); | ||||
| RNA_def_property_ui_text(prop, "Instance Faces Inherit Scale", "Scale instance based on face size"); | RNA_def_property_ui_text(prop, "Instance Faces Inherit Scale", "Scale instance based on face size"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | ||||
| prop = RNA_def_property(srna, "instance_faces_scale", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "instance_faces_scale", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "dupfacesca"); | RNA_def_property_float_sdna(prop, NULL, "dupfacesca"); | ||||
| RNA_def_property_range(prop, 0.001f, 10000.0f); | RNA_def_property_range(prop, 0.001f, 10000.0f); | ||||
| RNA_def_property_ui_text(prop, "Instance Faces Scale", "Scale the face instance objects"); | RNA_def_property_ui_text(prop, "Instance Faces Scale", "Scale the face instance objects"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | ||||
| prop = RNA_def_property(srna, "instance_collection", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "instance_collection", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "Collection"); | RNA_def_property_struct_type(prop, "Collection"); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "dup_group"); | RNA_def_property_pointer_sdna(prop, NULL, "dup_group"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_collection_set", NULL, NULL); | RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_collection_set", NULL, NULL); | ||||
| RNA_def_property_ui_text(prop, "Instance Collection", "Instance an existing collection"); | RNA_def_property_ui_text(prop, "Instance Collection", "Instance an existing collection"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_dependency_update"); | ||||
| prop = RNA_def_property(srna, "instance_frames_start", PROP_INT, PROP_NONE | PROP_UNIT_TIME); | |||||
| RNA_def_property_int_sdna(prop, NULL, "dupsta"); | |||||
| RNA_def_property_range(prop, MINAFRAME, MAXFRAME); | |||||
| RNA_def_property_ui_text(prop, "Instance Frames Start", "Start frame for frame instances"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | |||||
| prop = RNA_def_property(srna, "instance_frames_end", PROP_INT, PROP_NONE | PROP_UNIT_TIME); | |||||
| RNA_def_property_int_sdna(prop, NULL, "dupend"); | |||||
| RNA_def_property_range(prop, MINAFRAME, MAXFRAME); | |||||
| RNA_def_property_ui_text(prop, "Instance Frames End", "End frame for frame instances"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | |||||
| prop = RNA_def_property(srna, "instance_frames_on", PROP_INT, PROP_NONE | PROP_UNIT_TIME); | |||||
| RNA_def_property_int_sdna(prop, NULL, "dupon"); | |||||
| RNA_def_property_range(prop, 1, MAXFRAME); | |||||
| RNA_def_property_ui_range(prop, 1, 1500, 1, -1); | |||||
| RNA_def_property_ui_text(prop, "Instance Frames On", "Number of frames to use between DupOff frames"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | |||||
| prop = RNA_def_property(srna, "instance_frames_off", PROP_INT, PROP_NONE | PROP_UNIT_TIME); | |||||
| RNA_def_property_int_sdna(prop, NULL, "dupoff"); | |||||
| RNA_def_property_range(prop, 0, MAXFRAME); | |||||
| RNA_def_property_ui_range(prop, 0, 1500, 1, -1); | |||||
| RNA_def_property_ui_text(prop, "Instance Frames Off", "Recurring frames to exclude from the frame instances"); | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); | |||||
| prop = RNA_def_property(srna, "is_instancer", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_instancer", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLI); | RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLI); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| /* drawing */ | /* drawing */ | ||||
| prop = RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "dt"); | RNA_def_property_enum_sdna(prop, NULL, "dt"); | ||||
| RNA_def_property_enum_items(prop, drawtype_items); | RNA_def_property_enum_items(prop, drawtype_items); | ||||
| ▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines | |||||