Gizmo: add undo and name #104888

Open
Weizhen Huang wants to merge 5 commits from weizhen/blender:enable_gizmo_undo into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 3 additions and 13 deletions
Showing only changes of commit 19ade197e2 - Show all commits

View File

@ -298,13 +298,8 @@ typedef struct wmGizmoProperty {
int index;
/* Optional functions for converting to/from RNA. */
struct {
wmGizmoPropertyFnGet value_get_fn;
wmGizmoPropertyFnSet value_set_fn;
wmGizmoPropertyFnRangeGet range_get_fn;
wmGizmoPropertyFnFree free_fn;
void *user_data;
} custom_func;
wmGizmoPropertyFnParams custom_func;
} wmGizmoProperty;
typedef struct wmGizmoPropertyType {

View File

@ -103,12 +103,7 @@ void WM_gizmo_target_property_def_func_ptr(wmGizmo *gz,
BLI_assert(gz->op_data == NULL);
gz_prop->type = gz_prop_type;
gz_prop->custom_func.value_get_fn = params->value_get_fn;
gz_prop->custom_func.value_set_fn = params->value_set_fn;
gz_prop->custom_func.range_get_fn = params->range_get_fn;
gz_prop->custom_func.free_fn = params->free_fn;
gz_prop->custom_func.user_data = params->user_data;
gz_prop->custom_func = *params;
if (gz->type->property_update) {
gz->type->property_update(gz, gz_prop);