Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_gizmo_wrap.c
| Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | void BPY_RNA_gizmo_wrapper(wmGizmoType *gzt, void *userdata) | ||||
| /* take care not to overwrite anything set in | /* take care not to overwrite anything set in | ||||
| * WM_gizmomaptype_group_link_ptr before opfunc() is called */ | * WM_gizmomaptype_group_link_ptr before opfunc() is called */ | ||||
| StructRNA *srna = gzt->srna; | StructRNA *srna = gzt->srna; | ||||
| *gzt = *((wmGizmoType *)userdata); | *gzt = *((wmGizmoType *)userdata); | ||||
| gzt->srna = srna; /* restore */ | gzt->srna = srna; /* restore */ | ||||
| /* don't do translations here yet */ | /* don't do translations here yet */ | ||||
| #if 0 | #if 0 | ||||
| /* Use i18n context from rna_ext.srna if possible (py gizmogroups). */ | /* Use i18n context from rna_ext.srna if possible (py gizmo-groups). */ | ||||
| if (gt->rna_ext.srna) { | if (gt->rna_ext.srna) { | ||||
| RNA_def_struct_translation_context(gt->srna, RNA_struct_translation_context(gt->rna_ext.srna)); | RNA_def_struct_translation_context(gt->srna, RNA_struct_translation_context(gt->rna_ext.srna)); | ||||
| } | } | ||||
| #endif | #endif | ||||
| gzt->struct_size = sizeof(wmGizmo); | gzt->struct_size = sizeof(wmGizmo); | ||||
| gizmo_properties_init(gzt); | gizmo_properties_init(gzt); | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||