add the property as an argument to enum item functions, not used yet but needed for dynamic python enums.

This commit is contained in:
Campbell Barton 2011-05-26 13:38:16 +00:00
parent df823d8896
commit 155d589333
32 changed files with 71 additions and 68 deletions

View File

@ -696,7 +696,7 @@ KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *tranformK
/* Menu of All Keying Sets ----------------------------- */
/* Dynamically populate an enum of Keying Sets */
EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(ptr), int *free)
EnumPropertyItem *ANIM_keying_sets_enum_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Scene *scene = CTX_data_scene(C);
KeyingSet *ks;

View File

@ -483,7 +483,7 @@ void POSELIB_OT_pose_add (wmOperatorType *ot)
/* ----- */
/* can be called with C == NULL */
static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *ob = get_poselib_object(C);
bAction *act = (ob) ? ob->poselib : NULL;

View File

@ -211,7 +211,7 @@ struct KeyingSet *ANIM_get_keyingset_for_autokeying(struct Scene *scene, const c
void ANIM_keying_sets_menu_setup(struct bContext *C, const char title[], const char op_name[]);
/* Dynamically populate an enum of Keying Sets */
struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
/* Check if KeyingSet can be used in the current context */
short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks);

View File

@ -1250,7 +1250,7 @@ static int select_similar_exec(bContext *C, wmOperator *op)
return similar_face_select_exec(C, op);
}
static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *obedit= CTX_data_edit_object(C);
EnumPropertyItem *item= NULL;

View File

@ -762,7 +762,7 @@ static EnumPropertyItem extrude_items[] = {
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem *mesh_extrude_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *mesh_extrude_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *item= NULL;
Object *obedit= CTX_data_edit_object(C);
@ -5263,7 +5263,7 @@ static int blend_from_shape_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *obedit= CTX_data_edit_object(C);
Mesh *me= (obedit) ? obedit->data : NULL;
@ -5975,7 +5975,7 @@ static EnumPropertyItem merge_type_items[]= {
{5, "COLLAPSE", 0, "Collapse", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *obedit= CTX_data_edit_object(C);
EnumPropertyItem *item= NULL;

View File

@ -1873,7 +1873,7 @@ static void rand_timeoffs(Scene *scene, View3D *v3d)
}
static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *input = object_mode_items;
EnumPropertyItem *item= NULL;
@ -2119,7 +2119,7 @@ static EnumPropertyItem game_properties_copy_operations[] ={
static EnumPropertyItem gameprops_items[]= {
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *ob= ED_object_active_context(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};

View File

@ -563,7 +563,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *ob = CTX_data_edit_object(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};

View File

@ -584,7 +584,7 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *ob= ED_object_active_context(C);
EnumPropertyItem *item= NULL, *md_item;

View File

@ -360,7 +360,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op)
}
/* Generic itemf's for operators that take library args */
static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem item_tmp= {0}, *item= NULL;
int totitem= 0;

View File

@ -1966,7 +1966,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
EnumPropertyItem tmp = {0, "", 0, "", ""};

View File

@ -942,7 +942,7 @@ void PAINT_OT_weight_sample(wmOperatorType *ot)
}
/* samples cursor location, and gives menu with vertex groups to activate */
static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
if (C) {
wmWindow *win= CTX_wm_window(C);

View File

@ -112,19 +112,20 @@ extern EnumPropertyItem ramp_blend_items[];
struct bContext;
struct PointerRNA;
EnumPropertyItem *rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *rna_Sensor_type_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *rna_Actuator_type_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
struct PropertyRNA;
EnumPropertyItem *rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *rna_Sensor_type_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *rna_Actuator_type_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
/* Generic functions, return an enum from library data, index is the position
* in the linked list can add more for different types as needed */
EnumPropertyItem *RNA_action_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_action_local_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_group_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_group_local_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_image_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_image_local_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_scene_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_scene_local_itemf(struct bContext *C, struct PointerRNA *ptr, int *free);
EnumPropertyItem *RNA_action_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *RNA_action_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *RNA_group_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *RNA_group_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *RNA_image_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *RNA_image_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *RNA_scene_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
EnumPropertyItem *RNA_scene_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
#endif /* RNA_ENUM_TYPES_H */

View File

@ -39,6 +39,7 @@ extern "C" {
struct ParameterList;
struct FunctionRNA;
struct PropertyRNA;
struct EnumPropertyRNA;
struct StructRNA;
struct BlenderRNA;
struct IDProperty;
@ -255,7 +256,8 @@ typedef struct EnumPropertyItem {
const char *description;
} EnumPropertyItem;
typedef EnumPropertyItem *(*EnumPropertyItemFunc)(struct bContext *C, PointerRNA *ptr, int *free);
/* this is a copy of 'PropEnumItemFunc' defined in rna_internal_types.h */
typedef EnumPropertyItem *(*EnumPropertyItemFunc)(struct bContext *C, PointerRNA *ptr, struct PropertyRNA *prop, int *free);
typedef struct PropertyRNA PropertyRNA;

View File

@ -1096,9 +1096,9 @@ void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, En
int tot= 0;
if (prop->flag & PROP_ENUM_NO_CONTEXT)
*item= eprop->itemf(NULL, ptr, free);
*item= eprop->itemf(NULL, ptr, prop, free);
else
*item= eprop->itemf(C, ptr, free);
*item= eprop->itemf(C, ptr, prop, free);
if(totitem) {
if(*item) {

View File

@ -411,7 +411,7 @@ static void rna_StateActuator_state_set(PointerRNA *ptr, const int *values)
}
/* Always keep in alphabetical order */
EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, int *free)
EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *item= NULL;
Object *ob= NULL;

View File

@ -235,7 +235,7 @@ static float rna_Brush_get_alpha(PointerRNA *ptr)
return brush_alpha(me);
}
static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
static EnumPropertyItem prop_default_items[]= {
{0, NULL, 0, NULL, NULL}};

View File

@ -243,7 +243,7 @@ static void rna_Constraint_ik_type_set(struct PointerRNA *ptr, int value)
}
}
static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Object *ob= (Object*)ptr->id.data;
bConstraint *con= (bConstraint*)ptr->data;
@ -254,7 +254,7 @@ static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *C, PointerRN
return space_object_items;
}
static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
bConstraint *con= (bConstraint*)ptr->data;
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);

