/* to create ID property groups */
void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop);
+void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop);
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr);
+void RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key);
void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop);
/* Path
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set);
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range);
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range);
-void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set);
+void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item);
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set);
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set);
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring);
return result;
}
+static StructRNA *rna_find_struct(const char *identifier)
+{
+ StructDefRNA *ds;
+
+ for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
+ if(strcmp(ds->srna->identifier, identifier)==0)
+ return ds->srna;
+
+ return NULL;
+}
+
static const char *rna_find_type(const char *type)
{
StructDefRNA *ds;
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
int a, mask= 0;
- for(a=0; a<eprop->totitem; a++)
- mask |= eprop->item[a].value;
+ if(eprop->item) {
+ for(a=0; a<eprop->totitem; a++)
+ mask |= eprop->item[a].value;
+ }
return mask;
}
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
+ PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ StructRNA *type= rna_find_struct((char*)pprop->type);
+
rna_print_data_get(f, dp);
+
+ if(type && (type->flag & STRUCT_ID) && strcmp(type->identifier, "Object")!=0) {
+ fprintf(f, "\n if(data->%s)\n", dp->dnaname);
+ fprintf(f, " id_us_min((ID*)data->%s);\n", dp->dnaname);
+ fprintf(f, " if(value.data)\n");
+ fprintf(f, " id_us_plus((ID*)value.data);\n\n");
+ }
fprintf(f, " data->%s= value.data;\n", dp->dnaname);
+
}
fprintf(f, "}\n\n");
break;
DefRNA.error= 1;
}
}
+ else if(eprop->itemf);
else {
fprintf(stderr, "rna_generate_structs: %s%s.%s, enum must have items defined.\n", srna->identifier, errnest, prop->identifier);
DefRNA.error= 1;
}
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- fprintf(f, "\t%s, %s, rna_%s%s_%s_items, %d, %d\n", rna_function_string(eprop->get), rna_function_string(eprop->set), srna->identifier, strnest, prop->identifier, eprop->totitem, eprop->defaultvalue);
+ fprintf(f, "\t%s, %s, %s, ", rna_function_string(eprop->get), rna_function_string(eprop->set), rna_function_string(eprop->itemf));
+ if(eprop->item)
+ fprintf(f, "rna_%s%s_%s_items, ", srna->identifier, strnest, prop->identifier);
+ else
+ fprintf(f, "NULL, ");
+ fprintf(f, "%d, %d\n", eprop->totitem, eprop->defaultvalue);
break;
}
case PROP_POINTER: {
fprintf(f, "#include <limits.h>\n");
fprintf(f, "#include <string.h>\n\n");
+ fprintf(f, "#include \"DNA_ID.h\"\n");
+
fprintf(f, "#include \"BLI_blenlib.h\"\n\n");
+ fprintf(f, "#include \"BKE_library.h\"\n");
fprintf(f, "#include \"BKE_utildefines.h\"\n\n");
fprintf(f, "#include \"RNA_define.h\"\n");
void RNA_property_enum_items(PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **item, int *totitem)
{
EnumPropertyRNA *eprop= (EnumPropertyRNA*)rna_ensure_property(prop);
+ int tot;
- *item= eprop->item;
- *totitem= eprop->totitem;
+ if(eprop->itemf) {
+ *item= eprop->itemf(ptr);
+ for(tot=0; (*item)[tot].identifier; tot++);
+ *totitem= tot;
+ }
+ else {
+ *item= eprop->item;
+ *totitem= eprop->totitem;
+ }
}
int RNA_property_enum_value(PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value)
printf("RNA_property_pointer_add %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
}
+void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
+{
+ IDProperty *idprop, *group;
+
+ if((idprop=rna_idproperty_check(&prop, ptr))) {
+ group= RNA_struct_idproperties(ptr, 0);
+
+ if(group) {
+ IDP_RemFromGroup(group, idprop);
+ IDP_FreeProperty(idprop);
+ MEM_freeN(idprop);
+ }
+ }
+ else
+ printf("RNA_property_pointer_remove %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
+}
+
static void rna_property_collection_get_idp(CollectionPropertyIterator *iter)
{
CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)iter->prop;
}
}
+void RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
+{
+ IDProperty *idprop;
+
+ if((idprop=rna_idproperty_check(&prop, ptr))) {
+ IDProperty tmp, *array;
+ int len;
+
+ len= idprop->len;
+ array= IDP_IDPArray(idprop);
+
+ if(key >= 0 && key < len) {
+ if(key+1 < len) {
+ /* move element to be removed to the back */
+ memcpy(&tmp, &array[key], sizeof(IDProperty));
+ memmove(array+key, array+key+1, sizeof(IDProperty)*(len-key+1));
+ memcpy(&array[len-1], &tmp, sizeof(IDProperty));
+ }
+
+ IDP_ResizeIDPArray(idprop, len-1);
+ }
+ }
+ else if(prop->flag & PROP_IDPROPERTY);
+ else
+ printf("RNA_property_collection_remove %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
+}
+
void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop)
{
IDProperty *idprop;
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_FIXED_TEX);
RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position.");*/
- prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve.");
/* texture */
/* clone tool */
prop= RNA_def_property(srna, "clone_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clone.image");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool.");
prop= RNA_def_property(srna, "clone_opacity", PROP_FLOAT, PROP_NONE);
prop= RNA_def_property(srna, "dof_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "dof_ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "DOF Object", "Use this object to define the depth of field focal point.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
}
#ifdef RNA_RUNTIME
#include "BKE_action.h"
+#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
static char *rna_Constraint_path(PointerRNA *ptr)
{
- return BLI_sprintfN("constraints[%s]", ((bConstraint*)ptr->data)->name); // XXX not unique
-}
-
-void rna_CopyLocationConstraint_target_set(PointerRNA *ptr, PointerRNA value)
-{
- bLocateLikeConstraint *data= (bLocateLikeConstraint*)(((bConstraint*)ptr->data)->data);
-
- if(value.data != data->tar) {
- data->tar= value.data;
- data->subtarget[0]= '\0';
- }
+ return BLI_sprintfN("constraints[%s]", ((bConstraint*)ptr->data)->name);
}
static void rna_Constraint_update(bContext *C, PointerRNA *ptr)
rna_Constraint_update(C, ptr);
}
+static EnumPropertyItem space_pchan_items[] = {
+ {0, "WORLD", "World Space", ""},
+ {2, "POSE", "Pose Space", ""},
+ {3, "LOCAL_WITH_PARENT", "Local With Parent", ""},
+ {1, "LOCAL", "Local Space", ""},
+ {0, NULL, NULL, NULL}};
+
+static EnumPropertyItem space_object_items[] = {
+ {0, "WORLD", "World Space", ""},
+ {1, "LOCAL", "Local (Without Parent) Space", ""},
+ {0, NULL, NULL, NULL}};
+
+static EnumPropertyItem *rna_Constraint_owner_space_itemf(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+ bConstraint *con= (bConstraint*)ptr->data;
+
+ if(BLI_findindex(&ob->constraints, con) == -1)
+ return space_pchan_items;
+ else /* object */
+ return space_object_items;
+}
+
+static EnumPropertyItem *rna_Constraint_target_space_itemf(PointerRNA *ptr)
+{
+ bConstraint *con= (bConstraint*)ptr->data;
+ bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ ListBase targets = {NULL, NULL};
+ bConstraintTarget *ct;
+
+ if(cti && cti->get_constraint_targets) {
+ cti->get_constraint_targets(con, &targets);
+
+ for(ct=targets.first; ct; ct= ct->next)
+ if(ct->tar && ct->tar->type == OB_ARMATURE)
+ break;
+
+ if(cti->flush_constraint_targets)
+ cti->flush_constraint_targets(con, &targets, 1);
+
+ if(ct)
+ return space_pchan_items;
+ }
+
+ return space_object_items;
+}
+
#else
static void rna_def_constrainttarget(BlenderRNA *brna)
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Script", "The text object that contains the Python script.");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "use_targets", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "pole_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "poletar");
RNA_def_property_ui_text(prop, "Pole Target", "Object for pole rotation.");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "pole_subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, NULL, "rna_CopyLocationConstraint_target_set");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, transform_channel_items);
RNA_def_property_ui_text(prop, "Transform Channel", "Transfromation channel from the target that is used to key the Action.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_ui_text(prop, "Action", "");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "start");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "volume", PROP_ENUM, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object.");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Child Object", "Child object.");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "pivot_type", PROP_ENUM, PROP_NONE);
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "main_axis", PROP_ENUM, PROP_NONE);
{2, "SCALE", "Scale", ""},
{0, NULL, NULL, NULL}};
- /*static EnumPropertyItem axis_map_items[] = {
+ static EnumPropertyItem axis_map_items[] = {
{0, "X", "X", ""},
{1, "Y", "Y", ""},
{2, "Z", "Z", ""},
- {0, NULL, NULL, NULL}};*/
+ {0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "TransformConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Transformation Constraint", "Maps transformations of the target to the object.");
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Map To", "The transformation type to affect of the constrained object.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-/* it would be cool to have a method for rna to directly address specific elements of arrays in dna */
-
-/* prop= RNA_def_property(srna, "map_to_x_from", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, 0, "map");
+ prop= RNA_def_property(srna, "map_to_x_from", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "map[0]");
RNA_def_property_enum_items(prop, axis_map_items);
RNA_def_property_ui_text(prop, "Map To X From", "The source axis constrained object's X axis uses.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "map_to_y_from", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, 1, "map");
+ RNA_def_property_enum_sdna(prop, NULL, "map[1]");
RNA_def_property_enum_items(prop, axis_map_items);
RNA_def_property_ui_text(prop, "Map To Y From", "The source axis constrained object's Y axis uses.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "map_to_z_from", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, 2, "map");
+ RNA_def_property_enum_sdna(prop, NULL, "map[2]");
RNA_def_property_enum_items(prop, axis_map_items);
RNA_def_property_ui_text(prop, "Map To Z From", "The source axis constrained object's Z axis uses.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_min_x", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 0, "from_min");
+ RNA_def_property_float_sdna(prop, NULL, "from_min[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Minimum X", "Bottom range of X axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_min_y", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 1, "from_min");
+ RNA_def_property_float_sdna(prop, NULL, "from_min[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Minimum Y", "Bottom range of Y axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_min_z", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 2, "from_min");
+ RNA_def_property_float_sdna(prop, NULL, "from_min[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Minimum Z", "Bottom range of Z axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_max_x", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 0, "from_max");
+ RNA_def_property_float_sdna(prop, NULL, "from_max[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Maximum X", "Top range of X axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_max_y", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 1, "from_max");
+ RNA_def_property_float_sdna(prop, NULL, "from_max[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Maximum Y", "Top range of Y axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "from_max_z", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 2, "from_max");
+ RNA_def_property_float_sdna(prop, NULL, "from_max[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Maximum Z", "Top range of Z axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_min_x", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 0, "to_min");
+ RNA_def_property_float_sdna(prop, NULL, "to_min[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Minimum X", "Bottom range of X axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_min_y", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 1, "to_min");
+ RNA_def_property_float_sdna(prop, NULL, "to_min[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Minimum Y", "Bottom range of Y axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_min_z", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 2, "to_min");
+ RNA_def_property_float_sdna(prop, NULL, "to_min[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Minimum Z", "Bottom range of Z axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_max_x", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 0, "to_max");
+ RNA_def_property_float_sdna(prop, NULL, "to_max[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Maximum X", "Top range of X axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_max_y", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 1, "to_max");
+ RNA_def_property_float_sdna(prop, NULL, "to_max[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Maximum Y", "Top range of Y axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
prop= RNA_def_property(srna, "to_max_z", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, 2, "to_max");
+ RNA_def_property_float_sdna(prop, NULL, "to_max[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Maximum Z", "Top range of Z axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-*/
}
static void rna_def_constraint_location_limit(BlenderRNA *brna)
prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, constraint_type_items);
RNA_def_property_ui_text(prop, "Type", "");
-
+
+ prop= RNA_def_property(srna, "owner_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "ownspace");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_owner_space_itemf");
+ RNA_def_property_ui_text(prop, "Owner Space", "Space that owner is evaluated in.");
+
+ prop= RNA_def_property(srna, "target_space", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "tarspace");
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_target_space_itemf");
+ RNA_def_property_ui_text(prop, "Target Space", "Space that target is evaluated in.");
+
/* flags */
// XXX do we want to wrap this?
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Proxy Local", "Constraint was added in this proxy instance (i.e. did not belong to source Armature).");
/* values */
- prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "enforce");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Influence", "Amount of influence constraint will have on the final solution.");
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text", "Text datablock with the python script.");
/* Other Controllers */
/* pointers */
prop= RNA_def_property(srna, "text_on_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "textoncurve");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object.");
prop= RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
/* pointers */
prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape.");
prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width).");
/* Flags */
}
}
-void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set)
+void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
{
StructRNA *srna= DefRNA.laststruct;
if(get) eprop->get= (PropEnumGetFunc)get;
if(set) eprop->set= (PropEnumSetFunc)set;
+ if(item) eprop->itemf= (PropEnumItemFunc)item;
break;
}
default:
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 PointerRNA *ptr);
typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr);
typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value);
typedef void (*PropCollectionBeginFunc)(struct CollectionPropertyIterator *iter, struct PointerRNA *ptr);
PropEnumGetFunc get;
PropEnumSetFunc set;
+ PropEnumItemFunc itemf;
const EnumPropertyItem *item;
int totitem;
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
prop= RNA_def_property(srna, "map_to_color", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "material_type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered.");
- RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set");
+ RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set", NULL);
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_NONE);
prop= RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "group");
RNA_def_property_struct_type(prop, "Group");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group.");
/* flags */
prop= RNA_def_property(srna, "texco_mesh", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "texcomesh");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture Space Mesh", "Derive texture coordinates from another mesh");
prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
*ob_p= ob;
}
-static void modifier_ID_set(ID **id_p, PointerRNA value)
-{
- ID *id= value.data;
-
- if(*id_p)
- id_us_min(*id_p);
- if(id)
- id_us_plus(id);
-
- *id_p = id;
-}
-
static void rna_LatticeModifier_object_set(PointerRNA *ptr, PointerRNA value)
{
modifier_object_set(&((LatticeModifierData*)ptr->data)->object, OB_LATTICE, value);
modifier_object_set(&((ArrayModifierData*)ptr->data)->curve_ob, OB_CURVE, value);
}
-static void rna_WaveModifier_texture_set(PointerRNA *ptr, PointerRNA value)
-{
- modifier_ID_set((ID**)&((WaveModifierData*)ptr->data)->texture, value);
-}
-
-static void rna_DisplaceModifier_texture_set(PointerRNA *ptr, PointerRNA value)
-{
- modifier_ID_set((ID**)&((DisplaceModifierData*)ptr->data)->texture, value);
-}
-
-static void rna_UVProjectModifier_image_set(PointerRNA *ptr, PointerRNA value)
-{
- modifier_ID_set((ID**)&((UVProjectModifierData*)ptr->data)->image, value);
-}
-
#else
static void rna_def_property_subdivision_common(StructRNA *srna, const char type[])
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "Texture for modulating the wave.");
- RNA_def_property_pointer_funcs(prop, NULL, "rna_WaveModifier_texture_set");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "");
- RNA_def_property_pointer_funcs(prop, NULL, "rna_DisplaceModifier_texture_set");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_pointer_funcs(prop, NULL, "rna_UVProjectModifier_image_set");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "id");
RNA_def_property_struct_type(prop, "Texture");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "");
prop= RNA_def_property(srna, "node_output", PROP_INT, PROP_NONE);
prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "id");
RNA_def_property_struct_type(prop, "Material");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material", "");
prop= RNA_def_property(srna, "diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation.");
prop= RNA_def_property(srna, "track", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Track", "Object being tracked to define the rotation (Old Track).");
prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_ui_text(prop, "Materials", "");
prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_material_get", NULL);
RNA_def_property_ui_text(prop, "Active Material", "Active material being displayed.");
prop= RNA_def_property(srna, "active_material_link", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, material_link_items);
- RNA_def_property_enum_funcs(prop, "rna_Object_active_material_link_get", "rna_Object_active_material_link_set");
+ RNA_def_property_enum_funcs(prop, "rna_Object_active_material_link_get", "rna_Object_active_material_link_set", NULL);
RNA_def_property_ui_text(prop, "Active Material Link", "Use material from object or data for the active material.");
/* transform */
prop= RNA_def_property(srna, "dupli_frames_no_speed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED);
RNA_def_property_ui_text(prop, "Dupli Frames No Speed", "Set dupliframes to still, regardless of frame.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_verts_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT);
prop= RNA_def_property(srna, "dupli_faces_inherit_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT);
RNA_def_property_ui_text(prop, "Dupli Faces Inherit Scale", "Scale dupli based on face size.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_faces_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dupfacesca");
prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Group", "Instance an existing group.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
prop= RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dupsta");
RNA_def_property_range(prop, 1, 32767);
RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dupend");
RNA_def_property_range(prop, 1, 32767);
RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dupon");
RNA_def_property_range(prop, 1, 1500);
RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dupoff");
RNA_def_property_range(prop, 0, 1500);
RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
/* time offset */
prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "scriptlink");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object.");
/* drawing */
prop= RNA_def_property(srna, "stick_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "stick_ob");
RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Stick Object", "Object that particle sticks to when dead");
// ParticleKey state; /* normally current global coordinates or */
prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_struct_type(prop, "Group");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles");
prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "eff_group");
RNA_def_property_struct_type(prop, "Group");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group.");
prop= RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles.");
prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bb_ob");
RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Billboard Object", "Billboards face this object (default is active camera)");
#if 0
/* reactor */
prop= RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "target_ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Reactor Target Object", "For reactor systems, the object that has the target particle system (empty if same object).");
prop= RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED);
/* boids */
prop= RNA_def_property(srna, "boids_surface_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "keyed_ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Boids Surface Object", "For boids physics systems, constrain boids to this object's surface.");
/* keyed */
prop= RNA_def_property(srna, "keyed_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "keyed_ob");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Keyed Object", "For keyed physics systems, the object that has the target particle system.");
prop= RNA_def_property(srna, "keyed_particle_system", PROP_INT, PROP_UNSIGNED);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, type_items);
- RNA_def_property_enum_funcs(prop, "rna_Property_type_get", NULL);
+ RNA_def_property_enum_funcs(prop, "rna_Property_type_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Type", "Data type of the property.");
prop= RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, subtype_items);
- RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL);
+ RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property.");
prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Stamp Sequence Strip", "Include the name of the foreground sequence strip in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_DIRPATH);
+ prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ma");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material", "Only look for floors with this material.");
}
prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tex");
RNA_def_property_struct_type(prop, "Texture");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot.");
/* mapping */
RNA_def_property_ui_text(prop, "Calculate Alpha", "Calculates an alpha channel based on RGB values in the image");
prop= RNA_def_property(srna, "invert_alpha", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NEGALPHA);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_NEGALPHA);
RNA_def_property_ui_text(prop, "Invert Alpha", "Inverts all the alpha values in the image");
rna_def_filter_size_common(srna);
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_struct_type(prop, "Image");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
}
prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, auto_key_modes);
- RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set");
+ RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL);
RNA_def_property_ui_text(prop, "Auto Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones.");
prop= RNA_def_property(srna, "auto_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
}