* Any Struct can now have ID properties, by creating a callback
  function to create/return an IDProperty.
* Wrapped PoseChannel ID properties.
* Note there is still no way to create ID Properties in 2.5, though
  the callback to get/create the initial group is now exposed through
  RNA_struct_idproperties.
This commit is contained in:
Brecht Van Lommel 2009-05-20 09:52:02 +00:00
parent d80911b867
commit f1286b15a3
11 changed files with 90 additions and 42 deletions

@ -340,6 +340,8 @@ void RNA_struct_py_type_set(StructRNA *srna, void *py_type);
void *RNA_struct_blender_type_get(StructRNA *srna); void *RNA_struct_blender_type_get(StructRNA *srna);
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type); void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type);
struct IDProperty *RNA_struct_idproperties(PointerRNA *ptr, int create);
PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier); PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier);
const struct ListBase *RNA_struct_defined_properties(StructRNA *srna); const struct ListBase *RNA_struct_defined_properties(StructRNA *srna);

@ -53,6 +53,7 @@ void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop);
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname); void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname);
void RNA_def_struct_flag(StructRNA *srna, int flag); void RNA_def_struct_flag(StructRNA *srna, int flag);
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine); void RNA_def_struct_refine_func(StructRNA *srna, const char *refine);
void RNA_def_struct_idproperties_func(StructRNA *srna, const char *refine);
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg); void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg);
void RNA_def_struct_path_func(StructRNA *srna, const char *path); void RNA_def_struct_path_func(StructRNA *srna, const char *path);
void RNA_def_struct_identifier(StructRNA *srna, const char *identifier); void RNA_def_struct_identifier(StructRNA *srna, const char *identifier);

@ -1706,6 +1706,7 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
fprintf(f, "\t%s,\n", rna_function_string(srna->path)); fprintf(f, "\t%s,\n", rna_function_string(srna->path));
fprintf(f, "\t%s,\n", rna_function_string(srna->reg)); fprintf(f, "\t%s,\n", rna_function_string(srna->reg));
fprintf(f, "\t%s,\n", rna_function_string(srna->unreg)); fprintf(f, "\t%s,\n", rna_function_string(srna->unreg));
fprintf(f, "\t%s,\n", rna_function_string(srna->idproperties));
if(srna->reg && !srna->refine) { if(srna->reg && !srna->refine) {
fprintf(stderr, "rna_generate_struct: %s has a register function, must also have refine function.\n", srna->identifier); fprintf(stderr, "rna_generate_struct: %s has a register function, must also have refine function.\n", srna->identifier);

@ -90,6 +90,11 @@ StructRNA *rna_ID_refine(PointerRNA *ptr)
} }
} }
IDProperty *rna_ID_idproperties(PointerRNA *ptr, int create)
{
return IDP_GetProperties(ptr->data, create);
}
void rna_ID_fake_user_set(PointerRNA *ptr, int value) void rna_ID_fake_user_set(PointerRNA *ptr, int value)
{ {
ID *id= (ID*)ptr->data; ID *id= (ID*)ptr->data;
@ -104,6 +109,11 @@ void rna_ID_fake_user_set(PointerRNA *ptr, int value)
} }
} }
IDProperty *rna_IDPropertyGroup_idproperties(PointerRNA *ptr, int create)
{
return ptr->data;
}
#else #else
static void rna_def_ID_properties(BlenderRNA *brna) static void rna_def_ID_properties(BlenderRNA *brna)
@ -161,6 +171,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
* care of the properties here */ * care of the properties here */
srna= RNA_def_struct(brna, "IDPropertyGroup", NULL); srna= RNA_def_struct(brna, "IDPropertyGroup", NULL);
RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties."); RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties.");
RNA_def_struct_idproperties_func(srna, "rna_IDPropertyGroup_idproperties");
} }
static void rna_def_ID(BlenderRNA *brna) static void rna_def_ID(BlenderRNA *brna)
@ -173,6 +184,7 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection."); RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection.");
RNA_def_struct_flag(srna, STRUCT_ID); RNA_def_struct_flag(srna, STRUCT_ID);
RNA_def_struct_refine_func(srna, "rna_ID_refine"); RNA_def_struct_refine_func(srna, "rna_ID_refine");
RNA_def_struct_idproperties_func(srna, "rna_ID_idproperties");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name."); RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name.");