View File

@ -143,7 +143,7 @@ char *rna_ImageUser_path(PointerRNA *ptr)
return BLI_strdup("");
}
static EnumPropertyItem *rna_Image_source_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Image_source_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Image *ima= (Image*)ptr->data;
EnumPropertyItem *item= NULL;

View File

@ -41,6 +41,7 @@ struct FunctionRNA;
struct ReportList;
struct CollectionPropertyIterator;
struct bContext;
struct EnumProperty;
struct IDProperty;
struct GHash;
struct Main;
@ -88,7 +89,7 @@ typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr);
typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value);
typedef int (*PropEnumGetFunc)(struct PointerRNA *ptr);
typedef void (*PropEnumSetFunc)(struct PointerRNA *ptr, int value);
typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr, int *free);
typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, int *free);
typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr);
typedef StructRNA* (*PropPointerTypeFunc)(struct PointerRNA *ptr);
typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value);

View File

@ -272,7 +272,7 @@ static void rna_Material_use_nodes_set(PointerRNA *ptr, int value)
ED_node_shader_default(ma);
}
static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Material *ma= (Material*)ptr->id.data;
EnumPropertyItem *item= NULL;

View File

@ -367,7 +367,7 @@ static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
return item;
}
static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
bNode *node= (bNode*)ptr->data;
Image *ima = (Image *)node->id;
@ -384,7 +384,7 @@ static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *C, PointerRNA *ptr
return item;
}
static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
bNode *node= (bNode*)ptr->data;
Scene *sce = (Scene *)node->id;
@ -401,7 +401,7 @@ static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *C, PointerRNA *ptr
return item;
}
static EnumPropertyItem *rna_Node_channel_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Node_channel_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
bNode *node= (bNode*)ptr->data;
EnumPropertyItem *item= NULL;

View File

@ -379,7 +379,7 @@ static void rna_Object_parent_type_set(PointerRNA *ptr, int value)
ED_object_parent(ob, ob->parent, value, ob->parsubstr);
}
static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Object *ob= (Object*)ptr->data;
EnumPropertyItem *item= NULL;
@ -410,7 +410,7 @@ static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *C, PointerRNA *p
return item;
}
static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Object *ob= (Object*)ptr->data;
EnumPropertyItem *item= NULL;

View File

@ -678,7 +678,7 @@ static void rna_softbody_update(Main *bmain, Scene *scene, PointerRNA *ptr)
}
static EnumPropertyItem *rna_Effector_shape_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Effector_shape_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Object *ob= NULL;

