diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 73f0d33257c..cf6202f07c6 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -370,7 +370,7 @@ static void rna_View3D_CursorLocation_get(PointerRNA *ptr, float *values) View3D *v3d = (View3D *)(ptr->data); bScreen *sc = (bScreen *)ptr->id.data; Scene *scene = (Scene *)sc->scene; - const float *loc = give_cursor(scene, v3d); + const float *loc = ED_view3d_cursor3d_get(scene, v3d); copy_v3_v3(values, loc); } @@ -380,7 +380,7 @@ static void rna_View3D_CursorLocation_set(PointerRNA *ptr, const float *values) View3D *v3d = (View3D *)(ptr->data); bScreen *sc = (bScreen *)ptr->id.data; Scene *scene = (Scene *)sc->scene; - float *cursor = give_cursor(scene, v3d); + float *cursor = ED_view3d_cursor3d_get(scene, v3d); copy_v3_v3(cursor, values); } @@ -1212,7 +1212,8 @@ static int rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type) else return TRUE; } -static EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) +static EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), + PropertyRNA *UNUSED(prop), int *free) { return rna_node_tree_type_itemf(C, rna_SpaceNodeEditor_tree_type_poll, free); } @@ -1490,7 +1491,6 @@ static void rna_def_space_outliner(BlenderRNA *brna) {SO_LIBRARIES, "LIBRARIES", 0, "Blender File", "Display data of current file and linked libraries"}, {SO_DATABLOCKS, "DATABLOCKS", 0, "Datablocks", "Display all raw datablocks"}, {SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display the user preference datablocks"}, - {SO_KEYMAP, "KEYMAPS", 0, "Key Maps", "Display keymap datablocks"}, {0, NULL, 0, NULL, NULL} }; @@ -1786,8 +1786,8 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop = RNA_def_property(srna, "use_render_border", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_RENDER_BORDER); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_ui_text(prop, "Render Border", - "Use a region within the frame size for rendered viewport (when not viewing through the camera)"); + RNA_def_property_ui_text(prop, "Render Border", "Use a region within the frame size for rendered viewport " + "(when not viewing through the camera)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "render_border_min_x", PROP_FLOAT, PROP_NONE); @@ -1833,7 +1833,8 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop = RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "drawtype"); RNA_def_property_enum_items(prop, viewport_shade_items); - RNA_def_property_enum_funcs(prop, "rna_SpaceView3D_viewport_shade_get", NULL, "rna_SpaceView3D_viewport_shade_itemf"); + RNA_def_property_enum_funcs(prop, "rna_SpaceView3D_viewport_shade_get", NULL, + "rna_SpaceView3D_viewport_shade_itemf"); RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_viewport_shade_update"); @@ -1950,6 +1951,11 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Backface Culling", "Use back face culling to hide the back side of faces"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_textured_shadeless", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHADELESS_TEX); + RNA_def_property_ui_text(prop, "Shadeless", "Show shadeless texture without lighting in textured draw mode"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_OCCLUDE_WIRE); RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display"); @@ -2070,6 +2076,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop = RNA_def_property(srna, "tracks_draw_size", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_range(prop, 0, 5, 1, 3); RNA_def_property_float_sdna(prop, NULL, "bundle_size"); RNA_def_property_ui_text(prop, "Tracks Size", "Display size of tracks from reconstructed data"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); @@ -2881,6 +2888,19 @@ static void rna_def_space_graph(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL); RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); + + /* nromalize curves */ + prop = RNA_def_property(srna, "use_normalization", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NORMALIZE); + RNA_def_property_ui_text(prop, "Use Normalization", "Display curves in normalized to -1..1 range, " + "for easier editing of multiple curves with different ranges"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); + + prop = RNA_def_property(srna, "use_auto_normalization", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NORMALIZE_FREEZE); + RNA_def_property_ui_text(prop, "Auto Normalization", + "Automatically recalculate curve normalization on every curve edit"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); } static void rna_def_space_nla(BlenderRNA *brna) @@ -3374,7 +3394,8 @@ static void rna_def_space_node(BlenderRNA *brna) prop = RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, dummy_items); - RNA_def_property_enum_funcs(prop, "rna_SpaceNodeEditor_tree_type_get", "rna_SpaceNodeEditor_tree_type_set", "rna_SpaceNodeEditor_tree_type_itemf"); + RNA_def_property_enum_funcs(prop, "rna_SpaceNodeEditor_tree_type_get", "rna_SpaceNodeEditor_tree_type_set", + "rna_SpaceNodeEditor_tree_type_itemf"); RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); @@ -3406,7 +3427,8 @@ static void rna_def_space_node(BlenderRNA *brna) rna_def_space_node_path_api(brna, prop); prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceNodeEditor_node_tree_set", NULL, "rna_SpaceNodeEditor_node_tree_poll"); + RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceNodeEditor_node_tree_set", NULL, + "rna_SpaceNodeEditor_node_tree_poll"); RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_CONTEXT_UPDATE); RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context"); |