Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_operators.c
| Show First 20 Lines • Show All 533 Lines • ▼ Show 20 Lines | |||||
| char *WM_prop_pystring_assign(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index) | char *WM_prop_pystring_assign(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index) | ||||
| { | { | ||||
| char *lhs, *rhs, *ret; | char *lhs, *rhs, *ret; | ||||
| lhs = C ? wm_prop_pystring_from_context(C, ptr, prop, index) : NULL; | lhs = C ? wm_prop_pystring_from_context(C, ptr, prop, index) : NULL; | ||||
| if (lhs == NULL) { | if (lhs == NULL) { | ||||
| /* fallback to bpy.data.foo[id] if we dont find in the context */ | /* fallback to bpy.data.foo[id] if we dont find in the context */ | ||||
| lhs = RNA_path_full_property_py(ptr, prop, index); | lhs = RNA_path_full_property_py(CTX_data_main(C), ptr, prop, index); | ||||
| } | } | ||||
| if (!lhs) { | if (!lhs) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| rhs = RNA_property_as_string(C, ptr, prop, index, INT_MAX); | rhs = RNA_property_as_string(C, ptr, prop, index, INT_MAX); | ||||
| if (!rhs) { | if (!rhs) { | ||||
| ▲ Show 20 Lines • Show All 3,150 Lines • Show Last 20 Lines | |||||