Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/editarmature_sketch.c
| Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | |||||
| static char *TEMPLATES_MENU = NULL; | static char *TEMPLATES_MENU = NULL; | ||||
| static int TEMPLATES_CURRENT = 0; | static int TEMPLATES_CURRENT = 0; | ||||
| static GHash *TEMPLATES_HASH = NULL; | static GHash *TEMPLATES_HASH = NULL; | ||||
| static RigGraph *TEMPLATE_RIGG = NULL; | static RigGraph *TEMPLATE_RIGG = NULL; | ||||
| void BIF_makeListTemplates(const bContext *C) | void BIF_makeListTemplates(const bContext *C) | ||||
| { | { | ||||
| Object *obedit = CTX_data_edit_object(C); | Object *obedit = CTX_data_edit_object(C); | ||||
| SceneLayer *sl = CTX_data_scene_layer(C); | ViewLayer *sl = CTX_data_view_layer(C); | ||||
| ToolSettings *ts = CTX_data_tool_settings(C); | ToolSettings *ts = CTX_data_tool_settings(C); | ||||
| int index = 0; | int index = 0; | ||||
| if (TEMPLATES_HASH != NULL) { | if (TEMPLATES_HASH != NULL) { | ||||
| BLI_ghash_free(TEMPLATES_HASH, NULL, NULL); | BLI_ghash_free(TEMPLATES_HASH, NULL, NULL); | ||||
| } | } | ||||
| TEMPLATES_HASH = BLI_ghash_int_new("makeListTemplates gh"); | TEMPLATES_HASH = BLI_ghash_int_new("makeListTemplates gh"); | ||||
| ▲ Show 20 Lines • Show All 834 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| ToolSettings *ts = CTX_data_tool_settings(C); | ToolSettings *ts = CTX_data_tool_settings(C); | ||||
| int point_added = 0; | int point_added = 0; | ||||
| /* TODO: Since the function `ED_transform_snap_object_context_create_view3d` creates a cache, | /* TODO: Since the function `ED_transform_snap_object_context_create_view3d` creates a cache, | ||||
| * the ideal would be to call this function only at the beginning of the snap operation, | * the ideal would be to call this function only at the beginning of the snap operation, | ||||
| * or at the beginning of the operator itself */ | * or at the beginning of the operator itself */ | ||||
| struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( | struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( | ||||
| CTX_data_main(C), CTX_data_scene(C), CTX_data_scene_layer(C), CTX_data_engine(C), 0, | CTX_data_main(C), CTX_data_scene(C), CTX_data_view_layer(C), CTX_data_engine(C), 0, | ||||
| CTX_wm_region(C), CTX_wm_view3d(C)); | CTX_wm_region(C), CTX_wm_view3d(C)); | ||||
| float mvalf[2] = {UNPACK2(dd->mval)}; | float mvalf[2] = {UNPACK2(dd->mval)}; | ||||
| float loc[3], dummy_no[3]; | float loc[3], dummy_no[3]; | ||||
| if (ts->snap_mode == SCE_SNAP_MODE_VOLUME) { | if (ts->snap_mode == SCE_SNAP_MODE_VOLUME) { | ||||
| float size; | float size; | ||||
| if (peelObjectsSnapContext( | if (peelObjectsSnapContext( | ||||
| ▲ Show 20 Lines • Show All 1,643 Lines • Show Last 20 Lines | |||||