Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_add.c
| Show First 20 Lines • Show All 3,107 Lines • ▼ Show 20 Lines | static int object_convert_exec(bContext *C, wmOperator *op) | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene); | WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static void object_convert_ui(bContext *UNUSED(C), wmOperator *op) | static void object_convert_ui(bContext *UNUSED(C), wmOperator *op) | ||||
| { | { | ||||
| uiLayout *layout = op->layout; | uiLayout *layout = op->layout; | ||||
| PointerRNA ptr; | |||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); | uiItemR(layout, op->ptr, "target", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "target", 0, NULL, ICON_NONE); | uiItemR(layout, op->ptr, "keep_original", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "keep_original", 0, NULL, ICON_NONE); | |||||
| if (RNA_enum_get(op->ptr, "target") == OB_GPENCIL) { | |||||
| if (RNA_enum_get(&ptr, "target") == OB_GPENCIL) { | uiItemR(layout, op->ptr, "thickness", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "thickness", 0, NULL, ICON_NONE); | uiItemR(layout, op->ptr, "angle", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "angle", 0, NULL, ICON_NONE); | uiItemR(layout, op->ptr, "offset", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "offset", 0, NULL, ICON_NONE); | uiItemR(layout, op->ptr, "seams", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "seams", 0, NULL, ICON_NONE); | uiItemR(layout, op->ptr, "faces", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "faces", 0, NULL, ICON_NONE); | |||||
| } | } | ||||
| } | } | ||||
| void OBJECT_OT_convert(wmOperatorType *ot) | void OBJECT_OT_convert(wmOperatorType *ot) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ▲ Show 20 Lines • Show All 469 Lines • Show Last 20 Lines | |||||