Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/intern/bmesh_operator_api.h
| Show First 20 Lines • Show All 187 Lines • ▼ Show 20 Lines | typedef enum eBMOpSlotSubType_Map { | ||||
| BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL = 69, /* python can't convert these */ | BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL = 69, /* python can't convert these */ | ||||
| } eBMOpSlotSubType_Map; | } eBMOpSlotSubType_Map; | ||||
| typedef enum eBMOpSlotSubType_Ptr { | typedef enum eBMOpSlotSubType_Ptr { | ||||
| BMO_OP_SLOT_SUBTYPE_PTR_BMESH = 100, | BMO_OP_SLOT_SUBTYPE_PTR_BMESH = 100, | ||||
| BMO_OP_SLOT_SUBTYPE_PTR_SCENE = 101, | BMO_OP_SLOT_SUBTYPE_PTR_SCENE = 101, | ||||
| BMO_OP_SLOT_SUBTYPE_PTR_OBJECT = 102, | BMO_OP_SLOT_SUBTYPE_PTR_OBJECT = 102, | ||||
| BMO_OP_SLOT_SUBTYPE_PTR_MESH = 103, | BMO_OP_SLOT_SUBTYPE_PTR_MESH = 103, | ||||
| } eBMOpSlotSubType_Ptr; | } eBMOpSlotSubType_Ptr; | ||||
| typedef enum eBMOpSlotSubType_Int { | |||||
| BMO_OP_SLOT_SUBTYPE_INT_ENUM = 200, | |||||
| BMO_OP_SLOT_SUBTYPE_INT_FLAG = 201, | |||||
| } eBMOpSlotSubType_Int; | |||||
| typedef union eBMOpSlotSubType_Union { | typedef union eBMOpSlotSubType_Union { | ||||
| eBMOpSlotSubType_Elem elem; | eBMOpSlotSubType_Elem elem; | ||||
| eBMOpSlotSubType_Ptr ptr; | eBMOpSlotSubType_Ptr ptr; | ||||
| eBMOpSlotSubType_Map map; | eBMOpSlotSubType_Map map; | ||||
| eBMOpSlotSubType_Int intg; | |||||
| } eBMOpSlotSubType_Union; | } eBMOpSlotSubType_Union; | ||||
| typedef struct BMO_FlagSet { | |||||
| int value; | |||||
| const char *identifier; | |||||
| } BMO_FlagSet; | |||||
| /* please ignore all these structures, don't touch them in tool code, except | /* please ignore all these structures, don't touch them in tool code, except | ||||
| * for when your defining an operator with BMOpDefine.*/ | * for when your defining an operator with BMOpDefine.*/ | ||||
| typedef struct BMOpSlot { | typedef struct BMOpSlot { | ||||
| const char *slot_name; /* pointer to BMOpDefine.slot_args */ | const char *slot_name; /* pointer to BMOpDefine.slot_args */ | ||||
| eBMOpSlotType slot_type; | eBMOpSlotType slot_type; | ||||
| eBMOpSlotSubType_Union slot_subtype; | eBMOpSlotSubType_Union slot_subtype; | ||||
| int len; | int len; | ||||
| // int flag; /* UNUSED */ | // int flag; /* UNUSED */ | ||||
| // int index; /* index within slot array */ /* UNUSED */ | // int index; /* index within slot array */ /* UNUSED */ | ||||
| union { | union { | ||||
| int i; | int i; | ||||
| float f; | float f; | ||||
| void *p; | void *p; | ||||
| float vec[3]; | float vec[3]; | ||||
| void **buf; | void **buf; | ||||
| GHash *ghash; | GHash *ghash; | ||||
| BMO_FlagSet *enum_flags; | |||||
| } data; | } data; | ||||
| } BMOpSlot; | } BMOpSlot; | ||||
| /* mainly for use outside bmesh internal code */ | /* mainly for use outside bmesh internal code */ | ||||
| #define BMO_SLOT_AS_BOOL(slot) ((slot)->data.i) | #define BMO_SLOT_AS_BOOL(slot) ((slot)->data.i) | ||||
| #define BMO_SLOT_AS_INT(slot) ((slot)->data.i) | #define BMO_SLOT_AS_INT(slot) ((slot)->data.i) | ||||
| #define BMO_SLOT_AS_FLOAT(slot) ((slot)->data.f) | #define BMO_SLOT_AS_FLOAT(slot) ((slot)->data.f) | ||||
| #define BMO_SLOT_AS_VECTOR(slot) ((slot)->data.vec) | #define BMO_SLOT_AS_VECTOR(slot) ((slot)->data.vec) | ||||
| Show All 35 Lines | |||||
| #define BMO_FLAG_DEFAULTS BMO_FLAG_RESPECT_HIDE | #define BMO_FLAG_DEFAULTS BMO_FLAG_RESPECT_HIDE | ||||
| #define MAX_SLOTNAME 32 | #define MAX_SLOTNAME 32 | ||||
| typedef struct BMOSlotType { | typedef struct BMOSlotType { | ||||
| char name[MAX_SLOTNAME]; | char name[MAX_SLOTNAME]; | ||||
| eBMOpSlotType type; | eBMOpSlotType type; | ||||
| eBMOpSlotSubType_Union subtype; | eBMOpSlotSubType_Union subtype; | ||||
| BMO_FlagSet *enum_flags; | |||||
| } BMOSlotType; | } BMOSlotType; | ||||
| typedef struct BMOpDefine { | typedef struct BMOpDefine { | ||||
| const char *opname; | const char *opname; | ||||
| BMOSlotType slot_types_in[BMO_OP_MAX_SLOTS]; | BMOSlotType slot_types_in[BMO_OP_MAX_SLOTS]; | ||||
| BMOSlotType slot_types_out[BMO_OP_MAX_SLOTS]; | BMOSlotType slot_types_out[BMO_OP_MAX_SLOTS]; | ||||
| void (*exec)(BMesh *bm, BMOperator *op); | void (*exec)(BMesh *bm, BMOperator *op); | ||||
| BMOpTypeFlag type_flag; | BMOpTypeFlag type_flag; | ||||
| ▲ Show 20 Lines • Show All 301 Lines • Show Last 20 Lines | |||||