Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void WM_gizmo_target_property_def_rna_ptr( | void WM_gizmo_target_property_def_rna_ptr( | ||||
| wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type, | wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type, | ||||
| PointerRNA *ptr, PropertyRNA *prop, int index) | PointerRNA *ptr, PropertyRNA *prop, int index) | ||||
| { | { | ||||
| wmGizmoProperty *gz_prop = WM_gizmo_target_property_at_index(gz, gz_prop_type->index_in_type); | wmGizmoProperty *gz_prop = WM_gizmo_target_property_at_index(gz, gz_prop_type->index_in_type); | ||||
| /* if gizmo evokes an operator we cannot use it for property manipulation */ | |||||
| BLI_assert(gz->op_data == NULL); | |||||
| gz_prop->type = gz_prop_type; | gz_prop->type = gz_prop_type; | ||||
| gz_prop->ptr = *ptr; | gz_prop->ptr = *ptr; | ||||
| gz_prop->prop = prop; | gz_prop->prop = prop; | ||||
| gz_prop->index = index; | gz_prop->index = index; | ||||
| if (gz->type->property_update) { | if (gz->type->property_update) { | ||||
| gz->type->property_update(gz, gz_prop); | gz->type->property_update(gz, gz_prop); | ||||
| Show All 39 Lines | void WM_gizmo_target_property_def_func( | ||||
| WM_gizmo_target_property_def_func_ptr(gz, gz_prop_type, params); | WM_gizmo_target_property_def_func_ptr(gz, gz_prop_type, params); | ||||
| } | } | ||||
| void WM_gizmo_target_property_clear_rna_ptr( | void WM_gizmo_target_property_clear_rna_ptr( | ||||
| wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type) | wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type) | ||||
| { | { | ||||
| wmGizmoProperty *gz_prop = WM_gizmo_target_property_at_index(gz, gz_prop_type->index_in_type); | wmGizmoProperty *gz_prop = WM_gizmo_target_property_at_index(gz, gz_prop_type->index_in_type); | ||||
| /* if gizmo evokes an operator we cannot use it for property manipulation */ | |||||
| BLI_assert(gz->op_data == NULL); | |||||
| gz_prop->type = NULL; | gz_prop->type = NULL; | ||||
| gz_prop->ptr = PointerRNA_NULL; | gz_prop->ptr = PointerRNA_NULL; | ||||
| gz_prop->prop = NULL; | gz_prop->prop = NULL; | ||||
| gz_prop->index = -1; | gz_prop->index = -1; | ||||
| } | } | ||||
| void WM_gizmo_target_property_clear_rna( | void WM_gizmo_target_property_clear_rna( | ||||
| ▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines | |||||