From 9310c92e5316f446c0b7a912dd21181e0eedde8d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 23 Mar 2009 13:24:48 +0000 Subject: RNA: * Allow pointers to be editable, did SpaceTextEditor.text as a test. * Changed PROP_NOT_EDITABLE to PROP_EDITABLE, and added RNA_def_property_clear_flag. * Removed rna_dependency.c test code. --- source/blender/makesrna/RNA_define.h | 1 + source/blender/makesrna/RNA_types.h | 19 +---- source/blender/makesrna/intern/CMakeLists.txt | 2 +- source/blender/makesrna/intern/Makefile | 4 +- source/blender/makesrna/intern/SConscript | 3 +- source/blender/makesrna/intern/makesrna.c | 48 +++++------ source/blender/makesrna/intern/rna_ID.c | 9 ++- source/blender/makesrna/intern/rna_access.c | 34 ++++---- source/blender/makesrna/intern/rna_action.c | 6 +- source/blender/makesrna/intern/rna_actuator.c | 2 +- source/blender/makesrna/intern/rna_animation.c | 6 +- source/blender/makesrna/intern/rna_armature.c | 2 +- source/blender/makesrna/intern/rna_brush.c | 2 +- source/blender/makesrna/intern/rna_color.c | 6 +- source/blender/makesrna/intern/rna_constraint.c | 6 +- source/blender/makesrna/intern/rna_context.c | 18 ++--- source/blender/makesrna/intern/rna_controller.c | 2 +- source/blender/makesrna/intern/rna_curve.c | 8 +- source/blender/makesrna/intern/rna_define.c | 33 +++----- source/blender/makesrna/intern/rna_dependency.c | 92 ---------------------- source/blender/makesrna/intern/rna_fluidsim.c | 4 +- source/blender/makesrna/intern/rna_image.c | 14 ++-- .../blender/makesrna/intern/rna_internal_types.h | 4 +- source/blender/makesrna/intern/rna_key.c | 7 +- source/blender/makesrna/intern/rna_lamp.c | 4 +- source/blender/makesrna/intern/rna_lattice.c | 8 +- source/blender/makesrna/intern/rna_main.c | 2 +- source/blender/makesrna/intern/rna_material.c | 4 +- source/blender/makesrna/intern/rna_mesh.c | 10 +-- source/blender/makesrna/intern/rna_meta.c | 4 +- source/blender/makesrna/intern/rna_modifier.c | 4 +- source/blender/makesrna/intern/rna_nodetree.c | 2 +- source/blender/makesrna/intern/rna_object.c | 34 ++++---- source/blender/makesrna/intern/rna_packedfile.c | 2 +- source/blender/makesrna/intern/rna_particle.c | 4 +- source/blender/makesrna/intern/rna_pose.c | 22 +++--- source/blender/makesrna/intern/rna_property.c | 4 +- source/blender/makesrna/intern/rna_rna.c | 58 +++++++------- source/blender/makesrna/intern/rna_scene.c | 10 +-- source/blender/makesrna/intern/rna_sensor.c | 8 +- source/blender/makesrna/intern/rna_sequence.c | 30 +++---- source/blender/makesrna/intern/rna_space.c | 3 +- source/blender/makesrna/intern/rna_text.c | 24 +++--- source/blender/makesrna/intern/rna_vfont.c | 2 +- source/blender/makesrna/intern/rna_wm.c | 2 +- source/blender/makesrna/intern/rna_world.c | 2 +- 46 files changed, 232 insertions(+), 343 deletions(-) delete mode 100644 source/blender/makesrna/intern/rna_dependency.c diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index 406b8f894ba..c8a189367b5 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -119,6 +119,7 @@ void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, co void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname); void RNA_def_property_flag(PropertyRNA *prop, int flag); +void RNA_def_property_clear_flag(PropertyRNA *prop, int flag); void RNA_def_property_array(PropertyRNA *prop, int arraylength); void RNA_def_property_range(PropertyRNA *prop, double min, double max); diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 7f59164fe59..c3dcf4040ea 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -79,28 +79,13 @@ typedef enum PropertyFlag { /* editable means the property is editable in the user * interface, properties are editable by default except * for pointers and collections. */ - PROP_NOT_EDITABLE = 1, + PROP_EDITABLE = 1, /* animateable means the property can be driven by some * other input, be it animation curves, expressions, .. * properties are animateable by default except for pointers * and collections */ - PROP_NOT_ANIMATEABLE = 2, - -#if 0 - /* for pointers and collections, means that the struct - * depends on the data pointed to for evaluation, such - * that a change in the data pointed to will affect the - * evaluated result of this struct. */ - PROP_EVALUATE_DEPENDENCY = 8, - PROP_INVERSE_EVALUATE_DEPENDENCY = 16, - - /* for pointers and collections, means that the struct - * requires the data pointed to for rendering in the, - * be it the render engine or viewport */ - PROP_RENDER_DEPENDENCY = 32, - PROP_INVERSE_RENDER_DEPENDENCY = 64, -#endif + PROP_ANIMATEABLE = 2, /* internal flags */ PROP_BUILTIN = 128, diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 55b9b79d334..934e009eebc 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -98,7 +98,7 @@ ADD_CUSTOM_COMMAND( ) # Build bf_rna -SET(SRC rna_access.c rna_dependency.c ${GENSRC}) +SET(SRC rna_access.c ${GENSRC}) BLENDERLIB(bf_rna "${SRC}" "${INC}") MESSAGE(STATUS "Configuring makesrna") diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile index bb06bc51336..070f6f264bd 100644 --- a/source/blender/makesrna/intern/Makefile +++ b/source/blender/makesrna/intern/Makefile @@ -26,7 +26,7 @@ LIBNAME = rna DIR = $(OCGDIR)/blender/makesrna ALLRNA = $(wildcard rna_*.c) -DEFRNA = $(filter-out %rna_define.c, $(filter-out %rna_dependency.c, $(filter-out %rna_access.c, $(ALLRNA)))) +DEFRNA = $(filter-out %rna_define.c, $(filter-out %rna_access.c, $(ALLRNA))) GENSRCS = $(patsubst rna_%.c, rna_%_gen.c, $(DEFRNA)) GENTARGET = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.c, $(GENSRCS)) @@ -34,7 +34,7 @@ GENTARGET = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.c, $(GENSRCS)) MAKESRCS = $(DEFRNA) makesrna.c rna_define.c MAKEOBJS = $(patsubst %.c, $(DIR)/$(DEBUG_DIR)%.o, $(MAKESRCS)) -CSRCS = $(GENSRCS) rna_access.c rna_dependency.c +CSRCS = $(GENSRCS) rna_access.c include nan_compile.mk diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 330153f0a7f..489bce13dec 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -12,7 +12,6 @@ source_files = env.Glob('*.c') # making rna_access.c part of both makesrna and blender seems to # give conflict, how to solve? source_files.remove('rna_access.c') -source_files.remove('rna_dependency.c') generated_files = source_files[:] generated_files.remove('rna_define.c') @@ -87,7 +86,7 @@ else: rna.Command (generated_files, '', root_build_dir+os.sep+"makesrna.exe " + build_dir) -obj = ['intern/rna_access.c', 'intern/rna_dependency.c'] +obj = ['intern/rna_access.c'] for generated_file in generated_files: obj += ['intern/' + generated_file] diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 76f045464dd..d30a923fd65 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -261,9 +261,9 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; rna_print_data_get(f, dp); if(dp->dnapointerlevel == 0) - fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n", (char*)pprop->structtype, dp->dnaname); + fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n", (char*)pprop->type, dp->dnaname); else - fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n", (char*)pprop->structtype, dp->dnaname); + fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n", (char*)pprop->type, dp->dnaname); } fprintf(f, "}\n\n"); break; @@ -277,7 +277,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr if(strcmp(manualfunc, "rna_iterator_listbase_get") == 0 || strcmp(manualfunc, "rna_iterator_array_get") == 0 || strcmp(manualfunc, "rna_iterator_array_dereference_get") == 0) - fprintf(f, " return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n", (cprop->structtype)? (char*)cprop->structtype: "UnknownType", manualfunc); + fprintf(f, " return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n", (cprop->type)? (char*)cprop->type: "UnknownType", manualfunc); else fprintf(f, " return %s(iter);\n", manualfunc); } @@ -384,12 +384,14 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr char *func; int i; - if(prop->flag & (PROP_IDPROPERTY|PROP_NOT_EDITABLE)) + if(!(prop->flag & PROP_EDITABLE)) + return NULL; + if(prop->flag & PROP_IDPROPERTY) return NULL; if(!manualfunc) { if(!dp->dnastructname || !dp->dnaname) { - if(!(prop->flag & PROP_NOT_EDITABLE)) { + if(prop->flag & PROP_EDITABLE) { fprintf(stderr, "rna_def_property_set_func: %s.%s has no valid dna info.\n", srna->identifier, prop->identifier); DefRNA.error= 1; } @@ -732,8 +734,8 @@ static void rna_def_property_funcs(FILE *f, PropertyDefRNA *dp) pprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (char*)pprop->get); pprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (char*)pprop->set); - if(!pprop->structtype && !pprop->get) { - fprintf(stderr, "rna_def_property_funcs: %s.%s, pointer must have either type function or fixed type.\n", srna->identifier, prop->identifier); + if(!pprop->type) { + fprintf(stderr, "rna_def_property_funcs: %s.%s, pointer must have a struct type.\n", srna->identifier, prop->identifier); DefRNA.error= 1; } break; @@ -764,8 +766,8 @@ static void rna_def_property_funcs(FILE *f, PropertyDefRNA *dp) DefRNA.error= 1; } } - if(!cprop->structtype && !cprop->get) { - fprintf(stderr, "rna_def_property_funcs: %s.%s, collection must have either type function or fixed type.\n", srna->identifier, prop->identifier); + if(!cprop->type) { + fprintf(stderr, "rna_def_property_funcs: %s.%s, collection must have a struct type.\n", srna->identifier, prop->identifier); DefRNA.error= 1; } break; @@ -924,8 +926,8 @@ static void rna_def_property_funcs_header_cpp(FILE *f, PropertyDefRNA *dp) case PROP_POINTER: { PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop; - if(pprop->structtype) - fprintf(f, "\t%s %s(void);", (char*)pprop->structtype, prop->identifier); + if(pprop->type) + fprintf(f, "\t%s %s(void);", (char*)pprop->type, prop->identifier); else fprintf(f, "\t%s %s(void);", "UnknownType", prop->identifier); break; @@ -933,8 +935,8 @@ static void rna_def_property_funcs_header_cpp(FILE *f, PropertyDefRNA *dp) case PROP_COLLECTION: { CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop; - if(cprop->structtype) - fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->structtype, srna->identifier, prop->identifier); + if(cprop->type) + fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->type, srna->identifier, prop->identifier); else fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier); break; @@ -989,8 +991,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, PropertyDefRNA *dp) case PROP_POINTER: { PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop; - if(pprop->structtype) - fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (char*)pprop->structtype, srna->identifier, prop->identifier); + if(pprop->type) + fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (char*)pprop->type, srna->identifier, prop->identifier); else fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier); break; @@ -998,8 +1000,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, PropertyDefRNA *dp) case PROP_COLLECTION: { /*CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop; - if(cprop->structtype) - fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->structtype, srna->identifier, prop->identifier); + if(cprop->type) + fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (char*)cprop->type, srna->identifier, prop->identifier); else fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier);*/ break; @@ -1038,14 +1040,14 @@ static void rna_auto_types() if(dp->prop->type == PROP_POINTER) { PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop; - if(!pprop->structtype && !pprop->get) - pprop->structtype= (StructRNA*)rna_find_type(dp->dnatype); + if(!pprop->type && !pprop->get) + pprop->type= (StructRNA*)rna_find_type(dp->dnatype); } else if(dp->prop->type== PROP_COLLECTION) { CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop; - if(!cprop->structtype && !cprop->get && strcmp(dp->dnatype, "ListBase")==0) - cprop->structtype= (StructRNA*)rna_find_type(dp->dnatype); + if(!cprop->type && !cprop->get && strcmp(dp->dnatype, "ListBase")==0) + cprop->type= (StructRNA*)rna_find_type(dp->dnatype); } } } @@ -1327,14 +1329,14 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f) case PROP_POINTER: { PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; fprintf(f, "\t%s, %s, ", rna_function_string(pprop->get), rna_function_string(pprop->set)); - if(pprop->structtype) fprintf(f, "&RNA_%s\n", (char*)pprop->structtype); + if(pprop->type) fprintf(f, "&RNA_%s\n", (char*)pprop->type); else fprintf(f, "NULL\n"); break; } case PROP_COLLECTION: { CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, ", rna_function_string(cprop->begin), rna_function_string(cprop->next), rna_function_string(cprop->end), rna_function_string(cprop->get), rna_function_string(cprop->length), rna_function_string(cprop->lookupint), rna_function_string(cprop->lookupstring)); - if(cprop->structtype) fprintf(f, "&RNA_%s\n", (char*)cprop->structtype); + if(cprop->type) fprintf(f, "&RNA_%s\n", (char*)cprop->type); else fprintf(f, "NULL\n"); break; } diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 23d7a5f2e64..5955f16f916 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -146,7 +146,8 @@ static void rna_def_ID_properties(BlenderRNA *brna) /* IDP_GROUP */ prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_EXPORT|PROP_NOT_EDITABLE|PROP_IDPROPERTY); + RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "IDPropertyGroup"); prop= RNA_def_property(srna, "collection", PROP_COLLECTION, PROP_NONE); @@ -180,7 +181,7 @@ static void rna_def_ID(BlenderRNA *brna) prop= RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "us"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Users", "Number of times this datablock is referenced."); prop= RNA_def_property(srna, "fake_user", PROP_BOOLEAN, PROP_NONE); @@ -190,7 +191,7 @@ static void rna_def_ID(BlenderRNA *brna) prop= RNA_def_property(srna, "library", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "lib"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Library", "Library file the datablock is linked from."); } @@ -204,7 +205,7 @@ static void rna_def_library(BlenderRNA *brna) prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Filename", "Path to the library .blend file."); } void RNA_def_ID(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 55e3ae28342..35eb0cef667 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -462,8 +462,8 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop) rna_idproperty_check(&prop, ptr); pprop= (PointerPropertyRNA*)prop; - if(pprop->structtype) - return pprop->structtype; + if(pprop->type) + return pprop->type; return &RNA_UnknownType; } @@ -545,7 +545,7 @@ int RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop) else flag= prop->flag; - return !(flag & PROP_NOT_EDITABLE); + return (flag & PROP_EDITABLE); } int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop) @@ -554,7 +554,7 @@ int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop) rna_idproperty_check(&prop, ptr); - if(prop->flag & PROP_NOT_ANIMATEABLE) + if(!(prop->flag & PROP_ANIMATEABLE)) return 0; if(prop->editable) @@ -562,7 +562,7 @@ int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop) else flag= prop->flag; - return !(flag & PROP_NOT_EDITABLE); + return (flag & PROP_EDITABLE); } int RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop) @@ -606,7 +606,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value) IDP_Int(idprop)= value; else if(bprop->set) bprop->set(ptr, value); - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -662,7 +662,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in RNA_property_boolean_set(ptr, prop, values[0]); else if(bprop->setarray) bprop->setarray(ptr, values); - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -709,7 +709,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value) IDP_Int(idprop)= value; else if(iprop->set) iprop->set(ptr, value); - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -765,7 +765,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v RNA_property_int_set(ptr, prop, values[0]); else if(iprop->setarray) iprop->setarray(ptr, values); - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -821,7 +821,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value) else if(fprop->set) { fprop->set(ptr, value); } - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -890,7 +890,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa else if(fprop->setarray) { fprop->setarray(ptr, values); } - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -967,7 +967,7 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val IDP_AssignString(idprop, (char*)value); else if(sprop->set) sprop->set(ptr, value); - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -1003,7 +1003,7 @@ void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value) else if(eprop->set) { eprop->set(ptr, value); } - else if(!(prop->flag & PROP_NOT_EDITABLE)) { + else if(prop->flag & PROP_EDITABLE) { IDPropertyTemplate val; IDProperty *group; @@ -1024,7 +1024,7 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop) pprop= (PointerPropertyRNA*)prop; /* for groups, data is idprop itself */ - return rna_pointer_inherit_refine(ptr, pprop->structtype, idprop); + return rna_pointer_inherit_refine(ptr, pprop->type, idprop); } else if(pprop->get) { return pprop->get(ptr); @@ -1070,8 +1070,8 @@ static void rna_property_collection_get_idp(CollectionPropertyIterator *iter) CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)iter->prop; iter->ptr.data= rna_iterator_array_get(iter); - iter->ptr.type= cprop->structtype; - rna_pointer_inherit_id(cprop->structtype, &iter->parent, &iter->ptr); + iter->ptr.type= cprop->type; + rna_pointer_inherit_id(cprop->type, &iter->parent, &iter->ptr); } void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, CollectionPropertyIterator *iter) @@ -1186,7 +1186,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; r_ptr->data= IDP_GetIndexArray(idprop, idprop->len-1); - r_ptr->type= cprop->structtype; + r_ptr->type= cprop->type; rna_pointer_inherit_id(NULL, ptr, r_ptr); } else diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 22305383e48..6cb38ed9cdc 100755 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -139,7 +139,7 @@ void rna_def_channeldriver(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Driver Object", "Object that controls this Driver."); prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Driver_RnaPath_get", "rna_Driver_RnaPath_length", "rna_Driver_RnaPath_set"); RNA_def_property_ui_text(prop, "Driver RNA Path", "RNA Path (from Driver Object) to property used as Driver."); @@ -174,12 +174,12 @@ void rna_def_fcurve(BlenderRNA *brna) /* Pointers */ prop= RNA_def_property(srna, "driver", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // xxx? + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // xxx? RNA_def_property_ui_text(prop, "Driver", "Channel Driver (only set for Driver F-Curves)"); /* Path + Array Index */ prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_FCurve_RnaPath_get", "rna_FCurve_RnaPath_length", "rna_FCurve_RnaPath_set"); RNA_def_property_ui_text(prop, "RNA Path", "RNA Path to property affected by F-Curve."); diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 4ed4fe1d72e..531ae1e2790 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -71,7 +71,7 @@ void RNA_def_actuator(BlenderRNA *brna) /* type is not editable, would need to do proper data free/alloc */ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, actuator_type_items); RNA_def_property_ui_text(prop, "Type", ""); diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 95091741db4..cee220407e6 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -106,7 +106,7 @@ void rna_def_keyingset_path(BlenderRNA *brna) /* Path + Array Index */ prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_ksPath_RnaPath_get", "rna_ksPath_RnaPath_length", "rna_ksPath_RnaPath_set"); RNA_def_property_ui_text(prop, "RNA Path", "RNA Path to property setting."); @@ -140,7 +140,7 @@ void rna_def_keyingset(BlenderRNA *brna) /* Flags */ prop= RNA_def_property(srna, "builtin", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_BUILTIN); RNA_def_property_ui_text(prop, "Built-In", "Keying Set is a built-in to Blender."); @@ -169,7 +169,7 @@ void rna_def_animdata_common(StructRNA *srna) prop= RNA_def_property(srna, "animation_data", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "adt"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Animation Data", "Animation data for this datablock."); } diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 5c5457ceb84..0ab97a2e3df 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -126,7 +126,7 @@ static void rna_def_bone(BlenderRNA *brna) /* strings */ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* must be unique */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* must be unique */ RNA_def_property_ui_text(prop, "Name", ""); RNA_def_struct_name_property(srna, prop); diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index d21c79fbe52..9f5b3ba3af7 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -198,7 +198,7 @@ void rna_def_brush(BlenderRNA *brna) /* 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_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_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); diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 1009859798d..f36f2b51bbc 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -133,13 +133,13 @@ static void rna_def_curvemappoint(BlenderRNA *brna) prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_sdna(prop, NULL, "x"); RNA_def_property_array(prop, 2); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Location", "X/Y coordinates of the curve point."); prop= RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, prop_handle_type_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Handle Type", "Curve interpolation at this point: bezier or vector."); prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); @@ -165,7 +165,7 @@ static void rna_def_curvemap(BlenderRNA *brna) prop= RNA_def_property(srna, "extend", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); RNA_def_property_enum_items(prop, prop_extend_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Extend", "Extrapolate the curve or extend it horizontally."); prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 7cb57053272..25bb2ec6420 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -187,7 +187,7 @@ static void rna_def_constraint_python(BlenderRNA *brna) prop= RNA_def_property(srna, "script_error", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PYCON_SCRIPTERROR); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Script Error", "The linked Python script has thrown an error."); } @@ -1187,7 +1187,7 @@ void RNA_def_constraint(BlenderRNA *brna) /* enums */ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, type_items); RNA_def_property_ui_text(prop, "Type", ""); @@ -1200,7 +1200,7 @@ void RNA_def_constraint(BlenderRNA *brna) // XXX this is really an internal flag, but it may be useful for some tools to be able to access this... prop= RNA_def_property(srna, "disabled", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DISABLE); RNA_def_property_ui_text(prop, "Disabled", "Constraint has invalid settings and will not be evaluated."); diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c index 3b1ebe5a72f..d3089917649 100644 --- a/source/blender/makesrna/intern/rna_context.c +++ b/source/blender/makesrna/intern/rna_context.c @@ -100,48 +100,48 @@ void RNA_def_context(BlenderRNA *brna) /* WM */ prop= RNA_def_property(srna, "manager", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "WindowManager"); RNA_def_property_pointer_funcs(prop, "rna_Context_manager_get", NULL); /* prop= RNA_def_property(srna, "window", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Window"); RNA_def_property_pointer_funcs(prop, "rna_Context_window_get", NULL); */ prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Screen"); RNA_def_property_pointer_funcs(prop, "rna_Context_screen_get", NULL); prop= RNA_def_property(srna, "area", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Area"); RNA_def_property_pointer_funcs(prop, "rna_Context_area_get", NULL); prop= RNA_def_property(srna, "space_data", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Space"); RNA_def_property_pointer_funcs(prop, "rna_Context_space_data_get", NULL); prop= RNA_def_property(srna, "region", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Region"); RNA_def_property_pointer_funcs(prop, "rna_Context_region_get", NULL); /*prop= RNA_def_property(srna, "region_data", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "RegionData"); RNA_def_property_pointer_funcs(prop, "rna_Context_region_data_get", NULL);*/ /* Data */ prop= RNA_def_property(srna, "main", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Main"); RNA_def_property_pointer_funcs(prop, "rna_Context_main_get", NULL); prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Scene"); RNA_def_property_pointer_funcs(prop, "rna_Context_scene_get", NULL); } diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c index c08233b9584..1c2e5ecee02 100644 --- a/source/blender/makesrna/intern/rna_controller.c +++ b/source/blender/makesrna/intern/rna_controller.c @@ -88,7 +88,7 @@ void RNA_def_controller(BlenderRNA *brna) /* type is not editable, would need to do proper data free/alloc */ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, controller_type_items); RNA_def_property_ui_text(prop, "Type", ""); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 4a422cecbd7..44fd6a84b8b 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -90,7 +90,7 @@ static void rna_BezTriple_ctrlpoint_set(PointerRNA *ptr, const float *values) static int rna_Curve_texspace_editable(PointerRNA *ptr) { Curve *cu= (Curve*)ptr->data; - return (cu->texflag & CU_AUTOSPACE)? PROP_NOT_EDITABLE: 0; + return (cu->texflag & CU_AUTOSPACE)? 0: PROP_EDITABLE; } #else @@ -132,7 +132,7 @@ static void rna_def_bpoint(BlenderRNA *brna) prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "radius"); /*RNA_def_property_range(prop, 0.0f, 1.0f);*/ - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling"); } @@ -187,7 +187,7 @@ static void rna_def_beztriple(BlenderRNA *brna) prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ipo"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, prop_mode_interpolation_items); RNA_def_property_ui_text(prop, "Interpolation", "(For F-Curves Only) Interpolation to use for segment of curve starting from current BezTriple."); @@ -220,7 +220,7 @@ static void rna_def_beztriple(BlenderRNA *brna) prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "radius"); /*RNA_def_property_range(prop, 0.0f, 1.0f);*/ - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling"); } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 97edd202dbe..b08c4aeaed4 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -403,12 +403,11 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char * cprop->begin= rna_builtin_properties_begin; cprop->next= rna_builtin_properties_next; cprop->get= rna_builtin_properties_get; - cprop->structtype= &RNA_Property; + cprop->type= &RNA_Property; #endif } prop= RNA_def_property(srna, "rna_type", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_ui_text(prop, "RNA", "RNA type definition."); if(DefRNA.preprocess) { @@ -419,7 +418,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char * #ifdef RNA_RUNTIME PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; pprop->get= rna_builtin_type_get; - pprop->structtype= &RNA_Struct; + pprop->type= &RNA_Struct; #endif } } @@ -625,8 +624,8 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type, prop->name= identifier; prop->description= ""; - if(type == PROP_COLLECTION || type == PROP_POINTER) - prop->flag= PROP_NOT_EDITABLE|PROP_NOT_ANIMATEABLE; + if(type != PROP_COLLECTION && type != PROP_POINTER) + prop->flag= PROP_EDITABLE|PROP_ANIMATEABLE; if(DefRNA.preprocess) { switch(type) { @@ -680,20 +679,12 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type, void RNA_def_property_flag(PropertyRNA *prop, int flag) { -#if 0 - StructRNA *srna; -#endif - prop->flag |= flag; +} -#if 0 - if(prop->type != PROP_POINTER && prop->type != PROP_COLLECTION) { - if(flag & (PROP_EVALUATE_DEPENDENCY|PROP_INVERSE_EVALUATE_DEPENDENCY|PROP_RENDER_DEPENDENCY|PROP_INVERSE_RENDER_DEPENDENCY)) { - fprintf(stderr, "RNA_def_property_flag: %s.%s, only pointer and collection types can create dependencies.\n", ds->srna->identifier, prop->identifier); - DefRNA.error= 1; - } - } -#endif +void RNA_def_property_clear_flag(PropertyRNA *prop, int flag) +{ + prop->flag &= ~flag; } void RNA_def_property_array(PropertyRNA *prop, int arraylength) @@ -798,12 +789,12 @@ void RNA_def_property_struct_type(PropertyRNA *prop, const char *type) switch(prop->type) { case PROP_POINTER: { PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; - pprop->structtype = (StructRNA*)type; + pprop->type = (StructRNA*)type; break; } case PROP_COLLECTION: { CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; - cprop->structtype = (StructRNA*)type; + cprop->type = (StructRNA*)type; break; } default: @@ -825,12 +816,12 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type) switch(prop->type) { case PROP_POINTER: { PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; - pprop->structtype = type; + pprop->type = type; break; } case PROP_COLLECTION: { CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; - cprop->structtype = type; + cprop->type = type; break; } default: diff --git a/source/blender/makesrna/intern/rna_dependency.c b/source/blender/makesrna/intern/rna_dependency.c deleted file mode 100644 index d867d2f7768..00000000000 --- a/source/blender/makesrna/intern/rna_dependency.c +++ /dev/null @@ -1,92 +0,0 @@ - -#include -#include -#include - -#include "DNA_scene_types.h" - -#include "RNA_access.h" -#include "RNA_types.h" - -#if 0 -typedef struct RNAGenDeps { - void *udata; - PropDependencyCallback cb; -} RNAGenDeps; - -static void rna_generate_deps(RNAGenDeps *gen, PointerRNA *ptr, PointerRNA *idptr) -{ - PropertyRNA *prop; - PointerRNA pptr; - CollectionPropertyIterator iter; - - /* traverse recursively into ID struct properties, other - * pointers we potentially add as dependencies */ - - for(prop=ptr->type->properties.first; prop; prop=prop->next) { - if(prop->type == PROP_POINTER) { - RNA_property_pointer_get(ptr, prop, &pptr); - - if(pptr.data && pptr.type) { - if(idptr && (pptr.type->flag & STRUCT_ID)) { - if(prop->flag & PROP_EVALUATE_DEPENDENCY) - gen->cb(gen->udata, ptr, &pptr); - else if(prop->flag & PROP_INVERSE_EVALUATE_DEPENDENCY) - gen->cb(gen->udata, ptr, &pptr); - } - else - rna_generate_deps(gen, &pptr, (idptr)? idptr: &pptr); - } - } - else if(prop->type == PROP_COLLECTION) { - RNA_property_collection_begin(ptr, prop, &iter); - - while(iter.valid) { - RNA_property_collection_get(&pptr, prop, &iter); - - if(pptr.data && pptr.type) { - if(idptr && (pptr.type->flag & STRUCT_ID)) { - if(prop->flag & PROP_EVALUATE_DEPENDENCY) - gen->cb(gen->udata, ptr, &pptr); - else if(prop->flag & PROP_INVERSE_EVALUATE_DEPENDENCY) - gen->cb(gen->udata, ptr, &pptr); - } - else - rna_generate_deps(gen, &pptr, (idptr)? idptr: &pptr); - } - - RNA_property_collection_next(prop, &iter); - } - - RNA_property_collection_end(prop, &iter); - } - } -} - -void RNA_generate_dependencies(PointerRNA *ptr, void *udata, PropDependencyCallback cb) -{ - RNAGenDeps gen; - - gen.udata= udata; - gen.cb= cb; - - rna_generate_deps(&gen, ptr, NULL); -} - -void RNA_test_dependencies_cb(void *udata, PointerRNA *from, PointerRNA *to) -{ - PropertyRNA *prop; - char name[256], nameto[256]; - - prop= from->type? from->type->nameproperty: NULL; - if(prop) RNA_property_string_get(prop, from, name); - else strcpy(name, "unknown"); - - prop= from->type? from->type->nameproperty: NULL; - if(prop) RNA_property_string_get(prop, to, nameto); - else strcpy(nameto, "unknown"); - - printf("%s (%s) -> %s (%s)\n", name, from->type->identifier, nameto, to->type->identifier); -} -#endif - diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index 89431604006..5b46861917c 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -413,13 +413,13 @@ void RNA_def_fluidsim(BlenderRNA *brna) prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "type", OB_FLUIDSIM_ENABLE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // needs to create modifier + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // needs to create modifier RNA_def_property_ui_text(prop, "Enabled", "Sets object to participate in fluid simulation."); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, prop_fluid_type_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // needs to update variables + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // needs to update variables RNA_def_property_ui_text(prop, "Type", "Type of participation in the fluid simulation."); //prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 3ea26f198e9..2e8659fd881 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -75,12 +75,12 @@ static void rna_def_imageuser(BlenderRNA *brna) prop= RNA_def_property(srna, "multilayer_layer", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "layer"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* image_multi_cb */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* image_multi_cb */ RNA_def_property_ui_text(prop, "Layer", "Layer in multilayer image."); prop= RNA_def_property(srna, "multilayer_pass", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "pass"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* image_multi_cb */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* image_multi_cb */ RNA_def_property_ui_text(prop, "Pass", "Pass in multilayer image."); } @@ -116,17 +116,17 @@ static void rna_def_image(BlenderRNA *brna) prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* imagechanged */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* imagechanged */ RNA_def_property_ui_text(prop, "Filename", "Image/Movie file name."); prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_source_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* imagechanged */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* imagechanged */ RNA_def_property_ui_text(prop, "Source", "Where the image comes from."); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_type_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* imagechanged */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* imagechanged */ RNA_def_property_ui_text(prop, "Type", "How to generate the image."); prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE); @@ -179,7 +179,7 @@ static void rna_def_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this image, does not affect rendering."); prop= RNA_def_property(srna, "animated", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* B_TWINANIM */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* B_TWINANIM */ RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TWINANIM); RNA_def_property_ui_text(prop, "Animated", "Use as animated texture in the game engine."); @@ -199,7 +199,7 @@ static void rna_def_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second."); prop= RNA_def_property(srna, "tiles", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* B_SIMAGETILE */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* B_SIMAGETILE */ RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TILES); RNA_def_property_ui_text(prop, "Tiles", "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)."); diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 0c2eedff564..f8dd33c9df4 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -186,7 +186,7 @@ typedef struct PointerPropertyRNA { PropPointerGetFunc get; PropPointerSetFunc set; - struct StructRNA *structtype; + struct StructRNA *type; } PointerPropertyRNA; typedef struct CollectionPropertyRNA { @@ -200,7 +200,7 @@ typedef struct CollectionPropertyRNA { PropCollectionLookupIntFunc lookupint; /* optional */ PropCollectionLookupStringFunc lookupstring; /* optional */ - struct StructRNA *structtype; + struct StructRNA *type; } CollectionPropertyRNA; diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 753bd21d7b8..feda1448c8b 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -292,7 +292,7 @@ static void rna_def_keyblock(BlenderRNA *brna) /* keys need to be sorted to edit this */ prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_float_sdna(prop, NULL, "pos"); RNA_def_property_ui_text(prop, "Frame", "Frame for absolute keys."); @@ -311,7 +311,7 @@ static void rna_def_keyblock(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Vertex Group", "Vertex weight group, to blend with basis shape."); prop= RNA_def_property(srna, "relative_key", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "ShapeKey"); RNA_def_property_ui_text(prop, "Relative Key", "Shape used as a relative key."); RNA_def_property_pointer_funcs(prop, "rna_ShapeKey_relative_key_get", NULL); @@ -332,6 +332,7 @@ static void rna_def_keyblock(BlenderRNA *brna) prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "data", "totelem"); + RNA_def_property_struct_type(prop, "UnknownType"); RNA_def_property_ui_text(prop, "Data", ""); RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", 0, 0, "rna_ShapeKey_data_get", "rna_ShapeKey_data_length", 0, 0); } @@ -345,7 +346,7 @@ static void rna_def_key(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Key", "Shape keys datablock containing different shapes of geometric datablocks."); prop= RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NEVER_NULL); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_sdna(prop, NULL, "refkey"); RNA_def_property_ui_text(prop, "Reference Key", ""); diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 80b7658c6ef..202d1af9154 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -311,7 +311,7 @@ static void rna_def_lamp(BlenderRNA *brna) /* script link */ prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "scriptlink"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this lamp."); } @@ -328,7 +328,7 @@ static void rna_def_lamp_falloff(StructRNA *srna) {0, NULL, NULL, NULL}}; prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* needs to be able to create curve mapping */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* needs to be able to create curve mapping */ RNA_def_property_enum_items(prop, prop_fallofftype_items); RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL); diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index d18142b3fcd..c479e66c08b 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -89,7 +89,7 @@ static void rna_def_latticepoint(BlenderRNA *brna) prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR); RNA_def_property_array(prop, 3); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_float_funcs(prop, "rna_LatticePoint_co_get", NULL, NULL); RNA_def_property_ui_text(prop, "Location", ""); @@ -120,17 +120,17 @@ static void rna_def_lattice(BlenderRNA *brna) prop= RNA_def_property(srna, "points_u", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pntsu"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "U", "Points in U direction."); prop= RNA_def_property(srna, "points_v", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pntsv"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "V", "Points in V direction."); prop= RNA_def_property(srna, "points_w", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pntsw"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "W", "Points in W direction."); prop= RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 39fc1dbc5ad..03ce385be32 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -252,7 +252,7 @@ void RNA_def_main(BlenderRNA *brna) prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_maxlength(prop, 240); RNA_def_property_string_funcs(prop, "rna_Main_filename_get", "rna_Main_filename_length", "rna_Main_filename_set"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file."); for(i=0; lists[i][0]; i++) diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 6054d4e6a42..34a7ea7d1e9 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -923,7 +923,7 @@ void RNA_def_material(BlenderRNA *brna) prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "scriptlink"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this material."); /* XXX: does Material.septex get RNA? */ @@ -952,7 +952,7 @@ void rna_def_mtex_common(StructRNA *srna, const char *begin, const char *activeg RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures."); prop= RNA_def_property(srna, "active_texture", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, structname); RNA_def_property_pointer_funcs(prop, activeget, NULL); RNA_def_property_ui_text(prop, "Active Texture", "Active texture slot being displayed."); diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 46a2fcf998a..d5caf57165f 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -155,7 +155,7 @@ static void rna_MeshColor_color4_set(PointerRNA *ptr, const float *values) static int rna_Mesh_texspace_editable(PointerRNA *ptr) { Mesh *me= (Mesh*)ptr->data; - return (me->texflag & AUTOSPACE)? PROP_NOT_EDITABLE: 0; + return (me->texflag & AUTOSPACE)? 0: PROP_EDITABLE; } static void rna_MeshVertex_groups_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) @@ -482,7 +482,7 @@ static void rna_def_mvert_group(BlenderRNA *brna) * there is no unique group to point to, hence the index */ prop= RNA_def_property(srna, "group", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "def_nr"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Group Index", ""); prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE); @@ -505,7 +505,7 @@ static void rna_def_mvert(BlenderRNA *brna) /*prop= RNA_def_property(srna, "no", PROP_FLOAT, PROP_VECTOR); RNA_def_property_float_funcs(prop, "rna_MeshVertex_no_get", NULL, NULL); RNA_def_property_ui_text(prop, "Normal", "Vertex Normal"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE);*/ + RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/ prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); @@ -537,7 +537,7 @@ static void rna_def_medge(BlenderRNA *brna) prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "v1"); RNA_def_property_array(prop, 2); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Vertices", "Vertex indices"); prop= RNA_def_property(srna, "crease", PROP_FLOAT, PROP_NONE); @@ -577,7 +577,7 @@ static void rna_def_mface(BlenderRNA *brna) prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "v1"); RNA_def_property_array(prop, 4); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Vertices", "Vertex indices"); prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED); diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 5107ed0df70..737bb52a466 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -37,7 +37,7 @@ static int rna_Meta_texspace_editable(PointerRNA *ptr) { MetaBall *mb= (MetaBall*)ptr->data; - return (mb->texflag & AUTOSPACE)? PROP_NOT_EDITABLE: 0; + return (mb->texflag & AUTOSPACE)? 0: PROP_EDITABLE; } #else @@ -60,7 +60,7 @@ void rna_def_metaelement(BlenderRNA *brna) /* enums */ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Type", "Metaball types."); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 0284d428939..5c609550d3f 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -471,7 +471,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna) prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "faceCount"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Face Count", "The current number of faces in the decimated mesh."); } @@ -1569,7 +1569,7 @@ void RNA_def_modifier(BlenderRNA *brna) /* enums */ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_sdna(prop, NULL, "type"); RNA_def_property_enum_items(prop, type_items); RNA_def_property_ui_text(prop, "Type", ""); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 7ae11d2ef6c..f4effddc7c5 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -116,7 +116,7 @@ static void rna_def_shader_node(BlenderRNA *brna) RNA_def_struct_sdna(srna, "bNode"); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, node_type_items); RNA_def_property_ui_text(prop, "Type", ""); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index e1b24a93605..534f1ea0e98 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -255,7 +255,7 @@ static void rna_def_vertex_group(BlenderRNA *brna) RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_int_funcs(prop, "rna_VertexGroup_index_get", NULL, NULL); RNA_def_property_ui_text(prop, "Index", "Index number of the vertex group."); } @@ -324,7 +324,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "body_type"); RNA_def_property_enum_items(prop, body_type_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // this controls various gameflags + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // this controls various gameflags RNA_def_property_ui_text(prop, "Physics Type", "Selects the type of physical representation."); prop= RNA_def_property(srna, "actor", PROP_BOOLEAN, PROP_NONE); @@ -508,13 +508,13 @@ static StructRNA *rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "parent_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "partype"); RNA_def_property_enum_items(prop, parent_type_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Parent Type", "Type of parent relation."); prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "par1"); RNA_def_property_array(prop, 3); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation."); prop= RNA_def_property(srna, "parent_bone", PROP_STRING, PROP_NONE); @@ -550,7 +550,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Materials", ""); prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + 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."); @@ -704,7 +704,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "draw_keys", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ipoflag", OB_DRAWKEY); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // update ipo flag indirect + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // update ipo flag indirect RNA_def_property_ui_text(prop, "Draw Keys", "Draw object as key positions."); prop= RNA_def_property(srna, "draw_keys_selected", PROP_BOOLEAN, PROP_NONE); @@ -722,22 +722,22 @@ static StructRNA *rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "dupli_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFRAMES); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // clear other flags + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // clear other flags RNA_def_property_ui_text(prop, "Dupli Frames", "Make copy of object for every frame."); prop= RNA_def_property(srna, "dupli_verts", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIVERTS); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // clear other flags + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // clear other flags RNA_def_property_ui_text(prop, "Dupli Verts", "Duplicate child objects on all vertices."); prop= RNA_def_property(srna, "dupli_faces", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFACES); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // clear other flags + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // clear other flags RNA_def_property_ui_text(prop, "Dupli Faces", "Duplicate child objects on all faces."); prop= RNA_def_property(srna, "use_dupli_group", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIGROUP); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // clear other flags + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // clear other flags RNA_def_property_ui_text(prop, "Use Dupli Group", "Enable group instancing."); prop= RNA_def_property(srna, "dupli_frames_no_speed", PROP_BOOLEAN, PROP_NONE); @@ -814,7 +814,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "scriptlink"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object."); /* drawing */ @@ -879,7 +879,7 @@ static StructRNA *rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "pose_mode", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_POSEMODE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Pose Mode", "Object with armature data is in pose mode."); // XXX this stuff should be moved to AnimData... @@ -890,18 +890,18 @@ static StructRNA *rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "nla_collapsed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_NLA_COLLAPSED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "NLA Collapsed", ""); prop= RNA_def_property(srna, "nla_override", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "nlaflag", OB_NLA_OVERRIDE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "NLA Override", ""); prop= RNA_def_property(srna, "nla_strips", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "nlastrips", NULL); RNA_def_property_struct_type(prop, "UnknownType"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "NLA Strips", "NLA strips of the object."); */ @@ -909,12 +909,12 @@ static StructRNA *rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "shape_key_lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_LOCK); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object."); prop= RNA_def_property(srna, "active_shape_key", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "shapenr"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key index."); return srna; diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c index 5645765ed83..6b9a708f555 100644 --- a/source/blender/makesrna/intern/rna_packedfile.c +++ b/source/blender/makesrna/intern/rna_packedfile.c @@ -43,7 +43,7 @@ void RNA_def_packedfile(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Packed File", "External file packed into the .blend file."); prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Size", "Size of packed file in bytes."); } diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 1e5ccfd9750..7a17dbd22ff 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -299,7 +299,7 @@ static void rna_def_particle_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Alive State", ""); prop= RNA_def_property(srna, "loop", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); //TODO: bounds RNA_def_property_ui_text(prop, "Loop", "How may times the particle life has looped"); @@ -1173,7 +1173,7 @@ static void rna_def_particlesettings(BlenderRNA *brna) #if 0 prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_sdna(prop, NULL, "ipo"); RNA_def_property_struct_type(prop, "Ipo"); RNA_def_property_ui_text(prop, "Ipo", ""); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index dbaf4279884..f7964ba52ef 100755 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -73,7 +73,7 @@ static void rna_def_pose_channel(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Constraints", "Constraints that act on this PoseChannel."); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Name", ""); RNA_def_struct_name_property(srna, prop); @@ -112,27 +112,27 @@ static void rna_def_pose_channel(BlenderRNA *brna) prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pathsf"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Bone Paths Calculation Start Frame", "Starting frame of range of frames to use for Bone Path calculations."); prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "pathef"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Bone Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations."); prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "Bone"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Bone", "Bone associated with this Pose Channel."); prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "PoseChannel"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Parent", "Parent of this pose channel."); prop= RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "PoseChannel"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Child", "Child of this pose channel."); prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR); @@ -164,26 +164,26 @@ static void rna_def_pose_channel(BlenderRNA *brna) /* These three matrix properties await an implementation of the PROP_MATRIX subtype, which currently doesn't exist. */ /* prop= RNA_def_property(srna, "channel_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_struct_type(prop, "chan_mat"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints.");*/ /* kaito says this should be not user-editable; I disagree; power users should be able to force this in python; he's the boss. */ /* prop= RNA_def_property(srna, "pose_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_struct_type(prop, "pose_mat"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Pose Matrix", "Final 4x4 matrix for this channel."); prop= RNA_def_property(srna, "constraint_inverse_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_struct_type(prop, "constinv"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Constraint Inverse Matrix", "4x4 matrix, defines transform from final position to unconstrained position."); */ prop= RNA_def_property(srna, "pose_head", PROP_FLOAT, PROP_VECTOR); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone."); prop= RNA_def_property(srna, "pose_tail", PROP_FLOAT, PROP_VECTOR); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone."); prop= RNA_def_property(srna, "ik_min_limits", PROP_FLOAT, PROP_VECTOR); diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c index 21d8958b665..c38b6342942 100644 --- a/source/blender/makesrna/intern/rna_property.c +++ b/source/blender/makesrna/intern/rna_property.c @@ -89,12 +89,12 @@ void RNA_def_gameproperty(BlenderRNA *brna) RNA_def_struct_refine_func(srna, "rna_GameProperty_refine"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* must be unique */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* must be unique */ RNA_def_property_ui_text(prop, "Name", "Available as as GameObject attributes in the game engines python api"); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, gameproperty_type_items); RNA_def_property_ui_text(prop, "Type", ""); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 44191b72e36..f2e3f27edad 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -437,14 +437,14 @@ static PointerRNA rna_PointerProperty_fixed_type_get(PointerRNA *ptr) { PropertyRNA *prop= (PropertyRNA*)ptr->data; rna_idproperty_check(&prop, ptr); - return rna_pointer_inherit_refine(ptr, &RNA_Struct, ((PointerPropertyRNA*)prop)->structtype); + return rna_pointer_inherit_refine(ptr, &RNA_Struct, ((PointerPropertyRNA*)prop)->type); } static PointerRNA rna_CollectionProperty_fixed_type_get(PointerRNA *ptr) { PropertyRNA *prop= (PropertyRNA*)ptr->data; rna_idproperty_check(&prop, ptr); - return rna_pointer_inherit_refine(ptr, &RNA_Struct, ((CollectionPropertyRNA*)prop)->structtype); + return rna_pointer_inherit_refine(ptr, &RNA_Struct, ((CollectionPropertyRNA*)prop)->type); } /* Blender RNA */ @@ -465,41 +465,41 @@ static void rna_def_struct(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Struct Definition", "RNA structure definition"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Struct_name_get", "rna_Struct_name_length", NULL); RNA_def_property_ui_text(prop, "Name", "Human readable name."); prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Struct_identifier_get", "rna_Struct_identifier_length", NULL); RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting."); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Struct_description_get", "rna_Struct_description_length", NULL); RNA_def_property_ui_text(prop, "Description", "Description of the Struct's purpose."); prop= RNA_def_property(srna, "base", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Struct"); RNA_def_property_pointer_funcs(prop, "rna_Struct_base_get", NULL); RNA_def_property_ui_text(prop, "Base", "Struct definition this is derived from."); prop= RNA_def_property(srna, "nested", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Struct"); RNA_def_property_pointer_funcs(prop, "rna_Struct_nested_get", NULL); RNA_def_property_ui_text(prop, "Nested", "Struct in which this struct is always nested, and to which it logically belongs."); prop= RNA_def_property(srna, "name_property", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "StringProperty"); RNA_def_property_pointer_funcs(prop, "rna_Struct_name_property_get", NULL); RNA_def_property_ui_text(prop, "Name Property", "Property that gives the name of the struct."); prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Property"); RNA_def_property_collection_funcs(prop, "rna_Struct_properties_begin", "rna_Struct_properties_next", "rna_iterator_listbase_end", "rna_Struct_properties_get", 0, 0, 0); RNA_def_property_ui_text(prop, "Properties", "Properties in the struct."); @@ -536,35 +536,35 @@ static void rna_def_property(BlenderRNA *brna) RNA_def_struct_refine_func(srna, "rna_Property_refine"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Property_name_get", "rna_Property_name_length", NULL); RNA_def_property_ui_text(prop, "Name", "Human readable name."); prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Property_identifier_get", "rna_Property_identifier_length", NULL); RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting."); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Property_description_get", "rna_Property_description_length", NULL); RNA_def_property_ui_text(prop, "Description", "Description of the property for tooltips."); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + 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_ui_text(prop, "Type", "Data type of the property."); prop= RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + 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_ui_text(prop, "Subtype", "Semantic interpretation of the property."); prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_boolean_funcs(prop, "rna_Property_editable_get", NULL); RNA_def_property_ui_text(prop, "Editable", "Property is editable through RNA."); } @@ -574,7 +574,7 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type) PropertyRNA *prop; prop= RNA_def_property(srna, "array_length", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_int_funcs(prop, "rna_Property_array_length_get", NULL, NULL); RNA_def_property_ui_text(prop, "Array Length", "Maximum length of the array, 0 means unlimited."); @@ -582,38 +582,38 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type) return; prop= RNA_def_property(srna, "hard_min", type, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_min_get", NULL, NULL); else RNA_def_property_float_funcs(prop, "rna_FloatProperty_hard_min_get", NULL, NULL); RNA_def_property_ui_text(prop, "Hard Minimum", "Minimum value used by buttons."); prop= RNA_def_property(srna, "hard_max", type, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_max_get", NULL, NULL); else RNA_def_property_float_funcs(prop, "rna_FloatProperty_hard_max_get", NULL, NULL); RNA_def_property_ui_text(prop, "Hard Maximum", "Maximum value used by buttons."); prop= RNA_def_property(srna, "soft_min", type, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_min_get", NULL, NULL); else RNA_def_property_float_funcs(prop, "rna_FloatProperty_soft_min_get", NULL, NULL); RNA_def_property_ui_text(prop, "Soft Minimum", "Minimum value used by buttons."); prop= RNA_def_property(srna, "soft_max", type, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_max_get", NULL, NULL); else RNA_def_property_float_funcs(prop, "rna_FloatProperty_soft_max_get", NULL, NULL); RNA_def_property_ui_text(prop, "Soft Maximum", "Maximum value used by buttons."); prop= RNA_def_property(srna, "step", type, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_step_get", NULL, NULL); else RNA_def_property_float_funcs(prop, "rna_FloatProperty_step_get", NULL, NULL); RNA_def_property_ui_text(prop, "Step", "Step size used by number buttons, for floats 1/100th of the step size."); if(type == PROP_FLOAT) { prop= RNA_def_property(srna, "precision", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_int_funcs(prop, "rna_FloatProperty_precision_get", NULL, NULL); RNA_def_property_ui_text(prop, "Precision", "Number of digits after the dot used by buttons."); } @@ -624,7 +624,7 @@ static void rna_def_string_property(StructRNA *srna) PropertyRNA *prop; prop= RNA_def_property(srna, "max_length", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_int_funcs(prop, "rna_StringProperty_max_length_get", NULL, NULL); RNA_def_property_ui_text(prop, "Maximum Length", "Maximum length of the string, 0 means unlimited."); } @@ -634,7 +634,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna) PropertyRNA *prop; prop= RNA_def_property(srna, "items", PROP_COLLECTION, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "EnumPropertyItem"); RNA_def_property_collection_funcs(prop, "rna_EnumProperty_items_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0); RNA_def_property_ui_text(prop, "Items", "Possible values for the property."); @@ -643,18 +643,18 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna) RNA_def_struct_ui_text(srna, "Enum Item Definition", "Definition of a choice in an RNA enum property."); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_name_get", "rna_EnumPropertyItem_name_length", NULL); RNA_def_property_ui_text(prop, "Name", "Human readable name."); prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_identifier_get", "rna_EnumPropertyItem_identifier_length", NULL); RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting."); RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "value", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_int_funcs(prop, "rna_EnumPropertyItem_value_get", NULL, NULL); RNA_def_property_ui_text(prop, "Value", "Value of the item."); } @@ -664,7 +664,7 @@ static void rna_def_pointer_property(StructRNA *srna, PropertyType type) PropertyRNA *prop; prop= RNA_def_property(srna, "fixed_type", PROP_POINTER, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Struct"); if(type == PROP_POINTER) RNA_def_property_pointer_funcs(prop, "rna_PointerProperty_fixed_type_get", NULL); @@ -724,7 +724,7 @@ void RNA_def_rna(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Blender RNA", "Blender RNA structure definitions."); prop= RNA_def_property(srna, "structs", PROP_COLLECTION, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Struct"); RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0); RNA_def_property_ui_text(prop, "Structs", ""); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index ea64ba7362e..7cd65aea2ef 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -455,28 +455,28 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode."); prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_ANIMATEABLE); + RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); RNA_def_property_int_sdna(prop, NULL, "r.cfra"); RNA_def_property_range(prop, MINFRAME, MAXFRAME); RNA_def_property_ui_text(prop, "Current Frame", ""); RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update"); prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_ANIMATEABLE); + RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); RNA_def_property_int_sdna(prop, NULL, "r.sfra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL); RNA_def_property_ui_text(prop, "Start Frame", ""); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_ANIMATEABLE); + RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); RNA_def_property_int_sdna(prop, NULL, "r.efra"); RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL); RNA_def_property_ui_text(prop, "End Frame", ""); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_ANIMATEABLE); + RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); RNA_def_property_int_sdna(prop, NULL, "frame_step"); RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); @@ -509,7 +509,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene."); prop= RNA_def_property(srna, "active_keyingset", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Active Keying Set", "Current Keying Set index."); prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index b8a1a1ade78..6f0897a60ae 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -105,7 +105,7 @@ void rna_def_sensor(BlenderRNA *brna) /* type is not editable, would need to do proper data free/alloc */ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, sensor_type_items); RNA_def_property_ui_text(prop, "Type", ""); @@ -210,18 +210,18 @@ void rna_def_keyboard_sensor(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bKeyboardSensor", "data"); prop= RNA_def_property(srna, "key", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* need better range or enum check */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* need better range or enum check */ RNA_def_property_ui_text(prop, "Key", "Input key code."); RNA_def_property_range(prop, 0, 255); prop= RNA_def_property(srna, "modifier_key", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* need better range or enum check */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* need better range or enum check */ RNA_def_property_int_sdna(prop, NULL, "qual"); RNA_def_property_ui_text(prop, "Modifier Key", "Modifier key code."); RNA_def_property_range(prop, 0, 255); prop= RNA_def_property(srna, "second_modifier_key", PROP_INT, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); /* need better range or enum check */ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* need better range or enum check */ RNA_def_property_int_sdna(prop, NULL, "qual2"); RNA_def_property_ui_text(prop, "Second Modifier Key", "Modifier key code."); RNA_def_property_range(prop, 0, 255); diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c index 18af7913456..302e7623b18 100644 --- a/source/blender/makesrna/intern/rna_sequence.c +++ b/source/blender/makesrna/intern/rna_sequence.c @@ -283,7 +283,7 @@ static void rna_def_sequence(BlenderRNA *brna) RNA_def_struct_name_property(srna, prop); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_enum_items(prop, seq_type_items); RNA_def_property_ui_text(prop, "Type", ""); @@ -320,39 +320,39 @@ static void rna_def_sequence(BlenderRNA *brna) prop= RNA_def_property(srna, "length", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "len"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // computed from other values + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // computed from other values RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied"); prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "start"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap tests + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests RNA_def_property_ui_text(prop, "Start Frame", ""); prop= RNA_def_property(srna, "start_offset", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "startofs"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap tests + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests RNA_def_property_ui_text(prop, "Start Offset", ""); prop= RNA_def_property(srna, "end_offset", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "endofs"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap tests + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests RNA_def_property_ui_text(prop, "End offset", ""); prop= RNA_def_property(srna, "start_still", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "startstill"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap tests + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_text(prop, "Start Still", ""); prop= RNA_def_property(srna, "end_still", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "endstill"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap tests + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_text(prop, "End Still", ""); prop= RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "machine"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap test + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip."); /* blending */ @@ -426,7 +426,7 @@ static void rna_def_filter_video(StructRNA *srna) prop= RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // allocate color balance + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate color balance RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input."); prop= RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE); @@ -435,7 +435,7 @@ static void rna_def_filter_video(StructRNA *srna) prop= RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // allocate transform + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate transform RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing."); prop= RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE); @@ -444,7 +444,7 @@ static void rna_def_filter_video(StructRNA *srna) prop= RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // allocate crop + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate crop RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing."); prop= RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE); @@ -473,7 +473,7 @@ static void rna_def_proxy(StructRNA *srna) prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // allocate proxy + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // allocate proxy RNA_def_property_ui_text(prop, "Use Proxy", "Use a preview proxy for this strip."); prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE); @@ -491,12 +491,12 @@ static void rna_def_input(StructRNA *srna) prop= RNA_def_property(srna, "animation_start_offset", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "anim_startofs"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap test + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)."); prop= RNA_def_property(srna, "animation_end_offset", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "anim_endofs"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // overlap test + RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)."); } @@ -634,7 +634,7 @@ static void rna_def_plugin(BlenderRNA *brna) prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Filename", ""); /* plugin properties need custom wrapping code like ID properties */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0f78846684d..1d281c7d6a2 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -146,7 +146,7 @@ static void rna_def_space(BlenderRNA *brna) prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spacetype"); RNA_def_property_enum_items(prop, type_items); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Type", "Space data type."); } @@ -338,6 +338,7 @@ static void rna_def_space_text(BlenderRNA *brna) /* text */ prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space."); RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set"); RNA_def_property_update(prop, NC_TEXT|ND_CURSOR, NULL); diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index 020ba635e4a..838822119e8 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -127,30 +127,30 @@ static void rna_def_text_marker(BlenderRNA *brna) prop= RNA_def_property(srna, "line", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "lineno"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Line", "Line in which the marker is located."); prop= RNA_def_property(srna, "start", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Start", "Start position of the marker in the line."); prop= RNA_def_property(srna, "end", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "End", "Start position of the marker in the line."); prop= RNA_def_property(srna, "group", PROP_INT, PROP_UNSIGNED); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_range(prop, 0, (int)0xFFFF); RNA_def_property_ui_text(prop, "Group", ""); prop= RNA_def_property(srna, "temporary", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", TMARK_TEMP); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Temporary", "Marker is temporary."); prop= RNA_def_property(srna, "edit_all", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", TMARK_EDITALL); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Edit All", "Edit all markers of the same group as one."); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); @@ -171,12 +171,12 @@ static void rna_def_text(BlenderRNA *brna) prop= RNA_def_property(srna, "dirty", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISDIRTY); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Dirty", "Text file has been edited since last save."); prop= RNA_def_property(srna, "memory", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISMEM); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Memory", "Text file is in memory, without a corresponding file on disk."); prop= RNA_def_property(srna, "lines", PROP_COLLECTION, PROP_NONE); @@ -185,24 +185,24 @@ static void rna_def_text(BlenderRNA *brna) prop= RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "curl"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "TextLine"); RNA_def_property_ui_text(prop, "Current Line", "Current line, and start line of selection if one exists."); prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "curc"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Current Character", "Index of current character in current line, and also start index of character in selection if one exists."); prop= RNA_def_property(srna, "selection_end_line", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "sell"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "TextLine"); RNA_def_property_ui_text(prop, "Selection End Line", "End line of selection."); prop= RNA_def_property(srna, "selection_end_character", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "selc"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Selection End Character", "Index of character after end of selection in the selection end line."); prop= RNA_def_property(srna, "markers", PROP_COLLECTION, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c index ace6e4a6d25..d18b87e73ee 100644 --- a/source/blender/makesrna/intern/rna_vfont.c +++ b/source/blender/makesrna/intern/rna_vfont.c @@ -45,7 +45,7 @@ void RNA_def_vfont(BlenderRNA *brna) RNA_def_struct_sdna(srna, "VFont"); prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_sdna(prop, NULL, "name"); RNA_def_property_ui_text(prop, "Filename", ""); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 69e7578da1a..cabecaaf832 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -87,7 +87,7 @@ static void rna_def_operator(BlenderRNA *brna) RNA_def_struct_sdna(srna, "wmOperator"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Operator_name_get", "rna_Operator_name_length", NULL); RNA_def_property_ui_text(prop, "Name", ""); RNA_def_struct_name_property(srna, prop); diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index 0296361da56..dedc9492d1f 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -411,7 +411,7 @@ void RNA_def_world(BlenderRNA *brna) prop= RNA_def_property(srna, "script_link", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "scriptlink"); - RNA_def_property_flag(prop, PROP_NOT_EDITABLE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Script Link", "Scripts linked to this object."); rna_def_ambient_occlusion(brna); -- cgit v1.2.3