Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c905
1 files changed, 802 insertions, 103 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index d5ac0d6e427..df956670eb3 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -24,16 +24,21 @@
#include <stdlib.h>
+#include "MEM_guardedalloc.h"
+
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
#include "rna_internal.h"
+#include "DNA_action_types.h"
+#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
+#include "WM_api.h"
#include "WM_types.h"
EnumPropertyItem space_type_items[] = {
@@ -41,10 +46,10 @@ EnumPropertyItem space_type_items[] = {
{SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""},
{SPACE_IPO, "GRAPH_EDITOR", 0, "Graph Editor", ""},
{SPACE_OUTLINER, "OUTLINER", 0, "Outliner", ""},
- {SPACE_BUTS, "BUTTONS_WINDOW", 0, "Buttons Window", ""},
+ {SPACE_BUTS, "PROPERTIES", 0, "Properties", ""},
{SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""},
{SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""},
- {SPACE_INFO, "USER_PREFERENCES", 0, "User Preferences", ""},
+ {SPACE_INFO, "INFO", 0, "Info", ""},
{SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""},
{SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""},
//{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""},
@@ -55,6 +60,8 @@ EnumPropertyItem space_type_items[] = {
{SPACE_TIME, "TIMELINE", 0, "Timeline", ""},
{SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""},
{SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
+ {SPACE_CONSOLE, "CONSOLE", 0, "Console", ""},
+ {SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
{0, NULL, 0, NULL, NULL}};
#define DC_RGB {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors."}
@@ -72,13 +79,18 @@ static EnumPropertyItem dc_all_items[] = {DC_RGB, DC_RGBA, DC_ALPHA, DC_Z, DC_LC
#ifdef RNA_RUNTIME
+#include "DNA_anim_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
+#include "BKE_animsys.h"
#include "BKE_brush.h"
+#include "BKE_colortools.h"
#include "BKE_context.h"
+#include "BKE_paint.h"
#include "ED_image.h"
+#include "ED_screen.h"
#include "IMB_imbuf_types.h"
@@ -89,19 +101,18 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
switch(space->spacetype) {
case SPACE_VIEW3D:
return &RNA_Space3DView;
- /*case SPACE_IPO:
+ case SPACE_IPO:
return &RNA_SpaceGraphEditor;
- */
case SPACE_OUTLINER:
return &RNA_SpaceOutliner;
case SPACE_BUTS:
- return &RNA_SpaceButtonsWindow;
- /* case SPACE_FILE:
- return &RNA_SpaceFileBrowser;*/
+ return &RNA_SpaceProperties;
+ case SPACE_FILE:
+ return &RNA_SpaceFileBrowser;
case SPACE_IMAGE:
return &RNA_SpaceImageEditor;
- /*case SPACE_INFO:
- return &RNA_SpaceUserPreferences;*/
+ case SPACE_INFO:
+ return &RNA_SpaceInfo;
case SPACE_SEQ:
return &RNA_SpaceSequenceEditor;
case SPACE_TEXT:
@@ -109,19 +120,23 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
//case SPACE_IMASEL:
// return &RNA_SpaceImageBrowser;
/*case SPACE_SOUND:
- return &RNA_SpaceAudioWindow;
+ return &RNA_SpaceAudioWindow;*/
case SPACE_ACTION:
return &RNA_SpaceDopeSheetEditor;
case SPACE_NLA:
- return &RNA_SpaceNLAEditor;
- case SPACE_SCRIPT:
- return &RNA_SpaceScriptsWindow;
+ return &RNA_SpaceNLA;
+ /*case SPACE_SCRIPT:
+ return &RNA_SpaceScriptsWindow;*/
case SPACE_TIME:
return &RNA_SpaceTimeline;
case SPACE_NODE:
return &RNA_SpaceNodeEditor;
case SPACE_LOGIC:
- return &RNA_SpaceLogicEditor;*/
+ return &RNA_SpaceLogicEditor;
+ case SPACE_CONSOLE:
+ return &RNA_SpaceConsole;
+ case SPACE_USERPREF:
+ return &RNA_SpaceUserPreferences;
default:
return &RNA_Space;
}
@@ -139,7 +154,7 @@ static void rna_SpaceImageEditor_paint_update(bContext *C, PointerRNA *ptr)
Scene *scene= CTX_data_scene(C);
if(scene)
- brush_check_exists(&scene->toolsettings->imapaint.brush);
+ paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT);
}
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
@@ -173,12 +188,17 @@ static EnumPropertyItem dc_rgb_items[] = {DC_RGB, DC_LCMS, DC_ZERO};
static EnumPropertyItem dc_alpha_items[] = {DC_RGB, DC_RGBA, DC_ALPHA, DC_LCMS, DC_ZERO};
static EnumPropertyItem dc_z_items[] = {DC_RGB, DC_Z, DC_LCMS, DC_ZERO};
-static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(PointerRNA *ptr)
+static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, PointerRNA *ptr, int *free)
{
SpaceImage *sima= (SpaceImage*)ptr->data;
ImBuf *ibuf= ED_space_image_buffer(sima);
int zbuf, alpha;
+ if(C==NULL) {
+ /* needed for doc generation */
+ return dc_all_items;
+ }
+
alpha= ibuf && (ibuf->channels == 4);
zbuf= ibuf && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1));
@@ -192,9 +212,18 @@ static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(PointerRNA *pt
return dc_rgb_items;
}
+static void rna_SpaceImageEditor_curves_update(bContext *C, PointerRNA *ptr)
+{
+ SpaceImage *sima= (SpaceImage*)ptr->data;
+
+ curvemapping_do_ibuf(sima->cumap, ED_space_image_buffer(sima));
+ WM_event_add_notifier(C, NC_IMAGE, sima->image);
+}
+
+
/* Space Text Editor */
-void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value)
+static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value)
{
SpaceText *st= (SpaceText*)(ptr->data);
@@ -202,7 +231,7 @@ void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value)
st->left= 0;
}
-void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
+static void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
{
SpaceText *st= (SpaceText*)(ptr->data);
@@ -210,9 +239,9 @@ void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
st->top= 0;
}
-/* Space Buttons */
+/* Space Properties */
-StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
+static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
{
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
@@ -222,6 +251,101 @@ StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
return &RNA_ID;
}
+static void rna_SpaceProperties_align_set(PointerRNA *ptr, int value)
+{
+ SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+
+ sbuts->align= value;
+ sbuts->re_align= 1;
+}
+
+/* Space Console */
+static void rna_ConsoleLine_line_get(PointerRNA *ptr, char *value)
+{
+ ConsoleLine *ci= (ConsoleLine*)ptr->data;
+ strcpy(value, ci->line);
+}
+
+static int rna_ConsoleLine_line_length(PointerRNA *ptr)
+{
+ ConsoleLine *ci= (ConsoleLine*)ptr->data;
+ return ci->len;
+}
+
+static void rna_ConsoleLine_line_set(PointerRNA *ptr, const char *value)
+{
+ ConsoleLine *ci= (ConsoleLine*)ptr->data;
+ int len= strlen(value);
+
+ if(len < ci->len_alloc) { /* allocated size is enough? */
+ strcpy(ci->line, value);
+ }
+ else { /* allocate a new strnig */
+ MEM_freeN(ci->line);
+ ci->line= BLI_strdup(value);
+ ci->len_alloc= len;
+ }
+ ci->len= len;
+
+ if(ci->cursor > len) /* clamp the cursor */
+ ci->cursor= len;
+}
+
+static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ ConsoleLine *ci= (ConsoleLine*)ptr->data;
+
+ *min= 0;
+ *max= ci->len;
+}
+
+static void rna_View3D_display_background_image_set(PointerRNA *ptr, int value)
+{
+ View3D *vd= (View3D*)ptr->data;
+
+ if(value) vd->flag |= V3D_DISPBGPIC;
+ else vd->flag &= ~V3D_DISPBGPIC;
+
+ if((vd->flag & V3D_DISPBGPIC) && vd->bgpic == NULL) {
+ vd->bgpic= MEM_callocN(sizeof(BGpic), "bgpic");
+ vd->bgpic->size= 5.0;
+ vd->bgpic->blend= 0.5;
+ vd->bgpic->iuser.fie_ima= 2;
+ vd->bgpic->iuser.ok= 1;
+ }
+}
+
+/* Space Time */
+
+static void rna_SpaceTime_redraw_update(bContext *C, PointerRNA *ptr)
+{
+ SpaceTime *st= (SpaceTime*)ptr->data;
+ ED_screen_animation_timer_update(C, st->redraws);
+}
+
+/* Space Dopesheet */
+
+static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr, PointerRNA value)
+{
+ SpaceAction *saction= (SpaceAction*)(ptr->data);
+ saction->action= value.data;
+}
+
+static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr)
+{
+ SpaceAction *saction= (SpaceAction*)(ptr->data);
+ Object *obact= CTX_data_active_object(C);
+
+ /* we must set this action to be the one used by active object (if not pinned) */
+ if(obact && saction->pin == 0) {
+ AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
+
+ /* set action */
+ adt->action= saction->action;
+ id_us_plus(&adt->action->id);
+ }
+}
+
#else
static void rna_def_space(BlenderRNA *brna)
@@ -248,8 +372,8 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
static EnumPropertyItem sticky_mode_items[] = {
{SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled."},
- {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "SHARED_LOCATION", "Select UVs that are at the same location and share a mesh vertex."},
- {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "SHARED_VERTEX", "Select UVs that share mesh vertex, irrespective if they are in the same location."},
+ {SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "Shared Location", "Select UVs that are at the same location and share a mesh vertex."},
+ {SI_STICKY_VERTEX, "SHARED_VERTEX", ICON_STICKY_UVS_VERT, "Shared Vertex", "Select UVs that share mesh vertex, irrespective if they are in the same location."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dt_uv_items[] = {
@@ -280,65 +404,68 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "sticky");
RNA_def_property_enum_items(prop, sticky_mode_items);
RNA_def_property_ui_text(prop, "Sticky Selection Mode", "Automatically select also UVs sharing the same vertex as the ones being selected.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* drawing */
prop= RNA_def_property(srna, "edge_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
RNA_def_property_enum_items(prop, dt_uv_items);
RNA_def_property_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_smooth_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_UV);
RNA_def_property_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_STRETCH);
RNA_def_property_ui_text(prop, "Draw Stretch", "Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion).");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_stretch_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch");
RNA_def_property_enum_items(prop, dt_uvstretch_items);
RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_modified_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW);
RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_other_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER);
RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "normalized_coordinates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
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_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* todo: move edge and face drawing options here from G.f */
prop= RNA_def_property(srna, "snap_to_pixels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP);
RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "constrain_to_image_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_CLIP_UV);
RNA_def_property_ui_text(prop, "Constrain to Image Bounds", "Constraint to stay within the image bounds while editing.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "live_unwrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP);
RNA_def_property_ui_text(prop, "Live Unwrap", "Continuously unwrap the selected UV island while transforming pinned vertices.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "pivot", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
}
static void rna_def_space_outliner(BlenderRNA *brna)
@@ -358,6 +485,7 @@ static void rna_def_space_outliner(BlenderRNA *brna)
{10, "SEQUENCE", 0, "Sequence", ""},
{11, "DATABLOCKS", 0, "Datablocks", ""},
{12, "USER_PREFERENCES", 0, "User Preferences", ""},
+ {13, "KEYMAPS", 0, "Key Maps", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceOutliner", "Space");
@@ -368,12 +496,12 @@ static void rna_def_space_outliner(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
prop= RNA_def_property(srna, "show_restriction_columns", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS);
RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show colum");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
}
@@ -389,30 +517,36 @@ static void rna_def_background_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
- RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
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_VIEW3D, NULL);
- prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image vertically from the view center");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image.");
RNA_def_property_range(prop, 0.0, FLT_MAX);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "transparency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blend");
RNA_def_property_ui_text(prop, "Transparency", "Amount to blend the image against the background color.");
RNA_def_property_range(prop, 0.0, 1.0);
-
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_space_3dview(BlenderRNA *brna)
@@ -421,11 +555,11 @@ static void rna_def_space_3dview(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem viewport_shading_items[] = {
- {OB_BOUNDBOX, "BOUNDBOX", 0, "Bounding Box", "Display the object's local bounding boxes only"},
- {OB_WIRE, "WIREFRAME", 0, "Wireframe", "Display the object as wire edges"},
- {OB_SOLID, "SOLID", 0, "Solid", "Display the object solid, lit with default OpenGL lights"},
- {OB_SHADED, "SHADED", 0, "Shaded", "Display the object solid, with preview shading interpolated at vertices"},
- {OB_TEXTURE, "TEXTURED", 0, "Textured", "Display the object solid, with face-assigned textures"},
+ {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"},
+ {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"},
+ {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"},
+ {OB_SHADED, "SHADED", ICON_SMOOTH, "Shaded", "Display the object solid, with preview shading interpolated at vertices"},
+ {OB_TEXTURE, "TEXTURED", ICON_POTATO, "Textured", "Display the object solid, with face-assigned textures"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem pivot_items[] = {
@@ -451,10 +585,12 @@ static void rna_def_space_3dview(BlenderRNA *brna)
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera).");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
RNA_def_property_ui_text(prop, "Lock Object", "3D View center is locked to this object's position");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "background_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bgpic");
@@ -464,100 +600,140 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
RNA_def_property_enum_items(prop, viewport_shading_items);
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, NULL);
- prop= RNA_def_property(srna, "localview", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "localview", 0);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ prop= RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "localvd");
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility.");
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view.");
RNA_def_property_range(prop, 1.0f, 250.0f);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "near");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "far");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "grid_spacing", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "grid_spacing", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_ui_text(prop, "Grid Spacing", "The distance between 3D View grid lines.");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridlines");
RNA_def_property_ui_text(prop, "Grid Lines", "The number of grid lines to display in perspective view.");
RNA_def_property_range(prop, 0, 1024);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
RNA_def_property_ui_text(prop, "Grid Subdivisions", "The number of subdivisions between grid lines.");
RNA_def_property_range(prop, 1, 1024);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_floor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_x_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_y_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "display_z_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "outline_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE);
RNA_def_property_ui_text(prop, "Outline Selected", "Show an outline highlight around selected objects in non-wireframe views.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "all_object_centers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS);
RNA_def_property_ui_text(prop, "All Object Centers", "Show the object center dot for all (selected and unselected) objects.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "relationship_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_HIDE_HELPLINES);
RNA_def_property_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "textured_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX);
RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "display_background_image", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_View3D_display_background_image_set");
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPIC);
+ RNA_def_property_ui_text(prop, "Display Background Image", "Display a reference image behind objects in the 3D View");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE);
RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE);
RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "manipulator_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE);
RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
prop= RNA_def_property(srna, "transform_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twmode");
RNA_def_property_enum_items(prop, transform_orientation_items);
RNA_def_property_ui_text(prop, "Transform Orientation", "The alignment of manipulator handles.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_LOCKED);
+ RNA_def_property_ui_text(prop, "Lock", "Lock View Rotation");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "box_preview", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXVIEW);
+ RNA_def_property_ui_text(prop, "Box", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ prop= RNA_def_property(srna, "box_clip", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, "RegionView3D", "viewlock", RV3D_BOXCLIP);
+ RNA_def_property_ui_text(prop, "Clip", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_space_buttons(BlenderRNA *brna)
@@ -569,43 +745,51 @@ static void rna_def_space_buttons(BlenderRNA *brna)
{BCONTEXT_SCENE, "SCENE", ICON_SCENE, "Scene", "Scene"},
{BCONTEXT_WORLD, "WORLD", ICON_WORLD, "World", "World"},
{BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Object"},
- {BCONTEXT_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, "Constraint", "Constraint"},
- {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifier", "Modifier"},
+ {BCONTEXT_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, "Constraints", "Constraints"},
+ {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifiers", "Modifiers"},
{BCONTEXT_DATA, "DATA", 0, "Data", "Data"},
{BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone"},
+ {BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT, "Bone Constraints", "Bone Constraints"},
{BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"},
{BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"},
{BCONTEXT_PARTICLE, "PARTICLE", ICON_PARTICLES, "Particle", "Particle"},
{BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem panel_alignment_items[] = {
- {1, "HORIZONTAL", 0, "Horizontal", ""},
- {2, "VERTICAL", 0, "Vertical", ""},
+ static EnumPropertyItem align_items[] = {
+ {BUT_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""},
+ {BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceButtonsWindow", "Space");
+ srna= RNA_def_struct(brna, "SpaceProperties", "Space");
RNA_def_struct_sdna(srna, "SpaceButs");
- RNA_def_struct_ui_text(srna, "Buttons Space", "Buttons Window space data");
+ RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
- prop= RNA_def_property(srna, "buttons_context", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, buttons_context_items);
- RNA_def_property_ui_text(prop, "Buttons Context", "The type of active data to display and edit in the buttons window");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
- prop= RNA_def_property(srna, "panel_alignment", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
- RNA_def_property_enum_items(prop, panel_alignment_items);
- RNA_def_property_ui_text(prop, "Panel Alignment", "Arrangement of the panels within the buttons window");
- RNA_def_property_update(prop, NC_WINDOW, NULL);
+ RNA_def_property_enum_items(prop, align_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
+ RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
+
+ prop= RNA_def_property(srna, "brush_texture", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_BRUSH_TEX);
+ RNA_def_property_ui_text(prop, "Brush Texture", "Show brush textures.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
/* pinned data */
prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pinid");
RNA_def_property_struct_type(prop, "ID");
- RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceButtonsWindow_pin_id_typef");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceProperties_pin_id_typef");
RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
}
static void rna_def_space_image(BlenderRNA *brna)
@@ -622,38 +806,40 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL);
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space.");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
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_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "curves", 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_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_curves_update");
prop= RNA_def_property(srna, "image_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
RNA_def_property_ui_text(prop, "Image Pin", "Display current image regardless of object selection.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* image draw */
prop= RNA_def_property(srna, "draw_repeated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE);
RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, dc_all_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf");
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw.");
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* uv */
- prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "SpaceUVEditor");
RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL);
RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings.");
@@ -663,7 +849,7 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL);
RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode.");
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
- RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_SpaceImageEditor_paint_update");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_paint_update");
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
@@ -706,11 +892,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem display_mode_items[] = {
- {SEQ_DRAW_SEQUENCE, "SEQUENCER", 0, "Sequencer", ""},
- {SEQ_DRAW_IMG_IMBUF, "IMAGE", 0, "Image Preview", ""},
- {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", 0, "Luma Waveform", ""},
- {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", 0, "Chroma Vectorscope", ""},
- {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", 0, "Histogram", ""},
+ {SEQ_DRAW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
+ {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""},
+ {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""},
+ {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, "Chroma Vectorscope", ""},
+ {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", ICON_SEQ_HISTOGRAM, "Histogram", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
@@ -722,64 +908,69 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "The view mode to use for displaying sequencer output.");
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* flag's */
prop= RNA_def_property(srna, "draw_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather then seconds.");
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "transform_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
RNA_def_property_ui_text(prop, "Transform Markers", "Transform markers as well as strips.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "seperate_color_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPERATED);
- RNA_def_property_ui_text(prop, "Transform Markers", "Seperate color channels in preview.");
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_ui_text(prop, "Seperate Colors", "Seperate color channels in preview.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "draw_safe_margin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_SAFE_MARGINS);
RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview.");
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL);
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay.");
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "chanshown");
RNA_def_property_ui_text(prop, "Display Channel", "The channel number shown in the image preview. 0 is the result of all strips combined.");
RNA_def_property_range(prop, 0, 32); // MAXSEQ --- todo, move from BKE_sequence.h
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "zebra");
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes.");
RNA_def_property_range(prop, 0, 110);
- RNA_def_property_update(prop, ND_SEQUENCER|ND_DISPLAY, NULL); // review notifier
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* not sure we need rna access to these but adding anyway */
- prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offsets image horizontally from the view center");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offsets image horizontally from the view center");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_ui_text(prop, "Zoom", "Display zoom level");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
}
static void rna_def_space_text(BlenderRNA *brna)
@@ -787,11 +978,6 @@ static void rna_def_space_text(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem font_size_items[] = {
- {12, "SCREEN_12", 0, "Screen 12", ""},
- {15, "SCREEN_15", 0, "Screen 15", ""},
- {0, NULL, 0, NULL, NULL}};
-
srna= RNA_def_struct(brna, "SpaceTextEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceText");
RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data.");
@@ -801,63 +987,564 @@ static void rna_def_space_text(BlenderRNA *brna)
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", NULL);
- RNA_def_property_update(prop, NC_TEXT|NA_EDITED, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
/* display */
prop= RNA_def_property(srna, "syntax_highlight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0);
RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting.");
RNA_def_property_ui_icon(prop, ICON_SYNTAX_OFF, 1);
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "word_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
RNA_def_property_ui_text(prop, "Word Wrap", "Wrap words if there is not enough horizontal space.");
RNA_def_property_ui_icon(prop, ICON_WORDWRAP_OFF, 1);
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "line_numbers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text.");
RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_OFF, 1);
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them.");
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "live_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tabnumber");
RNA_def_property_range(prop, 2, 8);
RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with.");
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "font_size", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "lheight");
- RNA_def_property_enum_items(prop, font_size_items);
+ prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "lheight");
+ RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
- RNA_def_property_update(prop, NC_TEXT|ND_DISPLAY, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
/* find */
prop= RNA_def_property(srna, "find_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL);
RNA_def_property_ui_text(prop, "Find All", "Search in all text datablocks, instead of only the active one.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_WRAP);
RNA_def_property_ui_text(prop, "Find Wrap", "Search again from the start of the file when reaching the end.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "findstr");
RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
prop= RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "replacestr");
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
+}
+
+static void rna_def_space_dopesheet(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem mode_items[] = {
+ {SACTCONT_DOPESHEET, "DOPESHEET", 0, "DopeSheet", ""},
+ {SACTCONT_ACTION, "ACTION", 0, "Action Editor", ""},
+ {SACTCONT_SHAPEKEY, "SHAPEKEY", 0, "ShapeKey Editor", ""}, // XXX to be depreceated?
+ {SACTCONT_GPENCIL, "GPENCIL", 0, "Grease Pencil", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+
+ srna= RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceAction");
+ RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data.");
+
+ /* data */
+ prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL);
+ RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_action_update");
+
+ /* mode */
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
+
+ /* display */
+ prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
+ RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
+
+ prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM);
+ RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
+
+ prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS);
+ RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
+
+ /* editing */
+ prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
+ RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
+
+ // TODO... autosnap, dopesheet?
+}
+
+static void rna_def_space_graph(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem mode_items[] = {
+ {SIPO_MODE_ANIMATION, "FCURVES", 0, "F-Curves", ""},
+ {SIPO_MODE_DRIVERS, "DRIVERS", 0, "Drivers", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+
+ srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceIpo");
+ RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data.");
+
+ /* mode */
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ /* display */
+ prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
+ RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
+ RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS);
+ RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
+ RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ prop= RNA_def_property(srna, "only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY);
+ RNA_def_property_ui_text(prop, "Only Selected Curve Keyframes", "Only keyframes of selected F-Curves are visible and editable.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ /* editing */
+ prop= RNA_def_property(srna, "automerge_keyframes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
+ RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
+ // TODO... autosnap, dopesheet?
+}
+
+static void rna_def_space_nla(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SpaceNLA", "Space");
+ RNA_def_struct_sdna(srna, "SpaceNla");
+ RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data.");
+
+ /* display */
+ prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_DRAWTIME);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, only set with operator
+ RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
+
+ prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM);
+ RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
+
+ prop= RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES);
+ RNA_def_property_ui_text(prop, "Show Control Curves", "Show influence curves on strips.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
+
+ /* editing */
+ // TODO... autosnap, dopesheet?
+}
+
+static void rna_def_space_time(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SpaceTimeline", "Space");
+ RNA_def_struct_sdna(srna, "SpaceTime");
+ RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data.");
+
+ /* Define Anim Playback Areas */
+
+ prop= RNA_def_property(srna, "play_top_left", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_REGION);
+ RNA_def_property_ui_text(prop, "Top-Left 3D Window", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_all_3d", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_3D_WIN);
+ RNA_def_property_ui_text(prop, "All 3D Windows", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_anim", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_ANIM_WIN);
+ RNA_def_property_ui_text(prop, "Animation Windows", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_buttons", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_BUTS_WIN);
+ RNA_def_property_ui_text(prop, "Properties Windows", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_image", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_IMAGE_WIN);
+ RNA_def_property_ui_text(prop, "Image Windows", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_sequencer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_SEQ);
+ RNA_def_property_ui_text(prop, "Sequencer Windows", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_NODES);
+ RNA_def_property_ui_text(prop, "Node Windows", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_SpaceTime_redraw_update");
+
+ /* Other options */
+
+ prop= RNA_def_property(srna, "continue_physics", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_CONTINUE_PHYSICS);
+ RNA_def_property_ui_text(prop, "Continue Physics", "During playblack, continue physics simulations regardless of the frame number");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
+
+ prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL);
+ RNA_def_property_ui_text(prop, "Only Selected channels", "Show keyframes only from active/selected channels.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
+}
+
+static void rna_def_console_line(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "ConsoleLine", NULL);
+ RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console.");
+ // XXX using non-inited "prop", uh? RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+
+ prop= RNA_def_property(srna, "line", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_funcs(prop, "rna_ConsoleLine_line_get", "rna_ConsoleLine_line_length", "rna_ConsoleLine_line_set");
+ RNA_def_property_ui_text(prop, "Line", "Text in the line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+
+ prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
+ RNA_def_property_int_sdna(prop, NULL, "cursor");
+ RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+}
+
+static EnumPropertyItem console_type_items[] = {
+ {CONSOLE_TYPE_PYTHON, "PYTHON", 0, "Python", ""},
+ {CONSOLE_TYPE_REPORT, "REPORT", 0, "Report", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+static void rna_def_space_console(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SpaceConsole", "Space");
+ RNA_def_struct_sdna(srna, "SpaceConsole");
+ RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console.");
+
+ /* display */
+ prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); /* copied from text editor */
+ RNA_def_property_int_sdna(prop, NULL, "lheight");
+ RNA_def_property_range(prop, 8, 32);
+ RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+
+ prop= RNA_def_property(srna, "console_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, console_type_items);
+ RNA_def_property_ui_text(prop, "Type", "Console type.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+
+ /* reporting display */
+ prop= RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_DEBUG);
+ RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+
+ prop= RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_INFO);
+ RNA_def_property_ui_text(prop, "Show Info", "Display general information.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+
+ prop= RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_OP);
+ RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+
+ prop= RNA_def_property(srna, "show_report_warn", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_WARN);
+ RNA_def_property_ui_text(prop, "Show Warn", "Display warnings.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+
+ prop= RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", CONSOLE_RPT_ERR);
+ RNA_def_property_ui_text(prop, "Show Error", "Display error text.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
+
+
+
+ prop= RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Prompt", "Command line prompt.");
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "history", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "history", NULL);
+ RNA_def_property_struct_type(prop, "ConsoleLine");
+ RNA_def_property_ui_text(prop, "History", "Command history.");
+
+ prop= RNA_def_property(srna, "scrollback", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "scrollback", NULL);
+ RNA_def_property_struct_type(prop, "ConsoleLine");
+ RNA_def_property_ui_text(prop, "Output", "Command output.");
+}
+
+static void rna_def_fileselect_params(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem file_display_items[] = {
+ {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"},
+ {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"},
+ {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem file_sort_items[] = {
+ {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically."},
+ {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension."},
+ {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time."},
+ {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size."},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "FileSelectParams", NULL);
+ RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters.");
+
+ prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "title");
+ RNA_def_property_ui_text(prop, "Title", "Title for the file browser.");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "dir");
+ RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+
+ prop= RNA_def_property(srna, "file", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "file");
+ RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+
+ prop= RNA_def_property(srna, "display", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "display");
+ RNA_def_property_enum_items(prop, file_display_items);
+ RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+
+ prop= RNA_def_property(srna, "do_filter", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER);
+ RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "hide_dot", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
+ RNA_def_property_ui_text(prop, "Hide Dot Files", "Hide hidden dot files.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST , NULL);
+
+ prop= RNA_def_property(srna, "sort", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "sort");
+ RNA_def_property_enum_items(prop, file_sort_items);
+ RNA_def_property_ui_text(prop, "Sort", "");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
+
+ prop= RNA_def_property(srna, "filter_image", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE);
+ RNA_def_property_ui_text(prop, "Filter Images", "Show image files.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "filter_blender", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE);
+ RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "filter_movie", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE);
+ RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "filter_script", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE);
+ RNA_def_property_ui_text(prop, "Filter Script", "Show script files.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "filter_font", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE);
+ RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "filter_sound", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE);
+ RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "filter_text", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE);
+ RNA_def_property_ui_text(prop, "Filter Text", "Show text files.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+ prop= RNA_def_property(srna, "filter_folder", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE);
+ RNA_def_property_ui_text(prop, "Filter Folder", "Show folders.");
+ RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
+
+
+}
+
+static void rna_def_space_filebrowser(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SpaceFileBrowser", "Space");
+ RNA_def_struct_sdna(srna, "SpaceFile");
+ RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data.");
+
+ prop= RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "params");
+ RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser.");
+}
+
+static void rna_def_space_info(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "SpaceInfo", "Space");
+ RNA_def_struct_sdna(srna, "SpaceInfo");
+ RNA_def_struct_ui_text(srna, "Space Info", "Info space data.");
+}
+
+static void rna_def_space_userpref(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "SpaceUserPreferences", "Space");
+ RNA_def_struct_sdna(srna, "SpaceUserPref");
+ RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data.");
+}
+
+static void rna_def_space_node(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem tree_type_items[] = {
+ {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes."},
+ {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes."},
+ {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem texture_type_items[] = {
+ {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object."},
+ {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World."},
+ {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush."},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "SpaceNodeEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceNode");
+ RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data.");
+
+ prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "treetype");
+ RNA_def_property_enum_items(prop, tree_type_items);
+ 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);
+
+ prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "texfrom");
+ RNA_def_property_enum_items(prop, texture_type_items);
+ RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+
+ prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "ID", "Datablock whose nodes are being edited.");
+
+ prop= RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "from");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked.");
+
+ prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited.");
+
+ prop= RNA_def_property(srna, "backdrop", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
+ RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+}
+
+static void rna_def_space_logic(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceLogic");
+ RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data.");
}
void RNA_def_space(BlenderRNA *brna)
@@ -866,10 +1553,22 @@ void RNA_def_space(BlenderRNA *brna)
rna_def_space_image(brna);
rna_def_space_sequencer(brna);
rna_def_space_text(brna);
+ rna_def_fileselect_params(brna);
+ rna_def_space_filebrowser(brna);
rna_def_space_outliner(brna);
rna_def_background_image(brna);
rna_def_space_3dview(brna);
rna_def_space_buttons(brna);
+ rna_def_space_dopesheet(brna);
+ rna_def_space_graph(brna);
+ rna_def_space_nla(brna);
+ rna_def_space_time(brna);
+ rna_def_space_console(brna);
+ rna_def_console_line(brna);
+ rna_def_space_info(brna);
+ rna_def_space_userpref(brna);
+ rna_def_space_node(brna);
+ rna_def_space_logic(brna);
}
#endif