@ -144,28 +144,19 @@ PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *da
/* ID Properties */ /* ID Properties */
IDProperty *rna_idproperties_get(PointerRNA *ptr, int create) IDProperty *RNA_struct_idproperties(PointerRNA *ptr, int create)
{ {
if(ptr->type->flag & STRUCT_ID) StructRNA *type= ptr->type;
return IDP_GetProperties(ptr->data, create);
else if(ptr->type == &RNA_IDPropertyGroup || ptr->type->base == &RNA_IDPropertyGroup)
return ptr->data;
else if(ptr->type->base == &RNA_OperatorProperties) {
if(create && !ptr->data) {
IDPropertyTemplate val;
val.i = 0; /* silence MSVC warning about uninitialized var when debugging */
ptr->data= IDP_New(IDP_GROUP, val, "RNA_OperatorProperties group");
}
return ptr->data; if(type->idproperties)
} return type->idproperties(ptr, create);
else
return NULL; return NULL;
} }
static IDProperty *rna_idproperty_find(PointerRNA *ptr, const char *name) static IDProperty *rna_idproperty_find(PointerRNA *ptr, const char *name)
{ {
IDProperty *group= rna_idproperties_get(ptr, 0); IDProperty *group= RNA_struct_idproperties(ptr, 0);
IDProperty *idprop; IDProperty *idprop;
if(group) { if(group) {
@ -252,7 +243,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
IDProperty *idprop= rna_idproperty_find(ptr, (*prop)->identifier); IDProperty *idprop= rna_idproperty_find(ptr, (*prop)->identifier);
if(idprop && !rna_idproperty_verify_valid(*prop, idprop)) { if(idprop && !rna_idproperty_verify_valid(*prop, idprop)) {
IDProperty *group= rna_idproperties_get(ptr, 0); IDProperty *group= RNA_struct_idproperties(ptr, 0);
IDP_RemFromGroup(group, idprop); IDP_RemFromGroup(group, idprop);
IDP_FreeProperty(idprop); IDP_FreeProperty(idprop);
@ -730,12 +721,12 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
else if(bprop->set) else if(bprop->set)
bprop->set(ptr, value); bprop->set(ptr, value);
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.i= value; val.i= value;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) if(group)
IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier)); IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
} }
@ -786,13 +777,13 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
else if(bprop->setarray) else if(bprop->setarray)
bprop->setarray(ptr, values); bprop->setarray(ptr, values);
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.array.len= prop->arraylength; val.array.len= prop->arraylength;
val.array.type= IDP_INT; val.array.type= IDP_INT;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) { if(group) {
idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier); idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
IDP_AddToGroup(group, idprop); IDP_AddToGroup(group, idprop);
@ -833,12 +824,12 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
else if(iprop->set) else if(iprop->set)
iprop->set(ptr, value); iprop->set(ptr, value);
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.i= value; val.i= value;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) if(group)
IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier)); IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
} }
@ -889,13 +880,13 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
else if(iprop->setarray) else if(iprop->setarray)
iprop->setarray(ptr, values); iprop->setarray(ptr, values);
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.array.len= prop->arraylength; val.array.len= prop->arraylength;
val.array.type= IDP_INT; val.array.type= IDP_INT;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) { if(group) {
idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier); idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
IDP_AddToGroup(group, idprop); IDP_AddToGroup(group, idprop);
@ -945,12 +936,12 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
fprop->set(ptr, value); fprop->set(ptr, value);
} }
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.f= value; val.f= value;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) if(group)
IDP_AddToGroup(group, IDP_New(IDP_FLOAT, val, (char*)prop->identifier)); IDP_AddToGroup(group, IDP_New(IDP_FLOAT, val, (char*)prop->identifier));
} }
@ -1014,13 +1005,13 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
fprop->setarray(ptr, values); fprop->setarray(ptr, values);
} }
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.array.len= prop->arraylength; val.array.len= prop->arraylength;
val.array.type= IDP_FLOAT; val.array.type= IDP_FLOAT;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) { if(group) {
idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier); idprop= IDP_New(IDP_ARRAY, val, (char*)prop->identifier);
IDP_AddToGroup(group, idprop); IDP_AddToGroup(group, idprop);
@ -1091,12 +1082,12 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
else if(sprop->set) else if(sprop->set)
sprop->set(ptr, value); sprop->set(ptr, value);
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.str= (char*)value; val.str= (char*)value;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) if(group)
IDP_AddToGroup(group, IDP_New(IDP_STRING, val, (char*)prop->identifier)); IDP_AddToGroup(group, IDP_New(IDP_STRING, val, (char*)prop->identifier));
} }
@ -1127,12 +1118,12 @@ void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
eprop->set(ptr, value); eprop->set(ptr, value);
} }
else if(prop->flag & PROP_EDITABLE) { else if(prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.i= value; val.i= value;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) if(group)
IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier)); IDP_AddToGroup(group, IDP_New(IDP_INT, val, (char*)prop->identifier));
} }
@ -1175,12 +1166,12 @@ void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
/* already exists */ /* already exists */
} }
else if(prop->flag & PROP_IDPROPERTY) { else if(prop->flag & PROP_IDPROPERTY) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *group; IDProperty *group;
val.i= 0; val.i= 0;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) if(group)
IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, (char*)prop->identifier)); IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, (char*)prop->identifier));
} }
@ -1276,9 +1267,8 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
IDProperty *idprop; IDProperty *idprop;
if((idprop=rna_idproperty_check(&prop, ptr))) { if((idprop=rna_idproperty_check(&prop, ptr))) {
IDPropertyTemplate val; IDPropertyTemplate val = {0};
IDProperty *item; IDProperty *item;
val.i= 0;
item= IDP_New(IDP_GROUP, val, ""); item= IDP_New(IDP_GROUP, val, "");
IDP_AppendArray(idprop, item); IDP_AppendArray(idprop, item);
@ -1287,10 +1277,9 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
} }
else if(prop->flag & PROP_IDPROPERTY) { else if(prop->flag & PROP_IDPROPERTY) {
IDProperty *group, *item; IDProperty *group, *item;
IDPropertyTemplate val; IDPropertyTemplate val = {0};
val.i= 0;
group= rna_idproperties_get(ptr, 1); group= RNA_struct_idproperties(ptr, 1);
if(group) { if(group) {
idprop= IDP_NewIDPArray(prop->identifier); idprop= IDP_NewIDPArray(prop->identifier);
IDP_AddToGroup(group, idprop); IDP_AddToGroup(group, idprop);

@ -724,6 +724,16 @@ void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
if(refine) srna->refine= (StructRefineFunc)refine; if(refine) srna->refine= (StructRefineFunc)refine;
} }
void RNA_def_struct_idproperties_func(StructRNA *srna, const char *idproperties)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_idproperties_func: only during preprocessing.\n");
return;
}
if(idproperties) srna->idproperties= (IDPropertiesFunc)idproperties;
}
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg) void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg)
{ {
if(!DefRNA.preprocess) { if(!DefRNA.preprocess) {

@ -173,7 +173,9 @@ void rna_ID_name_get(struct PointerRNA *ptr, char *value);
int rna_ID_name_length(struct PointerRNA *ptr); int rna_ID_name_length(struct PointerRNA *ptr);
void rna_ID_name_set(struct PointerRNA *ptr, const char *value); void rna_ID_name_set(struct PointerRNA *ptr, const char *value);
struct StructRNA *rna_ID_refine(struct PointerRNA *ptr); struct StructRNA *rna_ID_refine(struct PointerRNA *ptr);
struct IDProperty *rna_ID_idproperties(struct PointerRNA *ptr, int create);
void rna_ID_fake_user_set(struct PointerRNA *ptr, int value); void rna_ID_fake_user_set(struct PointerRNA *ptr, int value);
struct IDProperty *rna_IDPropertyGroup_idproperties(struct PointerRNA *ptr, int create);
void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index); void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index);
int rna_object_vgroup_name_index_length(struct PointerRNA *ptr, int index); int rna_object_vgroup_name_index_length(struct PointerRNA *ptr, int index);
@ -201,7 +203,6 @@ extern FloatPropertyRNA rna_IDProperty_double_array;
extern StructRNA RNA_IDProperty; extern StructRNA RNA_IDProperty;
extern StructRNA RNA_IDPropertyGroup; extern StructRNA RNA_IDPropertyGroup;
struct IDProperty *rna_idproperties_get(struct PointerRNA *ptr, int create);
struct IDProperty *rna_idproperty_check(struct PropertyRNA **prop, struct PointerRNA *ptr); struct IDProperty *rna_idproperty_check(struct PropertyRNA **prop, struct PointerRNA *ptr);
/* Builtin Property Callbacks */ /* Builtin Property Callbacks */

@ -36,6 +36,7 @@ struct FunctionRNA;
struct ReportList; struct ReportList;
struct CollectionPropertyIterator; struct CollectionPropertyIterator;
struct bContext; struct bContext;
struct IDProperty;
#define RNA_MAX_ARRAY 32 #define RNA_MAX_ARRAY 32
@ -43,6 +44,7 @@ struct bContext;
typedef void (*UpdateFunc)(struct bContext *C, struct PointerRNA *ptr); typedef void (*UpdateFunc)(struct bContext *C, struct PointerRNA *ptr);
typedef int (*EditableFunc)(struct PointerRNA *ptr); typedef int (*EditableFunc)(struct PointerRNA *ptr);
typedef struct IDProperty* (*IDPropertiesFunc)(struct PointerRNA *ptr, int create);
typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr); typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr);
typedef char *(*StructPathFunc)(struct PointerRNA *ptr); typedef char *(*StructPathFunc)(struct PointerRNA *ptr);
@ -287,6 +289,9 @@ struct StructRNA {
StructRegisterFunc reg; StructRegisterFunc reg;
StructUnregisterFunc unreg; StructUnregisterFunc unreg;
/* callback to get id properties */
IDPropertiesFunc idproperties;
/* functions of this struct */ /* functions of this struct */
ListBase functions; ListBase functions;
}; };