View File

@ -702,7 +702,7 @@ static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
strcpy(str, "No object");
}
static EnumPropertyItem *rna_Particle_from_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Particle_from_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
//if(part->type==PART_REACTOR)
// return part_reactor_from_items;
@ -710,7 +710,7 @@ static EnumPropertyItem *rna_Particle_from_itemf(bContext *C, PointerRNA *ptr, i
return part_from_items;
}
static EnumPropertyItem *rna_Particle_dist_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Particle_dist_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
ParticleSettings *part = ptr->id.data;
@ -720,7 +720,7 @@ static EnumPropertyItem *rna_Particle_dist_itemf(bContext *C, PointerRNA *ptr, i
return part_dist_items;
}
static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
ParticleSettings *part = ptr->id.data;
@ -730,7 +730,7 @@ static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *C, PointerRNA *ptr
return part_draw_as_items;
}
static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
ParticleSettings *part = ptr->id.data;

View File

@ -697,7 +697,7 @@ static int rna_StringProperty_max_length_get(PointerRNA *ptr)
return ((StringPropertyRNA*)prop)->maxlength;
}
static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
EnumPropertyRNA *eprop;
@ -713,7 +713,7 @@ static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA
return eprop->item;
}
return eprop->itemf(C, ptr, free);
return eprop->itemf(C, ptr, prop, free);
}
/* XXX - not sure this is needed? */

View File

@ -597,7 +597,7 @@ static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, in
rd->qtcodecsettings.codecType = quicktime_videocodecType_from_rnatmpvalue(value);
}
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *item= NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
@ -638,7 +638,7 @@ static void rna_RenderSettings_qtcodecsettings_audiocodecType_set(PointerRNA *pt
rd->qtcodecsettings.audiocodecType = quicktime_audiocodecType_from_rnatmpvalue(value);
}
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *item= NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
@ -709,7 +709,7 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
}
static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
RenderEngineType *type;
EnumPropertyItem *item= NULL;

View File

@ -127,7 +127,7 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value)
pset->brushtype = value;
}
static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Scene *scene= CTX_data_scene(C);
Object *ob= (scene->basact)? scene->basact->object: NULL;

View File

@ -115,7 +115,7 @@ static void rna_Sensor_type_set(struct PointerRNA *ptr, int value)
}
/* Always keep in alphabetical order */
EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, int *free)
EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
EnumPropertyItem *item= NULL;
Object *ob=NULL;

View File

@ -218,7 +218,7 @@ static PointerRNA rna_CurrentOrientation_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, BLI_findlink(&scene->transform_spaces, v3d->twmode - V3D_MANIP_CUSTOM));
}
EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, int *free)
EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Scene *scene = NULL;
ListBase *transform_spaces;
@ -468,7 +468,7 @@ static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value)
ED_space_image_set(NULL, sima, sc->scene, sc->scene->obedit, (Image*)value.data);
}
static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
SpaceImage *sima= (SpaceImage*)ptr->data;
EnumPropertyItem *item= NULL;
@ -840,7 +840,7 @@ static void rna_BackgroundImage_opacity_set(PointerRNA *ptr, float value)
bgpic->blend = 1.0f - value;
}
static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);

View File

@ -285,7 +285,7 @@ static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
}
static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
MTex *mtex= ptr->data;
Tex *tex= mtex->tex;

View File

@ -467,7 +467,7 @@ static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value)
}
}
static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
int map_type= rna_wmKeyMapItem_map_type_get(ptr);
@ -477,7 +477,7 @@ static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *C, PointerRNA *ptr,
else return event_type_items;
}
static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
int map_type= rna_wmKeyMapItem_map_type_get(ptr);
@ -486,7 +486,7 @@ static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *C, PointerRNA *ptr
else return event_value_items;
}
static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, int *free)
static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
wmWindowManager *wm = CTX_wm_manager(C);
wmKeyConfig *kc;
@ -1842,4 +1842,3 @@ void RNA_def_wm(BlenderRNA *brna)
}
#endif /* RNA_RUNTIME */

View File

@ -3651,38 +3651,38 @@ static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(pt
}
/* can add more as needed */
EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, FALSE);
}
EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, TRUE);
}
EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, FALSE);
}
EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, TRUE);
}
EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, FALSE);
}
EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, TRUE);
}
EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, FALSE);
}
EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *do_free)
{
return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, TRUE);
}