Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_tangent.cc
| Context not available. | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "DEG_depsgraph_query.h" | |||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| Context not available. | |||||
| PointerRNA obptr = CTX_data_pointer_get(C, "active_object"); | PointerRNA obptr = CTX_data_pointer_get(C, "active_object"); | ||||
| if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) { | if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) { | ||||
| PointerRNA dataptr = RNA_pointer_get(&obptr, "data"); | PointerRNA eval_obptr; | ||||
| Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | |||||
| DEG_get_evaluated_rna_pointer(depsgraph, &obptr, &eval_obptr); | |||||
| PointerRNA dataptr = RNA_pointer_get(&eval_obptr, "data"); | |||||
| uiItemPointerR(row, ptr, "uv_map", &dataptr, "uv_layers", "", ICON_NONE); | uiItemPointerR(row, ptr, "uv_map", &dataptr, "uv_layers", "", ICON_NONE); | ||||
| } | } | ||||
| else { | else { | ||||
| Context not available. | |||||