Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/gizmo/intern/wm_gizmo.c
| Show First 20 Lines • Show All 680 Lines • ▼ Show 20 Lines | switch (RNA_property_type(prop)) { | ||||
| } | } | ||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| RNA_STRUCT_END; | RNA_STRUCT_END; | ||||
| } | } | ||||
| /** set all props to their default, | /** | ||||
| * Set all props to their default. | |||||
| * | |||||
| * \param do_update: Only update un-initialized props. | * \param do_update: Only update un-initialized props. | ||||
| * | * | ||||
| * \note, there's nothing specific to gizmos here. | * \note There's nothing specific to gizmos here. | ||||
| * this could be made a general function. | * This could be made a general function. | ||||
| */ | */ | ||||
| bool WM_gizmo_properties_default(PointerRNA *ptr, const bool do_update) | bool WM_gizmo_properties_default(PointerRNA *ptr, const bool do_update) | ||||
| { | { | ||||
| bool changed = false; | bool changed = false; | ||||
| RNA_STRUCT_BEGIN (ptr, prop) { | RNA_STRUCT_BEGIN (ptr, prop) { | ||||
| switch (RNA_property_type(prop)) { | switch (RNA_property_type(prop)) { | ||||
| case PROP_POINTER: { | case PROP_POINTER: { | ||||
| StructRNA *ptype = RNA_property_pointer_type(ptr, prop); | StructRNA *ptype = RNA_property_pointer_type(ptr, prop); | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||