diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-10 21:40:31 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-10 21:40:31 +0300 |
commit | 50b67d83a9eb2f19fe3ed09efa99a253ea9ec136 (patch) | |
tree | 4ade86e5bc04e67beeefd0a6206f59763ef08ea2 /source/blender | |
parent | f305aba8688a2b88b6495985435cc79213a22a3f (diff) | |
parent | 42c346028f535968dfb90ca446e794dd2bc874f9 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/makesrna/intern/rna_space.c
Diffstat (limited to 'source/blender')
3 files changed, 172 insertions, 165 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index b87bbb60479..9036fbecc88 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -638,12 +638,13 @@ void DepsgraphNodeBuilder::build_world(World *world) return; } - /* world itself */ - add_id_node(world_id); /* world shading/params? */ - build_animdata(world_id); - /* TODO: other settings? */ + /* world itself */ + add_component_node(world_id, DEPSNODE_TYPE_PARAMETERS); + + add_operation_node(world_id, DEPSNODE_TYPE_PARAMETERS, DEPSOP_TYPE_EXEC, NULL, + DEG_OPCODE_PLACEHOLDER, "Parameters Eval"); /* textures */ build_texture_stack(world->mtex); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 27a24031911..abf0fc438eb 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1129,7 +1129,13 @@ void DepsgraphRelationBuilder::build_world(World *world) build_texture_stack(world->mtex); /* world's nodetree */ - build_nodetree(world->nodetree); + if (world->nodetree != NULL) { + build_nodetree(world->nodetree); + ComponentKey ntree_key(&world->nodetree->id, DEPSNODE_TYPE_PARAMETERS); + ComponentKey world_key(world_id, DEPSNODE_TYPE_PARAMETERS); + add_relation(ntree_key, world_key, + DEPSREL_TYPE_COMPONENT_ORDER, "NTree->World Parameters"); + } } void DepsgraphRelationBuilder::build_rigidbody(Scene *scene) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 13ea1e098f7..ad84da8c619 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -73,8 +73,8 @@ EnumPropertyItem rna_enum_space_type_items[] = { {SPACE_IMAGE, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", "View and edit images and UV Maps"}, {SPACE_CLIP, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", "Motion tracking tools"}, {SPACE_SEQ, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", "Video editing tools"}, - {SPACE_TEXT, "TEXT_EDITOR", ICON_TEXT, "Text Editor", "Edit scripts and in-file documentation"}, {SPACE_NODE, "NODE_EDITOR", ICON_NODETREE, "Node Editor", "Editor for node-based shading and compositing tools"}, + {SPACE_TEXT, "TEXT_EDITOR", ICON_TEXT, "Text Editor", "Edit scripts and in-file documentation"}, {SPACE_LOGIC, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", "Game logic editing"}, {0, "", ICON_NONE, NULL, NULL}, {SPACE_BUTS, "PROPERTIES", ICON_BUTS, "Properties", "Edit properties of active object and related data-blocks"}, @@ -494,7 +494,7 @@ static void rna_View3D_CursorLocation_get(PointerRNA *ptr, float *values) bScreen *sc = (bScreen *)ptr->id.data; Scene *scene = (Scene *)sc->scene; const float *loc = ED_view3d_cursor3d_get(scene, v3d); - + copy_v3_v3(values, loc); } @@ -504,7 +504,7 @@ static void rna_View3D_CursorLocation_set(PointerRNA *ptr, const float *values) bScreen *sc = (bScreen *)ptr->id.data; Scene *scene = (Scene *)sc->scene; float *cursor = ED_view3d_cursor3d_get(scene, v3d); - + copy_v3_v3(cursor, values); } @@ -520,7 +520,7 @@ static float rna_View3D_GridScaleUnit_get(PointerRNA *ptr) static void rna_SpaceView3D_layer_set(PointerRNA *ptr, const int *values) { View3D *v3d = (View3D *)(ptr->data); - + v3d->lay = ED_view3d_scene_layer_set(v3d->lay, values, &v3d->layact); } @@ -547,16 +547,16 @@ static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *scene, Poi static void rna_SpaceView3D_matcap_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { View3D *v3d = (View3D *)(ptr->data); - + if (v3d->defmaterial) { Material *ma = v3d->defmaterial; - + if (ma->preview) BKE_previewimg_free(&ma->preview); - + if (ma->gpumaterial.first) GPU_material_free(&ma->gpumaterial); - + WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma); } } @@ -564,7 +564,7 @@ static void rna_SpaceView3D_matcap_update(Main *UNUSED(bmain), Scene *UNUSED(sce static void rna_SpaceView3D_matcap_enable(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { View3D *v3d = (View3D *)(ptr->data); - + if (v3d->matcap_icon < ICON_MATCAP_01 || v3d->matcap_icon > ICON_MATCAP_24) { @@ -721,7 +721,7 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C { Scene *scene = ((bScreen *)ptr->id.data)->scene; RenderEngineType *type = RE_engines_find(scene->r.engine); - + EnumPropertyItem *item = NULL; int totitem = 0; @@ -730,7 +730,7 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_SOLID); RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_TEXTURE); RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_MATERIAL); - + if (type && type->render_to_view) RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_RENDER); @@ -850,7 +850,7 @@ static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUS int zbuf, alpha, totitem = 0; ibuf = ED_space_image_acquire_buffer(sima, &lock); - + alpha = ibuf && (ibuf->channels == 4); zbuf = ibuf && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels == 1)); @@ -901,14 +901,14 @@ static void rna_SpaceImageEditor_zoom_get(PointerRNA *ptr, float *values) static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *values) { SpaceImage *sima = (SpaceImage *)ptr->data; - + if (sima->flag & SI_COORDFLOATS) { copy_v2_v2(values, sima->cursor); } else { int w, h; ED_space_image_get_size(sima, &w, &h); - + values[0] = sima->cursor[0] * w; values[1] = sima->cursor[1] * h; } @@ -917,14 +917,14 @@ static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *val static void rna_SpaceImageEditor_cursor_location_set(PointerRNA *ptr, const float *values) { SpaceImage *sima = (SpaceImage *)ptr->data; - + if (sima->flag & SI_COORDFLOATS) { copy_v2_v2(sima->cursor, values); } else { int w, h; ED_space_image_get_size(sima, &w, &h); - + sima->cursor[0] = values[0] / w; sima->cursor[1] = values[1] / h; } @@ -953,7 +953,7 @@ static void rna_SpaceImageEditor_scopes_update(struct bContext *C, struct Pointe SpaceImage *sima = (SpaceImage *)ptr->data; ImBuf *ibuf; void *lock; - + ibuf = ED_space_image_acquire_buffer(sima, &lock); if (ibuf) { ED_space_image_scopes_update(C, sima, ibuf, true); @@ -1032,12 +1032,12 @@ static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain), Scene *UNUSED { SpaceButs *sbuts = (SpaceButs *)(ptr->data); ID *id = sbuts->pinid; - + if (id == NULL) { sbuts->flag &= ~SB_PIN_CONTEXT; return; } - + switch (GS(id->name)) { case ID_MA: WM_main_add_notifier(NC_MATERIAL | ND_SHADING, NULL); @@ -1058,7 +1058,7 @@ static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain), Scene *UNUSED static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value) { SpaceButs *sbuts = (SpaceButs *)(ptr->data); - + sbuts->mainb = value; sbuts->mainbuser = value; } @@ -1213,7 +1213,7 @@ 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 string */ MEM_freeN(ci->line); ci->line = MEM_mallocN((len + 1) * sizeof(char), "rna_consoleline"); @@ -1241,7 +1241,7 @@ static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr, PointerRNA valu { SpaceAction *saction = (SpaceAction *)(ptr->data); bAction *act = (bAction *)value.data; - + if ((act == NULL) || (act->idroot == 0)) { /* just set if we're clearing the action or if the action is "amorphous" still */ saction->action = act; @@ -1279,7 +1279,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, bContext *C, Sce /* we must set this action to be the one used by active object (if not pinned) */ if (obact /* && saction->pin == 0*/) { AnimData *adt = NULL; - + if (saction->mode == SACTCONT_ACTION) { /* TODO: context selector could help decide this with more control? */ adt = BKE_animdata_add_id(&obact->id); /* this only adds if non-existent */ @@ -1289,7 +1289,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, bContext *C, Sce if (key) adt = BKE_animdata_add_id(&key->id); /* this only adds if non-existent */ } - + /* set action */ // FIXME: this overlaps a lot with the BKE_animdata_set_action() API method if (adt) { @@ -1297,11 +1297,11 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, bContext *C, Sce if (adt->action != saction->action) { /* NLA Tweak Mode needs special handling... */ if (adt->flag & ADT_NLA_EDIT_ON) { - /* Exit editmode first - we cannot change actions while in tweakmode + /* Exit editmode first - we cannot change actions while in tweakmode * NOTE: This will clear the action ref properly */ BKE_nla_tweakmode_exit(adt); - + /* Assign new action, and adjust the usercounts accordingly */ adt->action = saction->action; id_us_plus((ID *)adt->action); @@ -1311,7 +1311,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, bContext *C, Sce if (adt->action) { /* Fix id-count of action we're replacing */ id_us_min(&adt->action->id); - + /* To prevent data loss (i.e. if users flip between actions using the Browse menu), * stash this action if nothing else uses it. * @@ -1328,17 +1328,17 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, bContext *C, Sce BKE_nla_action_stash(adt); } } - + /* Assign new action, and adjust the usercounts accordingly */ adt->action = saction->action; id_us_plus((ID *)adt->action); } } - + /* Force update of animdata */ adt->recalc |= ADT_RECALC_ANIM; } - + /* force depsgraph flush too */ DAG_id_tag_update(&obact->id, OB_RECALC_OB | OB_RECALC_DATA); /* Update relations as well, so new time source dependency is added. */ @@ -1351,17 +1351,17 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), bContext * SpaceAction *saction = (SpaceAction *)(ptr->data); SceneLayer *sl = CTX_data_scene_layer(C); Object *obact = OBACT_NEW; - + /* special exceptions for ShapeKey Editor mode */ if (saction->mode == SACTCONT_SHAPEKEY) { Key *key = BKE_key_from_object(obact); - + /* 1) update the action stored for the editor */ if (key) saction->action = (key->adt) ? key->adt->action : NULL; else saction->action = NULL; - + /* 2) enable 'show sliders' by default, since one of the main * points of the ShapeKey Editor is to provide a one-stop shop * for controlling the shapekeys, whose main control is the value @@ -1377,7 +1377,7 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), bContext * else saction->action = NULL; } - + /* recalculate extents of channel list */ saction->flag |= SACTION_TEMP_NEEDCHANSYNC; } @@ -1387,7 +1387,7 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), bContext * static void rna_SpaceGraphEditor_display_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { ScrArea *sa = rna_area_from_space(ptr); - + /* after changing view mode, must force recalculation of F-Curve colors * which can only be achieved using refresh as opposed to redraw */ @@ -1477,7 +1477,7 @@ static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, const PointerRNA { SpaceNode *snode = (SpaceNode *)ptr->data; bNodeTree *ntree = (bNodeTree *)value.data; - + /* node tree type must match the selected type in node editor */ return (STREQ(snode->tree_idname, ntree->idname)); } @@ -1556,7 +1556,7 @@ static void rna_SpaceNodeEditor_show_backdrop_update(Main *UNUSED(bmain), Scene static void rna_SpaceNodeEditor_cursor_location_from_region(SpaceNode *snode, bContext *C, int x, int y) { ARegion *ar = CTX_wm_region(C); - + UI_view2d_region_to_view(&ar->v2d, x, y, &snode->cursor[0], &snode->cursor[1]); snode->cursor[0] /= UI_DPI_FAC; snode->cursor[1] /= UI_DPI_FAC; @@ -1908,12 +1908,12 @@ static void rna_def_space(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + srna = RNA_def_struct(brna, "Space", NULL); RNA_def_struct_sdna(srna, "SpaceLink"); RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area"); RNA_def_struct_refine_func(srna, "rna_Space_refine"); - + prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "spacetype"); RNA_def_property_enum_items(prop, rna_enum_space_type_items); @@ -2117,28 +2117,28 @@ static void rna_def_space_outliner(BlenderRNA *brna) "master collection hierarchy"}, {0, NULL, 0, NULL, NULL} }; - + srna = RNA_def_struct(brna, "SpaceOutliner", "Space"); RNA_def_struct_sdna(srna, "SpaceOops"); RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data"); - + prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); 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_SPACE | ND_SPACE_OUTLINER, NULL); - + prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "search_string"); RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string"); RNA_def_property_flag(prop, PROP_TEXTEDIT_UPDATE); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); - + prop = RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_CASE_SENSITIVE); RNA_def_property_ui_text(prop, "Case Sensitive Matches Only", "Only use case sensitive matches of search string"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); - + prop = RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_COMPLETE); RNA_def_property_ui_text(prop, "Complete Matches Only", "Only use complete matches of search string"); @@ -2234,17 +2234,17 @@ static void rna_def_background_image(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "cuser"); RNA_def_property_ui_text(prop, "Clip User", "Parameters defining which frame of the movie clip is displayed"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - + 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", "Offset image horizontally from the world origin"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - + 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", "Offset image vertically from the world origin"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - + prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "size"); RNA_def_property_float_funcs(prop, "rna_BackgroundImage_size_get", "rna_BackgroundImage_size_set", NULL); @@ -2364,7 +2364,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) {RV3D_CAMOB, "CAMERA", 0, "Camera", ""}, {0, NULL, 0, NULL, NULL} }; - + static EnumPropertyItem bundle_drawtype_items[] = { {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""}, {OB_ARROWS, "ARROWS", 0, "Arrows", ""}, @@ -2375,7 +2375,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) {OB_EMPTY_CONE, "CONE", 0, "Cone", ""}, {0, NULL, 0, NULL, NULL} }; - + static EnumPropertyItem view3d_matcap_items[] = { {ICON_MATCAP_01, "01", ICON_MATCAP_01, "", ""}, {ICON_MATCAP_02, "02", ICON_MATCAP_02, "", ""}, @@ -2403,7 +2403,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) {ICON_MATCAP_24, "24", ICON_MATCAP_24, "", ""}, {0, NULL, 0, NULL, NULL} }; - + static EnumPropertyItem debug_background_items[] = { {V3D_DEBUG_BACKGROUND_NONE, "NONE", 0, "None", ""}, {V3D_DEBUG_BACKGROUND_GRADIENT, "GRADIENT", 0, "Gradient", ""}, @@ -2414,7 +2414,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) srna = RNA_def_struct(brna, "SpaceView3D", "Space"); RNA_def_struct_sdna(srna, "View3D"); RNA_def_struct_ui_text(srna, "3D View Space", "3D View space data"); - + prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_sdna(prop, NULL, "camera"); @@ -2459,7 +2459,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_pointer_sdna(prop, NULL, "ob_centre"); RNA_def_property_ui_text(prop, "Lock to 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, "lock_bone", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "ob_centre_bone"); RNA_def_property_ui_text(prop, "Lock to Bone", "3D View center is locked to this bone's position"); @@ -2482,7 +2482,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) 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, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH); RNA_def_property_array(prop, 3); RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL); @@ -2490,13 +2490,13 @@ static void rna_def_space_view3d(BlenderRNA *brna) "3D cursor location for this view (dependent on local view setting)"); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - + prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_UNIT_CAMERA); RNA_def_property_float_sdna(prop, NULL, "lens"); RNA_def_property_ui_text(prop, "Lens", "Viewport lens angle"); 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_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "near"); RNA_def_property_range(prop, 1e-6f, FLT_MAX); @@ -2527,7 +2527,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_range(prop, 0, 1024); RNA_def_property_int_default(prop, 16); 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", "Number of subdivisions between grid lines"); @@ -2544,28 +2544,28 @@ static void rna_def_space_view3d(BlenderRNA *brna) 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, "show_axis_x", 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, "show_axis_y", 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, "show_axis_z", 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, "show_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, "show_all_objects_origin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS); RNA_def_property_ui_text(prop, "All Object Origins", @@ -2577,7 +2577,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) 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, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_GPENCIL); RNA_def_property_ui_text(prop, "Show Grease Pencil", @@ -2613,7 +2613,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_RENDER_OVERRIDE); RNA_def_property_ui_text(prop, "Only Render", "Display only objects which will be rendered"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - + prop = RNA_def_property(srna, "show_world", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_SHOW_WORLD); RNA_def_property_ui_text(prop, "World Background", "Display world colors in the background"); @@ -2643,7 +2643,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_enum_items(prop, pivot_items_full); RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update"); - + prop = RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN); RNA_def_property_ui_text(prop, "Align", "Manipulate center points (object, pose and weight paint mode only)"); @@ -2662,7 +2662,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_ENUM_FLAG); RNA_def_property_ui_text(prop, "Transform Manipulators", "Transformation manipulators"); 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); @@ -2700,7 +2700,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_array(prop, 8); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Local View Layers", "Local view layers visible in this 3D View"); - + prop = RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER); RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1); RNA_def_property_array(prop, 20); @@ -2752,7 +2752,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_MATCAP); RNA_def_property_ui_text(prop, "Matcap", "Active Objects draw images mapped on normals, enhancing Solid Draw Mode"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_matcap_enable"); - + prop = RNA_def_property(srna, "matcap_icon", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "matcap_icon"); RNA_def_property_enum_items(prop, view3d_matcap_items); @@ -2851,17 +2851,17 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_LOCKED); RNA_def_property_ui_text(prop, "Lock", "Lock view rotation in side views"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update"); - + prop = RNA_def_property(srna, "show_sync_view", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXVIEW); RNA_def_property_ui_text(prop, "Box", "Sync view position between side views"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update"); - + prop = RNA_def_property(srna, "use_box_clip", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXCLIP); RNA_def_property_ui_text(prop, "Clip", "Clip objects based on what's visible in other side views"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_clip_update"); - + prop = RNA_def_property(srna, "perspective_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_float_sdna(prop, NULL, "persmat"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* XXX: for now, it's too risky for users to do this */ @@ -2874,7 +2874,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); RNA_def_property_ui_text(prop, "Window Matrix", "Current window matrix"); - + prop = RNA_def_property(srna, "view_matrix", PROP_FLOAT, PROP_MATRIX); RNA_def_property_float_sdna(prop, NULL, "viewmat"); RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); @@ -2892,7 +2892,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1); RNA_def_property_ui_text(prop, "Is Perspective", ""); RNA_def_property_flag(prop, PROP_EDITABLE); - + prop = RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION); #if 0 RNA_def_property_float_sdna(prop, NULL, "ofs"); /* cant use because its negated */ @@ -2904,7 +2904,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "View Location", "View pivot location"); RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_update(prop, NC_WINDOW, NULL); - + prop = RNA_def_property(srna, "view_rotation", PROP_FLOAT, PROP_QUATERNION); /* cant use because its inverted */ #if 0 RNA_def_property_float_sdna(prop, NULL, "viewquat"); @@ -2915,7 +2915,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) #endif RNA_def_property_ui_text(prop, "View Rotation", "Rotation in quaternions (keep normalized)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - + /* not sure we need rna access to these but adding anyway */ prop = RNA_def_property(srna, "view_distance", PROP_FLOAT, PROP_UNSIGNED); RNA_def_property_float_sdna(prop, NULL, "dist"); @@ -2951,14 +2951,14 @@ static void rna_def_space_buttons(BlenderRNA *brna) srna = RNA_def_struct(brna, "SpaceProperties", "Space"); RNA_def_struct_sdna(srna, "SpaceButs"); RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data"); - + 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_enum_funcs(prop, NULL, "rna_SpaceProperties_context_set", "rna_SpaceProperties_context_itemf"); 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, "rna_SpaceProperties_context_update"); - + prop = RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "align"); RNA_def_property_enum_items(prop, align_items); @@ -3046,7 +3046,7 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_zoom_get", NULL, NULL); RNA_def_property_ui_text(prop, "Zoom", "Zoom factor"); - + /* image draw */ prop = RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE); @@ -3078,7 +3078,7 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_struct_type(prop, "SpaceUVEditor"); RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL); RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings"); - + /* mode */ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); @@ -3108,7 +3108,7 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); - + /* update */ prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "lock", 0); @@ -3147,7 +3147,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + static EnumPropertyItem view_type_items[] = { {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""}, @@ -3201,7 +3201,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) srna = RNA_def_struct(brna, "SpaceSequenceEditor", "Space"); RNA_def_struct_sdna(srna, "SpaceSeq"); RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data"); - + /* view type, fairly important */ prop = RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "view"); @@ -3222,17 +3222,17 @@ static void rna_def_space_sequencer(BlenderRNA *brna) 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_SEQUENCER, NULL); - + prop = RNA_def_property(srna, "show_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 than seconds"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - + prop = RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS); RNA_def_property_ui_text(prop, "Sync Markers", "Transform markers as well as strips"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - + prop = RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPARATED); RNA_def_property_ui_text(prop, "Separate Colors", "Separate color channels in preview"); @@ -3257,7 +3257,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES); RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - + prop = RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_GPENCIL); RNA_def_property_ui_text(prop, "Show Grease Pencil", @@ -3288,14 +3288,14 @@ static void rna_def_space_sequencer(BlenderRNA *brna) 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, NC_SPACE | ND_SPACE_SEQUENCER, NULL); - + prop = RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "render_size"); RNA_def_property_enum_items(prop, proxy_render_size_items); RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions"); 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"); @@ -3356,7 +3356,7 @@ static void rna_def_space_text(BlenderRNA *brna) 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_SPACE | ND_SPACE_TEXT, NULL); - + prop = RNA_def_property(srna, "show_line_highlight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "line_hlight", 0); RNA_def_property_ui_text(prop, "Highlight Line", "Highlight the current line"); @@ -3401,12 +3401,12 @@ static void rna_def_space_text(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "overwrite", 1); RNA_def_property_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TEXT, NULL); - + prop = RNA_def_property(srna, "use_live_edit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "live_edit", 1); RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TEXT, NULL); - + /* find */ prop = RNA_def_property(srna, "use_find_all", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL); @@ -3440,7 +3440,7 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + /* XXX: action-editor is currently for object-level only actions, so show that using object-icon hint */ static EnumPropertyItem mode_items[] = { {SACTCONT_DOPESHEET, "DOPESHEET", ICON_OOPS, "Dope Sheet", "Edit all keyframes in scene"}, @@ -3451,8 +3451,8 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) {SACTCONT_CACHEFILE, "CACHEFILE", ICON_FILE, "Cache File", "Edit timings for Cache File data-blocks"}, {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 Dope Sheet Editor", "Dope Sheet space data"); @@ -3465,7 +3465,7 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space"); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_SpaceDopeSheetEditor_action_update"); - + /* mode */ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); @@ -3473,44 +3473,44 @@ static void rna_def_space_dopesheet(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update"); - + /* 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_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_frame_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); - + prop = RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_POSEMARKERS_SHOW); RNA_def_property_ui_text(prop, "Show Pose Markers", "Show markers belonging to the active action instead of Scene markers " "(Action and Shape Key Editors only)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL); - + prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWGCOLORS); RNA_def_property_ui_text(prop, "Show Group Colors", "Draw groups and channels with colors matching their corresponding groups " "(pose bones only currently)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL); - + /* editing */ prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL); RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, NULL); - + prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOREALTIMEUPDATES); RNA_def_property_ui_text(prop, "Realtime Updates", @@ -3539,14 +3539,14 @@ static void rna_def_space_graph(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + static EnumPropertyItem mode_items[] = { {SIPO_MODE_ANIMATION, "FCURVES", ICON_IPO, "F-Curve", "Edit animation/keyframes displayed as 2D curves"}, {SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"}, {0, NULL, 0, NULL, NULL} }; - + /* this is basically the same as the one for the 3D-View, but with some entries omitted */ static EnumPropertyItem gpivot_items[] = { {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""}, @@ -3557,93 +3557,93 @@ static void rna_def_space_graph(BlenderRNA *brna) {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, "rna_SpaceGraphEditor_display_mode_update"); - + /* 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_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_frame_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_negative_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, "use_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); - + prop = RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELVHANDLESONLY); RNA_def_property_ui_text(prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - + prop = RNA_def_property(srna, "use_beauty_drawing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_BEAUTYDRAW_OFF); RNA_def_property_ui_text(prop, "Use High Quality Drawing", "Draw F-Curves using Anti-Aliasing and other fancy effects " "(disable for better performance)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - + prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWGCOLORS); RNA_def_property_ui_text(prop, "Show Group Colors", "Draw groups and channels with colors matching their corresponding groups"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - + /* editing */ prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL); RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - + prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOREALTIMEUPDATES); RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming keyframes, changes to the animation data are flushed to other views"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - + /* cursor */ prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCURSOR); RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - + prop = RNA_def_property(srna, "cursor_position_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cursorTime"); RNA_def_property_ui_text(prop, "Cursor X-Value", "Graph Editor 2D-Value cursor - X-Value component"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - + prop = RNA_def_property(srna, "cursor_position_y", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cursorVal"); RNA_def_property_ui_text(prop, "Cursor Y-Value", "Graph Editor 2D-Value cursor - Y-Value component"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, 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, gpivot_items); @@ -3687,34 +3687,34 @@ 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_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_frame_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 F-Curves", "Show influence F-Curves on strips"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NLA, NULL); - + prop = RNA_def_property(srna, "show_local_markers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOLOCALMARKERS); RNA_def_property_ui_text(prop, "Show Local Markers", "Show action-local markers on the strips, useful when synchronizing timing across strips"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NLA, NULL); - + /* editing */ prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOREALTIMEUPDATES); @@ -3740,54 +3740,54 @@ 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"); - + /* view settings */ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM); 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_TIME, NULL); - + prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TIME_DRAWFRAMES); RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - + /* displaying cache status */ prop = RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DISPLAY); RNA_def_property_ui_text(prop, "Show Cache", "Show the status of cached frames in the timeline"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - + prop = RNA_def_property(srna, "cache_softbody", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SOFTBODY); RNA_def_property_ui_text(prop, "Softbody", "Show the active object's softbody point cache"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - + prop = RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_PARTICLES); RNA_def_property_ui_text(prop, "Particles", "Show the active object's particle point cache"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - + prop = RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_CLOTH); RNA_def_property_ui_text(prop, "Cloth", "Show the active object's cloth point cache"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - + prop = RNA_def_property(srna, "cache_smoke", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SMOKE); RNA_def_property_ui_text(prop, "Smoke", "Show the active object's smoke cache"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - + prop = RNA_def_property(srna, "cache_dynamicpaint", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DYNAMICPAINT); RNA_def_property_ui_text(prop, "Dynamic Paint", "Show the active object's Dynamic Paint cache"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, NULL); - + prop = RNA_def_property(srna, "cache_rigidbody", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_RIGIDBODY); RNA_def_property_ui_text(prop, "Rigid Body", "Show the active object's Rigid Body cache"); @@ -3806,17 +3806,17 @@ 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"); - + prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_ConsoleLine_body_get", "rna_ConsoleLine_body_length", "rna_ConsoleLine_body_set"); RNA_def_property_ui_text(prop, "Line", "Text in the line"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CONSOLE, NULL); RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXT); - + 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"); @@ -3827,16 +3827,16 @@ static void rna_def_console_line(BlenderRNA *brna) RNA_def_property_enum_items(prop, console_line_type_items); RNA_def_property_ui_text(prop, "Type", "Console line type when used in scrollback"); } - + 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"); @@ -3848,14 +3848,14 @@ static void rna_def_space_console(BlenderRNA *brna) prop = RNA_def_property(srna, "select_start", PROP_INT, PROP_UNSIGNED); /* copied from text editor */ RNA_def_property_int_sdna(prop, NULL, "sel_start"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CONSOLE, NULL); - + prop = RNA_def_property(srna, "select_end", PROP_INT, PROP_UNSIGNED); /* copied from text editor */ RNA_def_property_int_sdna(prop, NULL, "sel_end"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CONSOLE, NULL); prop = RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Prompt", "Command line prompt"); - + prop = RNA_def_property(srna, "language", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Language", "Command line prompt language"); @@ -3863,7 +3863,7 @@ static void rna_def_space_console(BlenderRNA *brna) 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"); @@ -3874,7 +3874,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + static EnumPropertyItem file_display_items[] = { {FILE_SHORTDISPLAY, "LIST_SHORT", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, {FILE_LONGDISPLAY, "LIST_LONG", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, @@ -4138,7 +4138,7 @@ static void rna_def_space_filebrowser(BlenderRNA *brna) 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"); - + prop = RNA_def_property(srna, "active_operator", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "op"); RNA_def_property_ui_text(prop, "Active Operator", ""); @@ -4219,28 +4219,28 @@ static void rna_def_space_info(BlenderRNA *brna) srna = RNA_def_struct(brna, "SpaceInfo", "Space"); RNA_def_struct_sdna(srna, "SpaceInfo"); RNA_def_struct_ui_text(srna, "Space Info", "Info space data"); - + /* reporting display */ prop = RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_DEBUG); RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL); - + prop = RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_INFO); RNA_def_property_ui_text(prop, "Show Info", "Display general information"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL); - + prop = RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_OP); RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL); - + prop = RNA_def_property(srna, "show_report_warning", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_WARN); RNA_def_property_ui_text(prop, "Show Warn", "Display warnings"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO_REPORT, NULL); - + prop = RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_ERR); RNA_def_property_ui_text(prop, "Show Error", "Display error text"); @@ -4256,7 +4256,7 @@ static void rna_def_space_userpref(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - + 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"); @@ -4278,7 +4278,7 @@ static void rna_def_node_tree_path(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + srna = RNA_def_struct(brna, "NodeTreePath", NULL); RNA_def_struct_sdna(srna, "bNodeTreePath"); RNA_def_struct_ui_text(srna, "Node Tree Path", "Element of the node space tree path"); @@ -4445,7 +4445,7 @@ static void rna_def_space_node(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_AUTO_RENDER); RNA_def_property_ui_text(prop, "Auto Render", "Re-render and composite changed layers on 3D edits"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); - + prop = RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "zoom"); RNA_def_property_float_default(prop, 1.0f); @@ -4453,7 +4453,7 @@ static void rna_def_space_node(BlenderRNA *brna) RNA_def_property_ui_range(prop, 0.01, 100, 1, 2); RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); - + prop = RNA_def_property(srna, "backdrop_x", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xof"); RNA_def_property_ui_text(prop, "Backdrop X", "Backdrop X offset"); @@ -4513,12 +4513,12 @@ static void rna_def_space_logic(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_SEL); RNA_def_property_ui_text(prop, "Show Selected Object", "Show sensors of all selected objects"); RNA_def_property_update(prop, NC_LOGIC, NULL); - + prop = RNA_def_property(srna, "show_sensors_active_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_ACT); RNA_def_property_ui_text(prop, "Show Active Object", "Show sensors of active object"); RNA_def_property_update(prop, NC_LOGIC, NULL); - + prop = RNA_def_property(srna, "show_sensors_linked_controller", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_LINK); RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to the controller"); @@ -4534,7 +4534,7 @@ static void rna_def_space_logic(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_SEL); RNA_def_property_ui_text(prop, "Show Selected Object", "Show controllers of all selected objects"); RNA_def_property_update(prop, NC_LOGIC, NULL); - + prop = RNA_def_property(srna, "show_controllers_active_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_ACT); RNA_def_property_ui_text(prop, "Show Active Object", "Show controllers of active object"); @@ -4550,12 +4550,12 @@ static void rna_def_space_logic(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_SEL); RNA_def_property_ui_text(prop, "Show Selected Object", "Show actuators of all selected objects"); RNA_def_property_update(prop, NC_LOGIC, NULL); - + prop = RNA_def_property(srna, "show_actuators_active_object", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_ACT); RNA_def_property_ui_text(prop, "Show Active Object", "Show actuators of active object"); RNA_def_property_update(prop, NC_LOGIC, NULL); - + prop = RNA_def_property(srna, "show_actuators_linked_controller", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_LINK); RNA_def_property_ui_text(prop, "Show Linked to Actuator", "Show linked objects to the actuator"); |