Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_constraint.c
| Show First 20 Lines • Show All 723 Lines • ▼ Show 20 Lines | if (ob->type == OB_CAMERA && ob != (Object *)ptr->id.data) { | ||||
| id_lib_extern((ID *)ob); | id_lib_extern((ID *)ob); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| data->camera = NULL; | data->camera = NULL; | ||||
| } | } | ||||
| } | } | ||||
| static void rna_Constraint_transformCache_object_path_update(Main *bmain, | |||||
| Scene *scene, | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| # ifdef WITH_ALEMBIC | |||||
| bConstraint *con = (bConstraint *)ptr->data; | |||||
| bTransformCacheConstraint *data = (bTransformCacheConstraint *)con->data; | |||||
| Object *ob = (Object *)ptr->id.data; | |||||
| data->reader = CacheReader_open_alembic_object( | |||||
| data->cache_file->handle, data->reader, ob, data->object_path); | |||||
| # endif | |||||
| rna_Constraint_update(bmain, scene, ptr); | |||||
| } | |||||
| #else | #else | ||||
| static const EnumPropertyItem constraint_distance_items[] = { | static const EnumPropertyItem constraint_distance_items[] = { | ||||
| {LIMITDIST_INSIDE, | {LIMITDIST_INSIDE, | ||||
| "LIMITDIST_INSIDE", | "LIMITDIST_INSIDE", | ||||
| 0, | 0, | ||||
| "Inside", | "Inside", | ||||
| "The object is constrained inside a virtual sphere around the target object, " | "The object is constrained inside a virtual sphere around the target object, " | ||||
| ▲ Show 20 Lines • Show All 2,141 Lines • ▼ Show 20 Lines | static void rna_def_constraint_transform_cache(BlenderRNA *brna) | ||||
| RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC); | RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC); | ||||
| RNA_def_property_update(prop, 0, "rna_Constraint_dependency_update"); | RNA_def_property_update(prop, 0, "rna_Constraint_dependency_update"); | ||||
| prop = RNA_def_property(srna, "object_path", PROP_STRING, PROP_NONE); | prop = RNA_def_property(srna, "object_path", PROP_STRING, PROP_NONE); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Object Path", | "Object Path", | ||||
| "Path to the object in the Alembic archive used to lookup the transform matrix"); | "Path to the object in the Alembic archive used to lookup the transform matrix"); | ||||
| RNA_def_property_update(prop, 0, "rna_Constraint_transformCache_object_path_update"); | RNA_def_property_update(prop, 0, "rna_Constraint_update"); | ||||
| } | } | ||||
| /* base struct for constraints */ | /* base struct for constraints */ | ||||
| void RNA_def_constraint(BlenderRNA *brna) | void RNA_def_constraint(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines | |||||