diff options
Diffstat (limited to 'source/blender/makesrna/intern')
21 files changed, 66 insertions, 67 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 4f9032ffc95..a48603e623c 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -24,6 +24,9 @@ # # ***** END GPL LICENSE BLOCK ***** +# this warning on generated files gets annoying +STRING(REGEX REPLACE "-Wunused-parameter" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) + FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c") LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c) diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index cee6b7f854a..9f5308cce33 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -206,7 +206,7 @@ static StructRNA *rna_KeyingSetInfo_register(const bContext *C, ReportList *repo ksi->generate= (have_function[2])? RKS_GEN_rna_internal: NULL; /* add and register with other info as needed */ - ANIM_keyingset_info_register(C, ksi); + ANIM_keyingset_info_register(ksi); /* return the struct-rna added */ return ksi->ext.srna; diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 509fecb0122..cd588b598bd 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -253,7 +253,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *scene, PointerRNA *ptr) for(node=ntree->nodes.first; node; node=node->next) { if (ELEM3(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) { - ED_node_generic_update(bmain, scene, ntree, node); + ED_node_generic_update(bmain, ntree, node); } } } diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index e4726f5e92c..dee12d43144 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1242,10 +1242,16 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Axis Z", "Rotate pivot on Z axis in degrees"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); - /* XXX not sure how to wrap the two 6 element arrays for the generic joint */ - //float minLimit[6]; - //float maxLimit[6]; - + prop= RNA_def_property(srna, "limit_min", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "minLimit"); + RNA_def_property_array(prop, 6); + RNA_def_property_ui_text(prop, "Minimum Limit", ""); + + prop= RNA_def_property(srna, "limit_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "maxLimit"); + RNA_def_property_array(prop, 6); + RNA_def_property_ui_text(prop, "Maximum Limit", ""); + prop= RNA_def_property(srna, "use_linked_collision", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DISABLE_LINKED_COLLISION); RNA_def_property_ui_text(prop, "Disable Linked Collision", "Disable collision between linked bodies"); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 50c21640554..7983b8f8a7f 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1373,7 +1373,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna) prop= RNA_def_property(srna, "use_cyclic_v", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_NURB_CYCLIC); RNA_def_property_ui_text(prop, "Cyclic V", "Make this surface a closed loop in the V direction"); - RNA_def_property_update(prop, 0, "rna_Nurb_update_cyclic_u"); + RNA_def_property_update(prop, 0, "rna_Nurb_update_cyclic_v"); /* Note, endpoint and bezier flags should never be on at the same time! */ diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 1fed1663952..0a8e0bad7f0 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -474,11 +474,12 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna) PropertyRNA *prop, *nextprop; PropertyRNA *parm, *nextparm; + /* if(srna->flag & STRUCT_RUNTIME) { if(RNA_struct_py_type_get(srna)) { fprintf(stderr, "RNA_struct_free '%s' freed while holding a python reference\n", srna->identifier); } - } + } */ for(prop=srna->cont.properties.first; prop; prop=nextprop) { nextprop= prop->next; diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 63405e08f69..23f37f8db8e 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -53,7 +53,7 @@ EnumPropertyItem fmodifier_type_items[] = { {FMODIFIER_TYPE_CYCLES, "CYCLES", 0, "Cycles", ""}, {FMODIFIER_TYPE_NOISE, "NOISE", 0, "Noise", ""}, {FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""}, - {FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""}, + //{FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""}, // FIXME: not implemented yet! {FMODIFIER_TYPE_LIMITS, "LIMITS", 0, "Limits", ""}, {FMODIFIER_TYPE_STEPPED, "STEPPED", 0, "Stepped Interpolation", ""}, {0, NULL, 0, NULL, NULL}}; @@ -542,14 +542,14 @@ static BezTriple *rna_FKeyframe_points_add(FCurve *fcu, float frame, float value index= insert_vert_fcurve(fcu, frame, value, flag); - return index >= 0 ? fcu->bezt + index : NULL; + return ((fcu->bezt) && (index >= 0))? (fcu->bezt + index) : NULL; } static void rna_FKeyframe_points_remove(FCurve *fcu, ReportList *reports, BezTriple *bezt, int do_fast) { int index= (int)(bezt - fcu->bezt); if (index < 0 || index >= fcu->totvert) { - BKE_report(reports, RPT_ERROR, "bezier not in fcurve."); + BKE_report(reports, RPT_ERROR, "Keyframe not in F-Curve."); return; } @@ -1320,7 +1320,7 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop) parm= RNA_def_float(func, "value", 0.0f, -FLT_MAX, FLT_MAX, "", "Y Value of this keyframe point", -FLT_MAX, FLT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); /* optional */ - parm= RNA_def_boolean(func, "replace", 0, "Replace", "Replace existing keyframes"); + parm= RNA_def_boolean(func, "replace", 0, "Replace", "Don't add any new keyframes, but just replace existing ones"); parm= RNA_def_boolean(func, "needed", 0, "Needed", "Only adds keyframes that are needed"); parm= RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe insertion to avoid recalculating the curve each time"); diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 70438ae3d8c..74d61101273 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -41,7 +41,7 @@ #include "BKE_packedFile.h" #include "BKE_main.h" #include "BKE_utildefines.h" -#include "BKE_global.h" /* grr: G.sce */ +#include "BKE_global.h" /* grr: G.main->name */ #include "IMB_imbuf.h" @@ -90,7 +90,7 @@ static void rna_Image_save(Image *image, ReportList *reports) if(ibuf) { char filename[FILE_MAXDIR + FILE_MAXFILE]; BLI_strncpy(filename, image->name, sizeof(filename)); - BLI_path_abs(filename, G.sce); + BLI_path_abs(filename, G.main->name); if(image->packedfile) { if (writePackedFile(reports, image->name, image->packedfile, 0) != RET_OK) { diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 99758b8f0fe..e626abd85c7 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -36,19 +36,6 @@ #include "BKE_global.h" /* all the list begin functions are added manually here, Main is not in SDNA */ -static int rna_Main_debug_get(PointerRNA *ptr) -{ - return G.f & G_DEBUG; -} - - -static void rna_Main_debug_set(PointerRNA *ptr, const int value) -{ - if (value) - G.f |= G_DEBUG; - else - G.f &= ~G_DEBUG; -} static int rna_Main_is_dirty_get(PointerRNA *ptr) { @@ -317,11 +304,6 @@ void RNA_def_main(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_Main_is_dirty_get", NULL); RNA_def_property_ui_text(prop, "File is Saved", "Has the current session been saved to disk as a .blend file"); - prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_funcs(prop, "rna_Main_debug_get", "rna_Main_debug_set"); - RNA_def_property_ui_text(prop, "Debug", "Print debugging information in console"); - - for(i=0; lists[i].name; i++) { prop= RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index b244d8ee5d3..76930e3cc52 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -176,7 +176,7 @@ Object *rna_Main_objects_new(Main *bmain, ReportList *reports, char* name, ID *d void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *object) { if(ID_REAL_USERS(object) <= 0) { - unlink_object(NULL, object); /* needed or ID pointers to this are not cleared */ + unlink_object(object); /* needed or ID pointers to this are not cleared */ free_libblock(&bmain->object, object); } else { @@ -261,7 +261,7 @@ Image *rna_Main_images_load(Main *bmain, ReportList *reports, char *filepath) Image *ima; errno= 0; - ima= BKE_add_image_file(filepath, 0); + ima= BKE_add_image_file(filepath); if(!ima) BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unsupported image format"); diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index d13e4a7d3a4..87936594bf9 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1143,7 +1143,7 @@ static char *rna_VertexGroupElement_path(PointerRNA *ptr) for(a=0, dvert=me->dvert; a<me->totvert; a++, dvert++) for(b=0; b<dvert->totweight; b++) if(dw == &dvert->dw[b]) - return BLI_sprintfN("verts[%d].groups[%d]", a, b); + return BLI_sprintfN("vertices[%d].groups[%d]", a, b); return NULL; } @@ -1160,7 +1160,7 @@ static char *rna_MeshEdge_path(PointerRNA *ptr) static char *rna_MeshVertex_path(PointerRNA *ptr) { - return BLI_sprintfN("verts[%d]", (MVert*)ptr->data - ((Mesh*)ptr->id.data)->mvert); + return BLI_sprintfN("vertices[%d]", (MVert*)ptr->data - ((Mesh*)ptr->id.data)->mvert); } static char *rna_MeshTextureFaceLayer_path(PointerRNA *ptr) @@ -1277,7 +1277,7 @@ static CustomDataLayer *rna_Mesh_uv_texture_new(struct Mesh *me, struct bContext CustomDataLayer *cdl= NULL; int index; - if(ED_mesh_uv_texture_add(C, NULL, NULL, me, name, FALSE)) { + if(ED_mesh_uv_texture_add(C, me, name, FALSE)) { fdata= rna_mesh_fdata(me); index= CustomData_get_named_layer_index(fdata, CD_MTFACE, name); cdl= (index == -1)? NULL: &fdata->layers[index]; diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index a97033200de..52a19c6376f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -159,7 +159,7 @@ static void rna_Image_end_frame_set(PointerRNA *ptr, int value) static void node_update(Main *bmain, Scene *scene, bNodeTree *ntree, bNode *node) { - ED_node_generic_update(bmain, scene, ntree, node); + ED_node_generic_update(bmain, ntree, node); } static void rna_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -180,7 +180,7 @@ static void rna_NodeGroup_update(Main *bmain, Scene *scene, PointerRNA *ptr) node_update(bmain, scene, ntree, node); } -static void rna_Node_update_name(Main *bmain, Scene *scene, PointerRNA *ptr) +static void rna_Node_name_set(PointerRNA *ptr, const char *value) { bNodeTree *ntree= (bNodeTree*)ptr->id.data; bNode *node= (bNode*)ptr->data; @@ -188,14 +188,14 @@ static void rna_Node_update_name(Main *bmain, Scene *scene, PointerRNA *ptr) /* make a copy of the old name first */ BLI_strncpy(oldname, node->name, sizeof(node->name)); + /* set new name */ + BLI_strncpy(node->name, value, sizeof(node->name)); nodeUniqueName(ntree, node); node->flag |= NODE_CUSTOM_NAME; /* fix all the animation data which may link to this */ BKE_all_animdata_fix_paths_rename("nodes", oldname, node->name); - - node_update(bmain, scene, ntree, node); } /* this should be done at display time! if no custom names are set */ @@ -2263,7 +2263,8 @@ static void rna_def_node(BlenderRNA *brna) prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Name", "Node name"); RNA_def_struct_name_property(srna, prop); - RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update_name"); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Node_name_set"); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "inputs", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "inputs", NULL); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 3f07d953e0b..c29ad0d9adf 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -769,6 +769,12 @@ static void rna_MaterialSlot_name_get(PointerRNA *ptr, char *str) strcpy(str, ""); } +static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + rna_Object_internal_update(bmain, scene, ptr); + WM_main_add_notifier(NC_OBJECT|ND_OB_SHADING, ptr->id.data); +} + /* why does this have to be so complicated?, can't all this crap be * moved to in BGE conversion function? - Campbell * * @@ -1143,13 +1149,13 @@ static void rna_def_material_slot(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_MaterialSlot_material_get", "rna_MaterialSlot_material_set", NULL, NULL); RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot"); - RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_MaterialSlot_update"); prop= RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, link_items); RNA_def_property_enum_funcs(prop, "rna_MaterialSlot_link_get", "rna_MaterialSlot_link_set", NULL); RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data"); - RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_MaterialSlot_update"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_MaterialSlot_name_get", "rna_MaterialSlot_name_length", NULL); @@ -1739,14 +1745,14 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_pointer_funcs(prop, "rna_Object_active_material_get", "rna_Object_active_material_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Active Material", "Active material being displayed"); - RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_MaterialSlot_update"); prop= RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "actcol"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_Object_active_material_index_get", "rna_Object_active_material_index_set", "rna_Object_active_material_index_range"); RNA_def_property_ui_text(prop, "Active Material Index", "Index of active material slot"); - RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); + RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL); /* transform */ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION); @@ -2146,7 +2152,7 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures"); /* shape keys */ - prop= RNA_def_property(srna, "show_shape_key", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_only_shape_key", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_LOCK); RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object"); RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 1151215f5f7..7a8165e9aa5 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -325,15 +325,21 @@ static PointerRNA rna_particle_settings_get(PointerRNA *ptr) static void rna_particle_settings_set(PointerRNA *ptr, PointerRNA value) { ParticleSystem *psys= (ParticleSystem*)ptr->data; + int old_type = 0; - if(psys->part) + + if(psys->part) { + old_type = psys->part->type; psys->part->id.us--; + } psys->part = (ParticleSettings *)value.data; if(psys->part) { psys->part->id.us++; psys_check_boid_data(psys); + if(old_type != psys->part->type) + psys->recalc |= PSYS_RECALC_TYPE; } } static void rna_Particle_abspathtime_update(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index b21653d95b1..4ee82903cea 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2886,6 +2886,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER); RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer"); + RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); /* engine */ @@ -3142,7 +3143,7 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "World", "World used for rendering the scene"); - RNA_def_property_update(prop, NC_SCENE|NC_WORLD, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_WORLD, NULL); prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_float_sdna(prop, NULL, "cursor"); diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 93b38499673..d6964f5d569 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -44,10 +44,10 @@ EnumPropertyItem region_type_items[] = { {RGN_TYPE_PREVIEW, "PREVIEW", 0, "Preview", ""}, {0, NULL, 0, NULL, NULL}}; -#ifdef RNA_RUNTIME - #include "ED_screen.h" +#ifdef RNA_RUNTIME + #include "WM_api.h" #include "WM_types.h" diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index b6a09b9c217..923f4560532 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -150,7 +150,7 @@ static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value) seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs); - reload_sequence_new_file(G.main, scene, seq, FALSE); + reload_sequence_new_file(scene, seq, FALSE); rna_Sequence_frame_change_update(scene, seq); } @@ -161,7 +161,7 @@ static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value) seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs); - reload_sequence_new_file(G.main, scene, seq, FALSE); + reload_sequence_new_file(scene, seq, FALSE); rna_Sequence_frame_change_update(scene, seq); } @@ -552,7 +552,7 @@ static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Sequence *seq= (Sequence*)(ptr->data); - reload_sequence_new_file(G.main, scene, seq, TRUE); + reload_sequence_new_file(scene, seq, TRUE); calc_sequence(scene, seq); rna_Sequence_update(bmain, scene, ptr); } @@ -677,13 +677,13 @@ static void rna_def_strip_crop(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0, 4096, 1, 0); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); - prop= RNA_def_property(srna, "min_x", PROP_INT, PROP_UNSIGNED); + prop= RNA_def_property(srna, "min_y", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "bottom"); RNA_def_property_ui_text(prop, "Bottom", ""); RNA_def_property_ui_range(prop, 0, 4096, 1, 0); RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update"); - prop= RNA_def_property(srna, "min_y", PROP_INT, PROP_UNSIGNED); + prop= RNA_def_property(srna, "min_x", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "left"); RNA_def_property_ui_text(prop, "Left", ""); RNA_def_property_ui_range(prop, 0, 4096, 1, 0); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 1d86faa5e53..a230a51e792 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -287,7 +287,6 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID"); - RNA_def_function_flag(func, FUNC_USE_CONTEXT); parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); @@ -297,7 +296,6 @@ void RNA_api_ui_layout(StructRNA *srna) parm= RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI."); func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder"); - RNA_def_function_flag(func, FUNC_USE_CONTEXT); parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); @@ -343,17 +341,14 @@ void RNA_api_ui_layout(StructRNA *srna) func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram"); RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data."); api_ui_item_rna_common(func); - RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail."); func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform"); RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data."); api_ui_item_rna_common(func); - RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail."); func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope"); RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data."); api_ui_item_rna_common(func); - RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail."); func= RNA_def_function(srna, "template_layers", "uiTemplateLayers"); api_ui_item_rna_common(func); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 18620617c87..4196b3585b3 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -221,8 +221,7 @@ static void rna_userdef_addon_remove(bAddon *bext) static void rna_userdef_temp_update(Main *bmain, Scene *scene, PointerRNA *ptr) { extern char btempdir[]; - UserDef *userdef = (UserDef*)ptr->data; - strncpy(btempdir, userdef->tempdir, FILE_MAXDIR+FILE_MAXFILE); + BLI_where_is_temp(btempdir, 1); } #else diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 62d0c99f6c5..7e54a3b14fa 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -175,7 +175,7 @@ EnumPropertyItem event_type_items[] = { {RIGHTCTRLKEY, "RIGHT_CTRL", 0, "Right Ctrl", ""}, {RIGHTSHIFTKEY, "RIGHT_SHIFT", 0, "Right Shift", ""}, {0, "", 0, NULL, NULL}, - {COMMANDKEY, "COMMAND", 0, "Command", ""}, + {OSKEY, "OSKEY", 0, "OS Key", ""}, {0, "", 0, NULL, NULL}, {ESCKEY, "ESC", 0, "Esc", ""}, {TABKEY, "TAB", 0, "Tab", ""}, diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c index ecf253acbce..726d64f26f4 100644 --- a/source/blender/makesrna/intern/rna_world.c +++ b/source/blender/makesrna/intern/rna_world.c @@ -478,9 +478,8 @@ void RNA_def_world(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon"); /* RNA_def_property_update(prop, 0, "rna_World_update"); */ - /* render-only uses this, the notifier could be made to be more spesific */ - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_World_update"); - + /* render-only uses this */ + RNA_def_property_update(prop, NC_WORLD|ND_WORLD_DRAW, "rna_World_update"); prop= RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR); |