@ -41,12 +41,25 @@
#include "BKE_context.h" #include "BKE_context.h"
#include "BKE_depsgraph.h" #include "BKE_depsgraph.h"
#include "BKE_idprop.h"
static void rna_Pose_update(bContext *C, PointerRNA *ptr) static void rna_Pose_update(bContext *C, PointerRNA *ptr)
{ {
DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA); DAG_object_flush_update(CTX_data_scene(C), ptr->id.data, OB_RECALC_DATA);
} }
IDProperty *rna_PoseChannel_idproperties(PointerRNA *ptr, int create)
{
bPoseChannel *pchan= ptr->data;
if(create && !pchan->prop) {
IDPropertyTemplate val = {0};
pchan->prop= IDP_New(IDP_GROUP, val, "RNA_PoseChannel group");
}
return pchan->prop;
}
#else #else
/* users shouldn't be editing pose channel data directly -- better to set ipos and let blender calc pose_channel stuff */ /* users shouldn't be editing pose channel data directly -- better to set ipos and let blender calc pose_channel stuff */
@ -66,6 +79,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PoseChannel", NULL); srna= RNA_def_struct(brna, "PoseChannel", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel"); RNA_def_struct_sdna(srna, "bPoseChannel");
RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose."); RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose.");
RNA_def_struct_idproperties_func(srna, "rna_PoseChannel_idproperties");
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE); prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "constraints", NULL); RNA_def_property_collection_sdna(prop, NULL, "constraints", NULL);

