Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_edit.c
| Show First 20 Lines • Show All 1,012 Lines • ▼ Show 20 Lines | /* set default settings from existing/stored settings */ | ||||
| bAnimVizSettings *avs = &ob->avs; | bAnimVizSettings *avs = &ob->avs; | ||||
| RNA_int_set(op->ptr, "start_frame", avs->path_sf); | RNA_int_set(op->ptr, "start_frame", avs->path_sf); | ||||
| RNA_int_set(op->ptr, "end_frame", avs->path_ef); | RNA_int_set(op->ptr, "end_frame", avs->path_ef); | ||||
| } | } | ||||
| /* show popup dialog to allow editing of range... */ | /* show popup dialog to allow editing of range... */ | ||||
| /* FIXME: hardcoded dimensions here are just arbitrary */ | /* FIXME: hardcoded dimensions here are just arbitrary */ | ||||
| return WM_operator_props_dialog_popup(C, op, 200, 200); | return WM_operator_props_dialog_popup(C, op, 200); | ||||
| } | } | ||||
| /* Calculate/recalculate whole paths (avs.path_sf to avs.path_ef) */ | /* Calculate/recalculate whole paths (avs.path_sf to avs.path_ef) */ | ||||
| static int object_calculate_paths_exec(bContext *C, wmOperator *op) | static int object_calculate_paths_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| int start = RNA_int_get(op->ptr, "start_frame"); | int start = RNA_int_get(op->ptr, "start_frame"); | ||||
| int end = RNA_int_get(op->ptr, "end_frame"); | int end = RNA_int_get(op->ptr, "end_frame"); | ||||
| ▲ Show 20 Lines • Show All 702 Lines • ▼ Show 20 Lines | if (RNA_boolean_get(op->ptr, "is_new")) { | ||||
| if (!RNA_property_is_set(op->ptr, prop)) { | if (!RNA_property_is_set(op->ptr, prop)) { | ||||
| char name[MAX_NAME]; | char name[MAX_NAME]; | ||||
| Collection *collection; | Collection *collection; | ||||
| collection = BKE_collection_from_index(scene, collection_index); | collection = BKE_collection_from_index(scene, collection_index); | ||||
| BKE_collection_new_name_get(collection, name); | BKE_collection_new_name_get(collection, name); | ||||
| RNA_property_string_set(op->ptr, prop, name); | RNA_property_string_set(op->ptr, prop, name); | ||||
| return WM_operator_props_dialog_popup(C, op, 200, 100); | return WM_operator_props_dialog_popup(C, op, 200); | ||||
| } | } | ||||
| } | } | ||||
| return move_to_collection_exec(C, op); | return move_to_collection_exec(C, op); | ||||
| } | } | ||||
| Collection *master_collection = scene->master_collection; | Collection *master_collection = scene->master_collection; | ||||
| /* We need the data to be allocated so it's available during menu drawing. | /* We need the data to be allocated so it's available during menu drawing. | ||||
| ▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines | |||||