diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index c6ed60c90f7..3d9d8a8e9f4 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -22,6 +22,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/makesrna/intern/rna_space.c + * \ingroup RNA + */ + + #include <stdlib.h> #include "MEM_guardedalloc.h" @@ -79,7 +84,7 @@ static EnumPropertyItem draw_channels_items[] = { static EnumPropertyItem transform_orientation_items[] = { {V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"}, {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"}, - {V3D_MANIP_GIMBAL, "GIMBAL", 0, "Gimbal", "Align each axis to the euler rotation axis as used for input"}, + {V3D_MANIP_GIMBAL, "GIMBAL", 0, "Gimbal", "Align each axis to the Euler rotation axis as used for input"}, {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", "Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)"}, {V3D_MANIP_VIEW, "VIEW", 0, "View", "Align the transformation axes to the window"}, {V3D_MANIP_CUSTOM, "CUSTOM", 0, "Custom", "Use a custom transform orientation"}, @@ -309,6 +314,11 @@ static void rna_SpaceView3D_layer_set(PointerRNA *ptr, const int *values) v3d->lay= ED_view3d_scene_layer_set(v3d->lay, values, &v3d->layact); } +static void rna_SpaceView3D_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + DAG_on_visible_update(bmain, FALSE); +} + static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr) { View3D *v3d= (View3D*)(ptr->data); @@ -609,12 +619,11 @@ static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value) ConsoleLine *ci= (ConsoleLine*)ptr->data; int len= strlen(value); - if((len >= ci->len_alloc) || (len * 2 < ci->len_alloc) ) { /* allocate a new strnig */ + if((len >= ci->len_alloc) || (len * 2 < ci->len_alloc) ) { /* allocate a new string */ MEM_freeN(ci->line); ci->line= MEM_mallocN((len + 1) * sizeof(char), "rna_consoleline"); ci->len_alloc= len + 1; } - memcpy(ci->line, value, len + 1); ci->len= len; @@ -725,7 +734,7 @@ static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr) static void rna_Sequencer_display_mode_update(bContext *C, PointerRNA *ptr) { - int view = RNA_int_get(ptr, "view_type"); + int view = RNA_enum_get(ptr, "view_type"); ED_sequencer_update_view(C, view); } @@ -893,7 +902,7 @@ static void rna_def_space_image_uv(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); - prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ); RNA_def_property_array(prop, 2); RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get", "rna_SpaceImageEditor_cursor_location_set", NULL); RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view"); @@ -1271,7 +1280,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_array(prop, 20); RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_layer_set"); RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_layer_update"); prop= RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1); @@ -1441,9 +1450,9 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL); - prop= RNA_def_property(srna, "curves", PROP_POINTER, PROP_NONE); + prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "cumap"); - RNA_def_property_ui_text(prop, "Curves", "Color curve mapping to use for displaying the image"); + RNA_def_property_ui_text(prop, "Curve", "Color curve mapping to use for displaying the image"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_curves_update"); prop= RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE); |