@ -177,7 +177,7 @@ static void rna_Struct_properties_next(CollectionPropertyIterator *iter)
/* try id properties */ /* try id properties */
if(!iter->valid) { if(!iter->valid) {
group= rna_idproperties_get(&iter->builtin_parent, 0); group= RNA_struct_idproperties(&iter->builtin_parent, 0);
if(group) { if(group) {
rna_iterator_listbase_end(iter); rna_iterator_listbase_end(iter);

@ -33,6 +33,8 @@
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
#include "BKE_idprop.h"
static wmOperator *rna_OperatorProperties_find_operator(PointerRNA *ptr) static wmOperator *rna_OperatorProperties_find_operator(PointerRNA *ptr)
{ {
wmWindowManager *wm= ptr->id.data; wmWindowManager *wm= ptr->id.data;
@ -57,6 +59,16 @@ static StructRNA *rna_OperatorProperties_refine(PointerRNA *ptr)
return &RNA_OperatorProperties; return &RNA_OperatorProperties;
} }
IDProperty *rna_OperatorProperties_idproperties(PointerRNA *ptr, int create)
{
if(create && !ptr->data) {
IDPropertyTemplate val = {0};
ptr->data= IDP_New(IDP_GROUP, val, "RNA_OperatorProperties group");
}
return ptr->data;
}
static void rna_Operator_name_get(PointerRNA *ptr, char *value) static void rna_Operator_name_get(PointerRNA *ptr, char *value)
{ {
wmOperator *op= (wmOperator*)ptr->data; wmOperator *op= (wmOperator*)ptr->data;
@ -100,6 +112,7 @@ static void rna_def_operator(BlenderRNA *brna)
srna= RNA_def_struct(brna, "OperatorProperties", NULL); srna= RNA_def_struct(brna, "OperatorProperties", NULL);
RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator."); RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator.");
RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine"); RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
RNA_def_struct_idproperties_func(srna, "rna_OperatorProperties_idproperties");
} }
static void rna_def_operator_utils(BlenderRNA *brna) static void rna_def_operator_utils(BlenderRNA *brna)