2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2009-01-15 04:22:23 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-01-15 04:22:23 +00:00
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation (2008)
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2011-02-27 20:20:01 +00:00
|
|
|
/** \file blender/makesrna/intern/rna_space.c
|
|
|
|
|
* \ingroup RNA
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
2009-06-07 13:09:18 +00:00
|
|
|
#include "RNA_access.h"
|
2009-01-15 04:22:23 +00:00
|
|
|
#include "RNA_define.h"
|
|
|
|
|
|
|
|
|
|
#include "rna_internal.h"
|
|
|
|
|
|
2010-09-30 12:42:45 +00:00
|
|
|
#include "BKE_key.h"
|
2012-01-15 13:31:58 +00:00
|
|
|
#include "BKE_movieclip.h"
|
2010-09-30 12:42:45 +00:00
|
|
|
|
2009-06-22 03:26:36 +00:00
|
|
|
#include "DNA_action_types.h"
|
2010-09-30 12:42:45 +00:00
|
|
|
#include "DNA_key_types.h"
|
2009-08-19 00:55:30 +00:00
|
|
|
#include "DNA_node_types.h"
|
2009-05-31 01:22:34 +00:00
|
|
|
#include "DNA_object_types.h"
|
2009-01-15 04:22:23 +00:00
|
|
|
#include "DNA_space_types.h"
|
2011-09-11 10:35:26 +00:00
|
|
|
#include "DNA_sequence_types.h"
|
2009-05-31 01:22:34 +00:00
|
|
|
#include "DNA_view3d_types.h"
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2009-09-16 18:32:10 +00:00
|
|
|
#include "WM_api.h"
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
2011-11-02 18:20:53 +00:00
|
|
|
#include "RE_engine.h"
|
|
|
|
|
#include "RE_pipeline.h"
|
|
|
|
|
|
2011-09-05 21:01:50 +00:00
|
|
|
#include "RNA_enum_types.h"
|
|
|
|
|
|
2009-04-01 12:43:07 +00:00
|
|
|
EnumPropertyItem space_type_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{SPACE_EMPTY, "EMPTY", 0, "Empty", ""},
|
2010-09-06 05:40:52 +00:00
|
|
|
{SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{SPACE_IPO, "GRAPH_EDITOR", 0, "Graph Editor", ""},
|
|
|
|
|
{SPACE_OUTLINER, "OUTLINER", 0, "Outliner", ""},
|
2009-08-18 12:10:12 +00:00
|
|
|
{SPACE_BUTS, "PROPERTIES", 0, "Properties", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""},
|
|
|
|
|
{SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""},
|
2009-08-18 12:58:51 +00:00
|
|
|
{SPACE_INFO, "INFO", 0, "Info", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""},
|
|
|
|
|
{SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""},
|
|
|
|
|
{SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""},
|
|
|
|
|
{SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""},
|
|
|
|
|
{SPACE_TIME, "TIMELINE", 0, "Timeline", ""},
|
|
|
|
|
{SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""},
|
2009-06-16 13:09:36 +00:00
|
|
|
{SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
|
2010-11-11 13:36:57 +00:00
|
|
|
{SPACE_CONSOLE, "CONSOLE", 0, "Python Console", ""},
|
2009-08-18 12:58:51 +00:00
|
|
|
{SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
|
2011-11-07 12:55:18 +00:00
|
|
|
{SPACE_CLIP, "CLIP_EDITOR", 0, "Clip Editor", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-10-14 19:19:43 +00:00
|
|
|
static EnumPropertyItem draw_channels_items[] = {
|
2010-02-11 00:33:01 +00:00
|
|
|
{0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"},
|
|
|
|
|
{SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha", "Draw image with RGB colors and alpha transparency"},
|
|
|
|
|
{SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel"},
|
2011-09-27 10:37:02 +00:00
|
|
|
{SI_SHOW_ZBUF, "Z_BUFFER", ICON_IMAGE_ZDEPTH, "Z-Buffer",
|
|
|
|
|
"Draw Z-buffer associated with image (mapped from camera clip start to end)"},
|
2009-10-14 19:19:43 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-04-01 12:43:07 +00:00
|
|
|
|
2009-10-14 19:19:43 +00:00
|
|
|
static EnumPropertyItem transform_orientation_items[] = {
|
|
|
|
|
{V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"},
|
|
|
|
|
{V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"},
|
2011-04-11 01:18:25 +00:00
|
|
|
{V3D_MANIP_GIMBAL, "GIMBAL", 0, "Gimbal", "Align each axis to the Euler rotation axis as used for input"},
|
2011-09-27 10:37:02 +00:00
|
|
|
{V3D_MANIP_NORMAL, "NORMAL", 0, "Normal",
|
|
|
|
|
"Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)"},
|
2009-10-14 19:19:43 +00:00
|
|
|
{V3D_MANIP_VIEW, "VIEW", 0, "View", "Align the transformation axes to the window"},
|
|
|
|
|
{V3D_MANIP_CUSTOM, "CUSTOM", 0, "Custom", "Use a custom transform orientation"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-10-10 17:40:56 +00:00
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
EnumPropertyItem autosnap_items[] = {
|
2009-12-08 06:32:30 +00:00
|
|
|
{SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
|
2010-02-11 00:33:01 +00:00
|
|
|
{SACTSNAP_STEP, "STEP", 0, "Time Step", "Snap to 1.0 frame/second intervals"},
|
|
|
|
|
{SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames/seconds (nla-action time)"},
|
|
|
|
|
{SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker"},
|
2009-12-07 21:51:44 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
EnumPropertyItem viewport_shade_items[] = {
|
2010-03-16 17:37:34 +00:00
|
|
|
{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"},
|
2011-11-08 13:07:16 +00:00
|
|
|
{OB_TEXTURE, "TEXTURED", ICON_POTATO, "Texture", "Display the object solid, with a texture"},
|
|
|
|
|
{OB_MATERIAL, "MATERIAL", ICON_MATERIAL_DATA, "Material", "Display objects solid, with GLSL material"},
|
2011-11-02 18:20:53 +00:00
|
|
|
{OB_RENDER, "RENDERED", ICON_SMOOTH, "Rendered", "Display render preview"},
|
2010-03-16 17:37:34 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
|
|
2009-09-16 18:32:10 +00:00
|
|
|
#include "DNA_anim_types.h"
|
2009-02-10 23:17:58 +00:00
|
|
|
#include "DNA_scene_types.h"
|
2009-06-16 00:52:21 +00:00
|
|
|
#include "DNA_screen_types.h"
|
2009-02-10 23:17:58 +00:00
|
|
|
|
2010-03-17 00:05:40 +00:00
|
|
|
#include "BLI_math.h"
|
|
|
|
|
|
2009-09-16 18:32:10 +00:00
|
|
|
#include "BKE_animsys.h"
|
2009-02-10 23:17:58 +00:00
|
|
|
#include "BKE_brush.h"
|
2009-09-16 18:32:10 +00:00
|
|
|
#include "BKE_colortools.h"
|
2009-02-10 23:17:58 +00:00
|
|
|
#include "BKE_context.h"
|
2009-11-30 11:37:27 +00:00
|
|
|
#include "BKE_depsgraph.h"
|
2009-09-16 18:32:10 +00:00
|
|
|
#include "BKE_paint.h"
|
2011-11-08 13:07:16 +00:00
|
|
|
#include "BKE_scene.h"
|
|
|
|
|
#include "BKE_screen.h"
|
2009-02-10 23:17:58 +00:00
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
#include "ED_image.h"
|
2011-09-05 21:01:50 +00:00
|
|
|
#include "ED_node.h"
|
2009-08-16 23:37:46 +00:00
|
|
|
#include "ED_screen.h"
|
2009-12-03 09:49:21 +00:00
|
|
|
#include "ED_view3d.h"
|
2009-12-14 21:42:25 +00:00
|
|
|
#include "ED_sequencer.h"
|
2011-11-07 12:55:18 +00:00
|
|
|
#include "ED_clip.h"
|
2009-06-16 00:52:21 +00:00
|
|
|
|
|
|
|
|
#include "IMB_imbuf_types.h"
|
|
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SpaceLink *space= (SpaceLink*)ptr->data;
|
|
|
|
|
|
|
|
|
|
switch(space->spacetype) {
|
2009-05-31 01:22:34 +00:00
|
|
|
case SPACE_VIEW3D:
|
2010-04-28 07:25:39 +00:00
|
|
|
return &RNA_SpaceView3D;
|
2009-06-22 03:26:36 +00:00
|
|
|
case SPACE_IPO:
|
2009-02-02 11:51:10 +00:00
|
|
|
return &RNA_SpaceGraphEditor;
|
2009-03-26 14:05:33 +00:00
|
|
|
case SPACE_OUTLINER:
|
2009-01-15 04:22:23 +00:00
|
|
|
return &RNA_SpaceOutliner;
|
2009-06-02 08:08:41 +00:00
|
|
|
case SPACE_BUTS:
|
2009-08-18 12:58:51 +00:00
|
|
|
return &RNA_SpaceProperties;
|
2009-07-02 03:32:57 +00:00
|
|
|
case SPACE_FILE:
|
|
|
|
|
return &RNA_SpaceFileBrowser;
|
2009-01-15 04:22:23 +00:00
|
|
|
case SPACE_IMAGE:
|
|
|
|
|
return &RNA_SpaceImageEditor;
|
2009-08-18 12:58:51 +00:00
|
|
|
case SPACE_INFO:
|
|
|
|
|
return &RNA_SpaceInfo;
|
2009-01-15 04:22:23 +00:00
|
|
|
case SPACE_SEQ:
|
2009-06-09 05:39:01 +00:00
|
|
|
return &RNA_SpaceSequenceEditor;
|
2009-01-15 04:22:23 +00:00
|
|
|
case SPACE_TEXT:
|
|
|
|
|
return &RNA_SpaceTextEditor;
|
|
|
|
|
case SPACE_ACTION:
|
2009-06-22 03:26:36 +00:00
|
|
|
return &RNA_SpaceDopeSheetEditor;
|
2009-01-15 04:22:23 +00:00
|
|
|
case SPACE_NLA:
|
2009-06-12 06:44:49 +00:00
|
|
|
return &RNA_SpaceNLA;
|
2009-01-15 04:22:23 +00:00
|
|
|
case SPACE_TIME:
|
|
|
|
|
return &RNA_SpaceTimeline;
|
2009-08-18 12:58:51 +00:00
|
|
|
case SPACE_NODE:
|
2009-06-16 13:09:36 +00:00
|
|
|
return &RNA_SpaceNodeEditor;
|
|
|
|
|
case SPACE_LOGIC:
|
2009-08-18 12:58:51 +00:00
|
|
|
return &RNA_SpaceLogicEditor;
|
2009-07-16 00:50:27 +00:00
|
|
|
case SPACE_CONSOLE:
|
|
|
|
|
return &RNA_SpaceConsole;
|
2009-08-18 12:58:51 +00:00
|
|
|
case SPACE_USERPREF:
|
|
|
|
|
return &RNA_SpaceUserPreferences;
|
2011-11-07 12:55:18 +00:00
|
|
|
case SPACE_CLIP:
|
|
|
|
|
return &RNA_SpaceClipEditor;
|
2009-01-15 04:22:23 +00:00
|
|
|
default:
|
|
|
|
|
return &RNA_Space;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-01-30 03:22:22 +00:00
|
|
|
static ScrArea *rna_area_from_space(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
bScreen *sc = (bScreen*)ptr->id.data;
|
|
|
|
|
SpaceLink *link= (SpaceLink*)ptr->data;
|
|
|
|
|
ScrArea *sa;
|
|
|
|
|
|
|
|
|
|
for(sa=sc->areabase.first; sa; sa=sa->next)
|
|
|
|
|
if(BLI_findindex(&sa->spacedata, link) != -1)
|
|
|
|
|
return sa;
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_area_region_from_regiondata(PointerRNA *ptr, ScrArea **sa_r, ARegion **ar_r)
|
|
|
|
|
{
|
|
|
|
|
bScreen *sc = (bScreen*)ptr->id.data;
|
|
|
|
|
ScrArea *sa;
|
|
|
|
|
ARegion *ar;
|
|
|
|
|
void *regiondata= ptr->data;
|
|
|
|
|
|
|
|
|
|
*sa_r= NULL;
|
|
|
|
|
*ar_r= NULL;
|
|
|
|
|
|
|
|
|
|
for(sa=sc->areabase.first; sa; sa=sa->next) {
|
|
|
|
|
for(ar=sa->regionbase.first; ar; ar=ar->next) {
|
|
|
|
|
if(ar->regiondata == regiondata) {
|
|
|
|
|
*sa_r= sa;
|
|
|
|
|
*ar_r= ar;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-10-14 21:05:35 +00:00
|
|
|
static PointerRNA rna_CurrentOrientation_get(PointerRNA *ptr)
|
2009-10-10 17:40:56 +00:00
|
|
|
{
|
2009-10-14 21:05:35 +00:00
|
|
|
Scene *scene = ((bScreen*)ptr->id.data)->scene;
|
2009-10-10 17:40:56 +00:00
|
|
|
View3D *v3d= (View3D*)ptr->data;
|
2009-10-14 21:05:35 +00:00
|
|
|
|
2009-11-01 20:17:30 +00:00
|
|
|
if (v3d->twmode < V3D_MANIP_CUSTOM)
|
2009-10-14 21:05:35 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, NULL);
|
|
|
|
|
else
|
2011-09-27 10:37:02 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation,
|
|
|
|
|
BLI_findlink(&scene->transform_spaces, v3d->twmode - V3D_MANIP_CUSTOM));
|
2009-10-10 17:40:56 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-26 13:38:16 +00:00
|
|
|
EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
|
2009-10-10 17:40:56 +00:00
|
|
|
{
|
2009-10-15 01:34:29 +00:00
|
|
|
Scene *scene = NULL;
|
2009-10-10 17:40:56 +00:00
|
|
|
ListBase *transform_spaces;
|
|
|
|
|
TransformOrientation *ts= NULL;
|
|
|
|
|
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
|
|
|
|
EnumPropertyItem *item= NULL;
|
|
|
|
|
int i = V3D_MANIP_CUSTOM, totitem= 0;
|
|
|
|
|
|
2009-10-14 19:19:43 +00:00
|
|
|
RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_GLOBAL);
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_NORMAL);
|
2009-10-28 20:30:33 +00:00
|
|
|
RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_GIMBAL);
|
2009-10-14 19:19:43 +00:00
|
|
|
RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_LOCAL);
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_VIEW);
|
|
|
|
|
|
2010-04-28 07:25:39 +00:00
|
|
|
if (ptr->type == &RNA_SpaceView3D)
|
2009-10-15 01:34:29 +00:00
|
|
|
scene = ((bScreen*)ptr->id.data)->scene;
|
|
|
|
|
else
|
|
|
|
|
scene = CTX_data_scene(C); /* can't use scene from ptr->id.data because that enum is also used by operators */
|
|
|
|
|
|
2009-10-14 19:19:43 +00:00
|
|
|
if(scene) {
|
|
|
|
|
transform_spaces = &scene->transform_spaces;
|
|
|
|
|
ts = transform_spaces->first;
|
2009-10-10 17:40:56 +00:00
|
|
|
}
|
2009-10-14 19:19:43 +00:00
|
|
|
|
2009-10-10 17:40:56 +00:00
|
|
|
if(ts)
|
2009-10-15 01:34:29 +00:00
|
|
|
{
|
2009-10-10 17:40:56 +00:00
|
|
|
RNA_enum_item_add_separator(&item, &totitem);
|
|
|
|
|
|
2009-10-15 01:34:29 +00:00
|
|
|
for(; ts; ts = ts->next) {
|
|
|
|
|
tmp.identifier = ts->name;
|
|
|
|
|
tmp.name= ts->name;
|
|
|
|
|
tmp.value = i++;
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
2009-10-10 17:40:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
|
|
|
|
*free= 1;
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
2009-11-28 21:27:28 +00:00
|
|
|
/* Space 3D View */
|
2010-04-28 07:25:39 +00:00
|
|
|
static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, int value)
|
2009-11-28 21:27:28 +00:00
|
|
|
{
|
|
|
|
|
View3D *v3d= (View3D*)(ptr->data);
|
|
|
|
|
bScreen *sc= (bScreen*)ptr->id.data;
|
|
|
|
|
|
|
|
|
|
v3d->scenelock = value;
|
|
|
|
|
|
|
|
|
|
if(value) {
|
|
|
|
|
int bit;
|
|
|
|
|
v3d->lay= sc->scene->lay;
|
|
|
|
|
/* seek for layact */
|
|
|
|
|
bit= 0;
|
|
|
|
|
while(bit<32) {
|
|
|
|
|
if(v3d->lay & (1<<bit)) {
|
|
|
|
|
v3d->layact= 1<<bit;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
bit++;
|
|
|
|
|
}
|
|
|
|
|
v3d->camera= sc->scene->camera;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-17 00:05:40 +00:00
|
|
|
static void rna_View3D_CursorLocation_get(PointerRNA *ptr, float *values)
|
|
|
|
|
{
|
|
|
|
|
View3D *v3d= (View3D*)(ptr->data);
|
|
|
|
|
bScreen *sc= (bScreen*)ptr->id.data;
|
|
|
|
|
Scene *scene= (Scene *)sc->scene;
|
|
|
|
|
float *loc = give_cursor(scene, v3d);
|
|
|
|
|
|
|
|
|
|
copy_v3_v3(values, loc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_View3D_CursorLocation_set(PointerRNA *ptr, const float *values)
|
|
|
|
|
{
|
|
|
|
|
View3D *v3d= (View3D*)(ptr->data);
|
|
|
|
|
bScreen *sc= (bScreen*)ptr->id.data;
|
|
|
|
|
Scene *scene= (Scene *)sc->scene;
|
|
|
|
|
float *cursor = give_cursor(scene, v3d);
|
|
|
|
|
|
|
|
|
|
copy_v3_v3(cursor, values);
|
|
|
|
|
}
|
|
|
|
|
|
2010-04-28 07:25:39 +00:00
|
|
|
static void rna_SpaceView3D_layer_set(PointerRNA *ptr, const int *values)
|
2009-12-03 09:49:21 +00:00
|
|
|
{
|
|
|
|
|
View3D *v3d= (View3D*)(ptr->data);
|
|
|
|
|
|
2010-06-04 01:39:34 +00:00
|
|
|
v3d->lay= ED_view3d_scene_layer_set(v3d->lay, values, &v3d->layact);
|
2009-12-03 09:49:21 +00:00
|
|
|
}
|
2009-11-28 21:27:28 +00:00
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
|
2011-03-23 14:06:44 +00:00
|
|
|
{
|
|
|
|
|
DAG_on_visible_update(bmain, FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-02 18:20:53 +00:00
|
|
|
static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
View3D *v3d= (View3D*)(ptr->data);
|
|
|
|
|
ScrArea *sa= rna_area_from_space(ptr);
|
|
|
|
|
|
|
|
|
|
if(v3d->drawtype != OB_RENDER) {
|
|
|
|
|
ARegion *ar;
|
|
|
|
|
|
|
|
|
|
for(ar=sa->regionbase.first; ar; ar=ar->next) {
|
|
|
|
|
RegionView3D *rv3d = ar->regiondata;
|
|
|
|
|
|
|
|
|
|
if(rv3d && rv3d->render_engine) {
|
|
|
|
|
RE_engine_free(rv3d->render_engine);
|
|
|
|
|
rv3d->render_engine= NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-03 12:37:15 +00:00
|
|
|
static void rna_SpaceView3D_pivot_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
if (U.uiflag & USER_LOCKAROUND) {
|
|
|
|
|
View3D *v3d_act= (View3D*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
/* TODO, space looper */
|
|
|
|
|
bScreen *screen;
|
|
|
|
|
for(screen= bmain->screen.first; screen; screen= screen->id.next) {
|
|
|
|
|
ScrArea *sa;
|
|
|
|
|
for(sa= screen->areabase.first; sa; sa= sa->next) {
|
|
|
|
|
SpaceLink *sl;
|
|
|
|
|
for(sl= sa->spacedata.first; sl ;sl= sl->next) {
|
|
|
|
|
if(sl->spacetype==SPACE_VIEW3D) {
|
|
|
|
|
View3D *v3d= (View3D *)sl;
|
|
|
|
|
if (v3d != v3d_act) {
|
|
|
|
|
v3d->around= v3d_act->around;
|
|
|
|
|
v3d->flag= (v3d->flag & ~V3D_ALIGN) | (v3d_act->flag & V3D_ALIGN);
|
|
|
|
|
ED_area_tag_redraw_regiontype(sa, RGN_TYPE_HEADER);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-01-30 03:22:22 +00:00
|
|
|
static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
View3D *v3d= (View3D*)(ptr->data);
|
|
|
|
|
ScrArea *sa= rna_area_from_space(ptr);
|
2010-07-30 11:19:41 +00:00
|
|
|
void *regiondata= NULL;
|
|
|
|
|
if(sa) {
|
|
|
|
|
ListBase *regionbase= (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
|
|
|
|
|
ARegion *ar= regionbase->last; /* always last in list, weak .. */
|
|
|
|
|
regiondata= ar->regiondata;
|
|
|
|
|
}
|
2010-01-30 03:22:22 +00:00
|
|
|
|
2010-07-30 11:19:41 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_RegionView3D, regiondata);
|
2010-01-30 03:22:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static PointerRNA rna_SpaceView3D_region_quadview_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
View3D *v3d= (View3D*)(ptr->data);
|
|
|
|
|
ScrArea *sa= rna_area_from_space(ptr);
|
2010-07-30 11:19:41 +00:00
|
|
|
void *regiondata= NULL;
|
|
|
|
|
if(sa) {
|
|
|
|
|
ListBase *regionbase= (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
|
|
|
|
|
ARegion *ar= regionbase->last; /* always before last in list, weak .. */
|
|
|
|
|
|
|
|
|
|
ar= (ar->alignment == RGN_ALIGN_QSPLIT)? ar->prev: NULL;
|
|
|
|
|
if(ar) {
|
|
|
|
|
regiondata= ar->regiondata;
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-01-30 03:22:22 +00:00
|
|
|
|
2010-07-30 11:19:41 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_RegionView3D, regiondata);
|
2010-01-30 03:22:22 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_RegionView3D_quadview_update(Main *UNUSED(main), Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-01-30 03:22:22 +00:00
|
|
|
{
|
|
|
|
|
ScrArea *sa;
|
|
|
|
|
ARegion *ar;
|
|
|
|
|
|
|
|
|
|
rna_area_region_from_regiondata(ptr, &sa, &ar);
|
|
|
|
|
if(sa && ar && ar->alignment==RGN_ALIGN_QSPLIT)
|
2010-11-08 03:44:52 +00:00
|
|
|
ED_view3d_quadview_update(sa, ar, FALSE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* same as above but call clip==TRUE */
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main), Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-11-08 03:44:52 +00:00
|
|
|
{
|
|
|
|
|
ScrArea *sa;
|
|
|
|
|
ARegion *ar;
|
|
|
|
|
|
|
|
|
|
rna_area_region_from_regiondata(ptr, &sa, &ar);
|
|
|
|
|
if(sa && ar && ar->alignment==RGN_ALIGN_QSPLIT)
|
|
|
|
|
ED_view3d_quadview_update(sa, ar, TRUE);
|
2010-01-30 03:22:22 +00:00
|
|
|
}
|
|
|
|
|
|
2010-05-19 21:10:46 +00:00
|
|
|
static void rna_RegionView3D_view_location_get(PointerRNA *ptr, float *values)
|
|
|
|
|
{
|
|
|
|
|
RegionView3D *rv3d= (RegionView3D *)(ptr->data);
|
|
|
|
|
negate_v3_v3(values, rv3d->ofs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RegionView3D_view_location_set(PointerRNA *ptr, const float *values)
|
|
|
|
|
{
|
|
|
|
|
RegionView3D *rv3d= (RegionView3D *)(ptr->data);
|
|
|
|
|
negate_v3_v3(rv3d->ofs, values);
|
|
|
|
|
}
|
|
|
|
|
|
2011-04-25 03:02:26 +00:00
|
|
|
static void rna_RegionView3D_view_rotation_get(PointerRNA *ptr, float *values)
|
|
|
|
|
{
|
|
|
|
|
RegionView3D *rv3d= (RegionView3D *)(ptr->data);
|
|
|
|
|
invert_qt_qt(values, rv3d->viewquat);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RegionView3D_view_rotation_set(PointerRNA *ptr, const float *values)
|
|
|
|
|
{
|
|
|
|
|
RegionView3D *rv3d= (RegionView3D *)(ptr->data);
|
|
|
|
|
invert_qt_qt(rv3d->viewquat, values);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *values)
|
|
|
|
|
{
|
|
|
|
|
RegionView3D *rv3d= (RegionView3D *)(ptr->data);
|
|
|
|
|
negate_v3_v3(rv3d->ofs, values);
|
2011-05-14 04:25:47 +00:00
|
|
|
ED_view3d_from_m4((float (*)[4])values, rv3d->ofs, rv3d->viewquat, &rv3d->dist);
|
2011-04-25 03:02:26 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-02 18:20:53 +00:00
|
|
|
static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = ((bScreen*)ptr->id.data)->scene;
|
|
|
|
|
RenderEngineType *type = RE_engines_find(scene->r.engine);
|
|
|
|
|
|
|
|
|
|
EnumPropertyItem *item= NULL;
|
|
|
|
|
int totitem= 0;
|
|
|
|
|
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_BOUNDBOX);
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_WIRE);
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_SOLID);
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_TEXTURE);
|
2011-11-08 13:07:16 +00:00
|
|
|
|
|
|
|
|
if(scene_use_new_shading_nodes(scene))
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_MATERIAL);
|
2011-11-02 18:20:53 +00:00
|
|
|
|
2011-11-08 13:07:16 +00:00
|
|
|
if(type->view_draw)
|
2011-11-02 18:20:53 +00:00
|
|
|
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_RENDER);
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
|
|
|
|
*free= 1;
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
/* Space Image Editor */
|
|
|
|
|
|
|
|
|
|
static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
|
2009-01-15 04:22:23 +00:00
|
|
|
{
|
2009-02-02 19:57:57 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_SpaceUVEditor, ptr->data);
|
2009-01-15 04:22:23 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceImageEditor_paint_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
|
2009-02-10 23:17:58 +00:00
|
|
|
{
|
2009-12-08 17:23:48 +00:00
|
|
|
paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT);
|
2010-10-20 00:42:19 +00:00
|
|
|
|
|
|
|
|
ED_space_image_paint_update(bmain->wm.first, scene->toolsettings);
|
2009-02-10 23:17:58 +00:00
|
|
|
}
|
|
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)(ptr->data);
|
|
|
|
|
return ED_space_image_show_render(sima);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_SpaceImageEditor_show_paint_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)(ptr->data);
|
|
|
|
|
return ED_space_image_show_paint(sima);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)(ptr->data);
|
|
|
|
|
bScreen *sc= (bScreen*)ptr->id.data;
|
|
|
|
|
return ED_space_image_show_uvedit(sima, sc->scene->obedit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)(ptr->data);
|
|
|
|
|
bScreen *sc= (bScreen*)ptr->id.data;
|
|
|
|
|
|
2011-11-10 13:39:25 +00:00
|
|
|
ED_space_image_set(sima, sc->scene, sc->scene->obedit, (Image*)value.data);
|
2009-06-16 00:52:21 +00:00
|
|
|
}
|
|
|
|
|
|
2011-09-27 10:37:02 +00:00
|
|
|
static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUSED(C), PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *UNUSED(prop), int *free)
|
2009-06-16 00:52:21 +00:00
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)ptr->data;
|
2009-10-14 19:19:43 +00:00
|
|
|
EnumPropertyItem *item= NULL;
|
2009-09-30 18:18:32 +00:00
|
|
|
ImBuf *ibuf;
|
|
|
|
|
void *lock;
|
2009-10-14 19:19:43 +00:00
|
|
|
int zbuf, alpha, totitem= 0;
|
2009-06-16 00:52:21 +00:00
|
|
|
|
2009-09-30 18:18:32 +00:00
|
|
|
ibuf= ED_space_image_acquire_buffer(sima, &lock);
|
|
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
alpha= ibuf && (ibuf->channels == 4);
|
|
|
|
|
zbuf= ibuf && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1));
|
|
|
|
|
|
2009-09-30 18:18:32 +00:00
|
|
|
ED_space_image_release_buffer(sima, lock);
|
|
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
if(alpha && zbuf)
|
2009-10-14 19:19:43 +00:00
|
|
|
return draw_channels_items;
|
|
|
|
|
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, 0);
|
|
|
|
|
|
|
|
|
|
if(alpha) {
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_USE_ALPHA);
|
2009-11-10 04:03:29 +00:00
|
|
|
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_SHOW_ALPHA);
|
2009-10-14 19:19:43 +00:00
|
|
|
}
|
|
|
|
|
else if(zbuf) {
|
|
|
|
|
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_SHOW_ZBUF);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
|
|
|
|
*free= 1;
|
|
|
|
|
|
|
|
|
|
return item;
|
2009-06-16 00:52:21 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-12 01:57:47 +00:00
|
|
|
static void rna_SpaceImageEditor_zoom_get(PointerRNA *ptr, float *values)
|
|
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)ptr->data;
|
|
|
|
|
ScrArea *sa;
|
|
|
|
|
ARegion *ar;
|
|
|
|
|
|
|
|
|
|
values[0] = values[1] = 1;
|
|
|
|
|
|
|
|
|
|
/* find aregion */
|
2011-05-20 05:27:31 +00:00
|
|
|
sa= rna_area_from_space(ptr); /* can be NULL */
|
|
|
|
|
ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
|
|
|
|
|
if(ar) {
|
|
|
|
|
ED_space_image_zoom(sima, ar, &values[0], &values[1]);
|
2011-05-12 01:57:47 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-30 05:52:05 +00:00
|
|
|
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_size(sima, &w, &h);
|
|
|
|
|
|
|
|
|
|
values[0] = sima->cursor[0] * w;
|
|
|
|
|
values[1] = sima->cursor[1] * h;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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_size(sima, &w, &h);
|
|
|
|
|
|
|
|
|
|
sima->cursor[0] = values[0] / w;
|
|
|
|
|
sima->cursor[1] = values[1] / h;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceImageEditor_curves_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2009-09-16 19:27:08 +00:00
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)ptr->data;
|
2009-09-30 18:18:32 +00:00
|
|
|
ImBuf *ibuf;
|
|
|
|
|
void *lock;
|
|
|
|
|
|
|
|
|
|
ibuf= ED_space_image_acquire_buffer(sima, &lock);
|
2010-10-02 19:31:58 +00:00
|
|
|
if(ibuf->rect_float)
|
|
|
|
|
curvemapping_do_ibuf(sima->cumap, ibuf);
|
2009-09-30 18:18:32 +00:00
|
|
|
ED_space_image_release_buffer(sima, lock);
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2009-12-08 17:23:48 +00:00
|
|
|
WM_main_add_notifier(NC_IMAGE, sima->image);
|
2009-09-16 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceImageEditor_scopes_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
|
2010-01-19 01:32:06 +00:00
|
|
|
{
|
|
|
|
|
SpaceImage *sima= (SpaceImage*)ptr->data;
|
|
|
|
|
ImBuf *ibuf;
|
|
|
|
|
void *lock;
|
|
|
|
|
|
|
|
|
|
ibuf= ED_space_image_acquire_buffer(sima, &lock);
|
2010-02-15 20:41:39 +00:00
|
|
|
if(ibuf) {
|
2010-04-06 02:05:54 +00:00
|
|
|
scopes_update(&sima->scopes, ibuf, scene->r.color_mgt_flag & R_COLOR_MANAGEMENT);
|
2010-02-15 20:41:39 +00:00
|
|
|
WM_main_add_notifier(NC_IMAGE, sima->image);
|
|
|
|
|
}
|
2010-01-19 01:32:06 +00:00
|
|
|
ED_space_image_release_buffer(sima, lock);
|
|
|
|
|
}
|
|
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
/* Space Text Editor */
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value)
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
{
|
|
|
|
|
SpaceText *st= (SpaceText*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
st->wordwrap= value;
|
|
|
|
|
st->left= 0;
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
|
2009-03-22 14:46:45 +00:00
|
|
|
{
|
|
|
|
|
SpaceText *st= (SpaceText*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
st->text= value.data;
|
2011-09-02 09:39:21 +00:00
|
|
|
|
|
|
|
|
WM_main_add_notifier(NC_TEXT|NA_SELECTED, st->text);
|
2009-03-22 14:46:45 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceTextEditor_updateEdited(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2011-04-23 08:52:27 +00:00
|
|
|
{
|
|
|
|
|
SpaceText *st= (SpaceText*)ptr->data;
|
|
|
|
|
|
|
|
|
|
if(st->text)
|
|
|
|
|
WM_main_add_notifier(NC_TEXT|NA_EDITED, st->text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
/* Space Properties */
|
2009-06-16 00:52:21 +00:00
|
|
|
|
2010-04-28 11:05:11 +00:00
|
|
|
/* note: this function exists only to avoid id refcounting */
|
|
|
|
|
static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
2011-04-21 13:11:51 +00:00
|
|
|
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
|
|
|
|
|
sbuts->pinid= value.data;
|
2010-04-28 11:05:11 +00:00
|
|
|
}
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
|
2009-06-07 13:09:18 +00:00
|
|
|
{
|
|
|
|
|
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
if(sbuts->pinid)
|
|
|
|
|
return ID_code_to_RNA_type(GS(sbuts->pinid->name));
|
|
|
|
|
|
|
|
|
|
return &RNA_ID;
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-05-18 05:40:30 +00:00
|
|
|
{
|
|
|
|
|
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
|
|
|
|
|
ID *id = sbuts->pinid;
|
|
|
|
|
|
2010-05-28 07:16:55 +00:00
|
|
|
if (id == NULL) {
|
|
|
|
|
sbuts->flag &= ~SB_PIN_CONTEXT;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2010-05-18 05:40:30 +00:00
|
|
|
switch (GS(id->name)) {
|
|
|
|
|
case ID_MA:
|
|
|
|
|
WM_main_add_notifier(NC_MATERIAL|ND_SHADING, NULL);
|
|
|
|
|
break;
|
|
|
|
|
case ID_TE:
|
|
|
|
|
WM_main_add_notifier(NC_TEXTURE, NULL);
|
|
|
|
|
break;
|
|
|
|
|
case ID_WO:
|
|
|
|
|
WM_main_add_notifier(NC_WORLD, NULL);
|
|
|
|
|
break;
|
|
|
|
|
case ID_LA:
|
|
|
|
|
WM_main_add_notifier(NC_LAMP, NULL);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2011-01-06 02:20:30 +00:00
|
|
|
static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
|
|
|
|
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
sbuts->mainb= value;
|
|
|
|
|
sbuts->mainbuser = value;
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static void rna_SpaceProperties_align_set(PointerRNA *ptr, int value)
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
{
|
|
|
|
|
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
sbuts->align= value;
|
|
|
|
|
sbuts->re_align= 1;
|
|
|
|
|
}
|
|
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
/* Space Console */
|
2010-08-11 05:21:43 +00:00
|
|
|
static void rna_ConsoleLine_body_get(PointerRNA *ptr, char *value)
|
2009-07-16 00:50:27 +00:00
|
|
|
{
|
|
|
|
|
ConsoleLine *ci= (ConsoleLine*)ptr->data;
|
|
|
|
|
strcpy(value, ci->line);
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-11 05:21:43 +00:00
|
|
|
static int rna_ConsoleLine_body_length(PointerRNA *ptr)
|
2009-07-16 00:50:27 +00:00
|
|
|
{
|
|
|
|
|
ConsoleLine *ci= (ConsoleLine*)ptr->data;
|
|
|
|
|
return ci->len;
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-11 05:21:43 +00:00
|
|
|
static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value)
|
2009-07-16 00:50:27 +00:00
|
|
|
{
|
|
|
|
|
ConsoleLine *ci= (ConsoleLine*)ptr->data;
|
|
|
|
|
int len= strlen(value);
|
|
|
|
|
|
2011-03-14 06:48:51 +00:00
|
|
|
if((len >= ci->len_alloc) || (len * 2 < ci->len_alloc) ) { /* allocate a new string */
|
2009-07-16 00:50:27 +00:00
|
|
|
MEM_freeN(ci->line);
|
2010-08-11 05:21:43 +00:00
|
|
|
ci->line= MEM_mallocN((len + 1) * sizeof(char), "rna_consoleline");
|
|
|
|
|
ci->len_alloc= len + 1;
|
2009-07-16 00:50:27 +00:00
|
|
|
}
|
2010-08-11 05:21:43 +00:00
|
|
|
memcpy(ci->line, value, len + 1);
|
2009-07-16 00:50:27 +00:00
|
|
|
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;
|
2011-06-23 06:13:21 +00:00
|
|
|
*max= ci->len; /* intentionally _not_ -1 */
|
2009-07-16 00:50:27 +00:00
|
|
|
}
|
|
|
|
|
|
2009-09-16 18:32:10 +00:00
|
|
|
/* Space Dopesheet */
|
|
|
|
|
|
|
|
|
|
static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
|
|
|
|
SpaceAction *saction= (SpaceAction*)(ptr->data);
|
2011-04-19 13:01:50 +00:00
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* action to set must strictly meet the mode criteria... */
|
|
|
|
|
if (saction->mode == SACTCONT_ACTION) {
|
|
|
|
|
/* currently, this is "object-level" only, until we have some way of specifying this */
|
|
|
|
|
if (act->idroot == ID_OB)
|
|
|
|
|
saction->action = act;
|
|
|
|
|
else
|
2011-09-27 10:37:02 +00:00
|
|
|
printf("ERROR: cannot assign Action '%s' to Action Editor, as action is not object-level animation\n",
|
|
|
|
|
act->id.name+2);
|
2011-04-19 13:01:50 +00:00
|
|
|
}
|
|
|
|
|
else if (saction->mode == SACTCONT_SHAPEKEY) {
|
|
|
|
|
/* as the name says, "shapekey-level" only... */
|
|
|
|
|
if (act->idroot == ID_KE)
|
|
|
|
|
saction->action = act;
|
|
|
|
|
else
|
2011-09-27 10:37:02 +00:00
|
|
|
printf("ERROR: cannot assign Action '%s' to Shape Key Editor, as action doesn't animate Shape Keys\n",
|
|
|
|
|
act->id.name+2);
|
2011-04-19 13:01:50 +00:00
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
printf("ACK: who's trying to set an action while not in a mode displaying a single Action only?\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
2009-09-16 18:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
|
2009-09-16 18:32:10 +00:00
|
|
|
{
|
|
|
|
|
SpaceAction *saction= (SpaceAction*)(ptr->data);
|
2009-12-08 17:23:48 +00:00
|
|
|
Object *obact= (scene->basact)? scene->basact->object: NULL;
|
2009-09-16 18:32:10 +00:00
|
|
|
|
|
|
|
|
/* we must set this action to be the one used by active object (if not pinned) */
|
2010-09-30 12:42:45 +00:00
|
|
|
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_id_add_animdata(&obact->id); /* this only adds if non-existant */
|
|
|
|
|
}
|
|
|
|
|
else if (saction->mode == SACTCONT_SHAPEKEY) {
|
|
|
|
|
Key *key = ob_get_key(obact);
|
|
|
|
|
if (key)
|
|
|
|
|
adt= BKE_id_add_animdata(&key->id); /* this only adds if non-existant */
|
|
|
|
|
}
|
2009-09-16 18:32:10 +00:00
|
|
|
|
|
|
|
|
/* set action */
|
2010-09-30 12:42:45 +00:00
|
|
|
if (adt) {
|
|
|
|
|
/* fix id-count of action we're replacing */
|
|
|
|
|
id_us_min(&adt->action->id);
|
|
|
|
|
|
|
|
|
|
/* show new id-count of action we're replacing */
|
|
|
|
|
adt->action= saction->action;
|
|
|
|
|
id_us_plus(&adt->action->id);
|
|
|
|
|
}
|
2009-11-29 05:56:39 +00:00
|
|
|
|
|
|
|
|
/* force depsgraph flush too */
|
2010-12-05 18:59:23 +00:00
|
|
|
DAG_id_tag_update(&obact->id, OB_RECALC_OB|OB_RECALC_DATA);
|
2009-09-16 18:32:10 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
|
2009-12-08 09:07:20 +00:00
|
|
|
{
|
|
|
|
|
SpaceAction *saction= (SpaceAction*)(ptr->data);
|
2010-09-30 12:42:45 +00:00
|
|
|
Object *obact= (scene->basact)? scene->basact->object: NULL;
|
2010-02-03 00:54:26 +00:00
|
|
|
|
2010-09-30 12:42:45 +00:00
|
|
|
/* special exceptions for ShapeKey Editor mode */
|
|
|
|
|
if (saction->mode == SACTCONT_SHAPEKEY) {
|
|
|
|
|
Key *key = ob_get_key(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
|
|
|
|
|
*/
|
2009-12-08 09:07:20 +00:00
|
|
|
saction->flag |= SACTION_SLIDERS;
|
2010-09-30 12:42:45 +00:00
|
|
|
}
|
|
|
|
|
/* make sure action stored is valid */
|
|
|
|
|
else if (saction->mode == SACTCONT_ACTION) {
|
|
|
|
|
/* 1) update the action stored for the editor */
|
|
|
|
|
// TODO: context selector could help decide this with more control?
|
|
|
|
|
if (obact)
|
|
|
|
|
saction->action = (obact->adt)? obact->adt->action : NULL;
|
|
|
|
|
else
|
|
|
|
|
saction->action = NULL;
|
|
|
|
|
}
|
2009-12-08 09:07:20 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-03 00:54:26 +00:00
|
|
|
/* Space Graph Editor */
|
|
|
|
|
|
2011-09-05 19:34:27 +00:00
|
|
|
static void rna_SpaceGraphEditor_display_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-02-03 00:54:26 +00:00
|
|
|
{
|
2011-09-05 19:34:27 +00:00
|
|
|
ScrArea *sa= rna_area_from_space(ptr);
|
2010-02-03 00:54:26 +00:00
|
|
|
|
|
|
|
|
/* after changing view mode, must force recalculation of F-Curve colors
|
|
|
|
|
* which can only be achieved using refresh as opposed to redraw
|
|
|
|
|
*/
|
|
|
|
|
ED_area_tag_refresh(sa);
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-08 06:32:30 +00:00
|
|
|
static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SpaceIpo *sipo= (SpaceIpo*)(ptr->data);
|
|
|
|
|
return (sipo->ghostCurves.first != NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2011-09-05 19:34:27 +00:00
|
|
|
static void rna_Sequencer_view_type_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2009-12-14 21:42:25 +00:00
|
|
|
{
|
2011-09-05 19:34:27 +00:00
|
|
|
ScrArea *sa= rna_area_from_space(ptr);
|
|
|
|
|
ED_area_tag_refresh(sa);
|
2009-12-14 21:42:25 +00:00
|
|
|
}
|
|
|
|
|
|
2010-11-07 09:53:39 +00:00
|
|
|
static float rna_BackgroundImage_opacity_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
BGpic *bgpic= (BGpic *)ptr->data;
|
|
|
|
|
return 1.0f-bgpic->blend;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_BackgroundImage_opacity_set(PointerRNA *ptr, float value)
|
|
|
|
|
{
|
|
|
|
|
BGpic *bgpic= (BGpic *)ptr->data;
|
|
|
|
|
bgpic->blend = 1.0f - value;
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-18 14:28:45 +00:00
|
|
|
static BGpic *rna_BackgroundImage_new(View3D *v3d)
|
2011-11-07 12:55:18 +00:00
|
|
|
{
|
2011-11-18 14:28:45 +00:00
|
|
|
BGpic *bgpic= ED_view3D_background_image_new(v3d);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2011-11-18 14:28:45 +00:00
|
|
|
WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
return bgpic;
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-19 02:48:09 +00:00
|
|
|
static void rna_BackgroundImage_remove(View3D *v3d, ReportList *reports, BGpic *bgpic)
|
2011-11-18 14:28:45 +00:00
|
|
|
{
|
2011-11-19 02:48:09 +00:00
|
|
|
if (BLI_findindex(&v3d->bgpicbase, bgpic) == -1) {
|
|
|
|
|
BKE_report(reports, RPT_ERROR, "BackgroundImage can't be removed");
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
ED_view3D_background_image_remove(v3d, bgpic);
|
|
|
|
|
WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d);
|
|
|
|
|
}
|
2011-11-18 14:28:45 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-23 16:12:11 +00:00
|
|
|
static void rna_BackgroundImage_clear(View3D *v3d)
|
|
|
|
|
{
|
|
|
|
|
ED_view3D_background_image_clear(v3d);
|
|
|
|
|
WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d);
|
|
|
|
|
}
|
|
|
|
|
|
2011-09-05 21:01:50 +00:00
|
|
|
/* Space Node Editor */
|
|
|
|
|
|
|
|
|
|
static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
|
|
|
|
SpaceNode *snode= (SpaceNode*)ptr->data;
|
|
|
|
|
bNodeTree *ntree= (bNodeTree*)value.data;
|
|
|
|
|
|
|
|
|
|
/* exclude group trees, only trees of the active type */
|
|
|
|
|
return (ntree->nodetype==0 && ntree->type == snode->treetype);
|
|
|
|
|
}
|
|
|
|
|
|
2011-10-20 00:19:21 +00:00
|
|
|
static void rna_SpaceNodeEditor_node_tree_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
|
2011-09-05 21:01:50 +00:00
|
|
|
{
|
|
|
|
|
SpaceNode *snode= (SpaceNode*)ptr->data;
|
|
|
|
|
|
|
|
|
|
ED_node_tree_update(snode, scene);
|
|
|
|
|
}
|
|
|
|
|
|
2011-09-27 10:37:02 +00:00
|
|
|
static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *UNUSED(ptr),
|
|
|
|
|
PropertyRNA *UNUSED(prop), int *free)
|
2011-02-08 14:29:48 +00:00
|
|
|
{
|
|
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
Object *ob = CTX_data_active_object(C);
|
|
|
|
|
EnumPropertyItem *item= NULL;
|
|
|
|
|
EnumPropertyItem tmp= {0, "", 0, "", ""};
|
|
|
|
|
int totitem= 0;
|
|
|
|
|
|
|
|
|
|
if(ob) {
|
|
|
|
|
if(ob->type == OB_LAMP) {
|
|
|
|
|
tmp.value = SB_TEXC_MAT_OR_LAMP;
|
|
|
|
|
tmp.description = "Show Lamp Textures";
|
|
|
|
|
tmp.identifier = "LAMP";
|
|
|
|
|
tmp.icon = ICON_LAMP_POINT;
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
else if(ob->totcol) {
|
|
|
|
|
tmp.value = SB_TEXC_MAT_OR_LAMP;
|
|
|
|
|
tmp.description = "Show Material Textures";
|
|
|
|
|
tmp.identifier = "MATERIAL";
|
|
|
|
|
tmp.icon = ICON_MATERIAL;
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
2011-02-12 14:38:34 +00:00
|
|
|
|
|
|
|
|
if(ob->particlesystem.first) {
|
|
|
|
|
tmp.value = SB_TEXC_PARTICLES;
|
|
|
|
|
tmp.description = "Show Particle Textures";
|
|
|
|
|
tmp.identifier = "PARTICLE";
|
|
|
|
|
tmp.icon = ICON_PARTICLES;
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
2011-02-08 14:29:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(scene && scene->world) {
|
|
|
|
|
tmp.value = SB_TEXC_WORLD;
|
|
|
|
|
tmp.description = "Show World Textures";
|
|
|
|
|
tmp.identifier = "WORLD";
|
|
|
|
|
tmp.icon = ICON_WORLD;
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tmp.value = SB_TEXC_BRUSH;
|
|
|
|
|
tmp.description = "Show Brush Textures";
|
|
|
|
|
tmp.identifier = "BRUSH";
|
|
|
|
|
tmp.icon = ICON_BRUSH_DATA;
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
|
|
|
|
*free = 1;
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
|
|
|
|
SpaceClip *sc= (SpaceClip*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
ED_space_clip_set(NULL, sc, (MovieClip*)value.data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SpaceClip *sc= (SpaceClip*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
sc->scopes.ok= 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SpaceClipEditor_lock_selection_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SpaceClip *sc= (SpaceClip*)(ptr->data);
|
|
|
|
|
|
|
|
|
|
sc->xlockof= 0.f;
|
|
|
|
|
sc->ylockof= 0.f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SpaceClipEditor_view_type_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
ScrArea *sa= rna_area_from_space(ptr);
|
|
|
|
|
ED_area_tag_refresh(sa);
|
|
|
|
|
}
|
|
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
static void rna_def_space(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "Space", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceLink");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area");
|
2009-01-15 04:22:23 +00:00
|
|
|
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");
|
2009-04-01 12:43:07 +00:00
|
|
|
RNA_def_property_enum_items(prop, space_type_items);
|
2009-03-23 13:24:48 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Type", "Space data type");
|
2009-01-15 04:22:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_space_image_uv(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem sticky_mode_items[] = {
|
2010-02-11 00:33:01 +00:00
|
|
|
{SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled"},
|
2011-09-27 10:37:02 +00:00
|
|
|
{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"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem dt_uv_items[] = {
|
2010-02-11 00:33:01 +00:00
|
|
|
{SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Draw white edges with black outline"},
|
|
|
|
|
{SI_UVDT_DASH, "DASH", 0, "Dash", "Draw dashed black-white edges"},
|
|
|
|
|
{SI_UVDT_BLACK, "BLACK", 0, "Black", "Draw black edges"},
|
|
|
|
|
{SI_UVDT_WHITE, "WHITE", 0, "White", "Draw white edges"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem dt_uvstretch_items[] = {
|
2010-02-11 00:33:01 +00:00
|
|
|
{SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles"},
|
|
|
|
|
{SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2009-06-23 00:45:41 +00:00
|
|
|
static EnumPropertyItem pivot_items[] = {
|
|
|
|
|
{V3D_CENTER, "CENTER", ICON_ROTATE, "Bounding Box Center", ""},
|
|
|
|
|
{V3D_CENTROID, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""},
|
|
|
|
|
{V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
srna= RNA_def_struct(brna, "SpaceUVEditor", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceImage");
|
|
|
|
|
RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space");
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* selection */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "sticky_select_mode", PROP_ENUM, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "sticky");
|
|
|
|
|
RNA_def_property_enum_items(prop, sticky_mode_items);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sticky Selection Mode",
|
|
|
|
|
"Automatically select also UVs sharing the same vertex as the ones being selected");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* 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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_smooth_edges", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_UV);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_stretch", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_STRETCH);
|
2011-09-27 10:37:02 +00:00
|
|
|
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)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_modified_edges", PROP_BOOLEAN, PROP_NONE);
|
2009-06-23 00:45:41 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_other_objects", PROP_BOOLEAN, PROP_NONE);
|
2009-06-23 00:45:41 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_normalized_coords", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2011-06-28 09:42:17 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SI_NO_DRAWFACES);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Draw Faces", "Draw faces over the image");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
|
|
|
|
|
2011-04-11 00:49:08 +00:00
|
|
|
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
|
2010-03-30 05:52:05 +00:00
|
|
|
RNA_def_property_array(prop, 2);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get",
|
|
|
|
|
"rna_SpaceImageEditor_cursor_location_set", NULL);
|
2010-03-30 05:52:05 +00:00
|
|
|
RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* todo: move edge and face drawing options here from G.f */
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_snap_to_pixels", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "lock_bounds", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_CLIP_UV);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Constrain to Image Bounds", "Constraint to stay within the image bounds while editing");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_live_unwrap", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Live Unwrap",
|
|
|
|
|
"Continuously unwrap the selected UV island while transforming pinned vertices");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-06-23 00:45:41 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
|
2009-06-23 00:45:41 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "around");
|
|
|
|
|
RNA_def_property_enum_items(prop, pivot_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
}
|
|
|
|
|
|
2009-05-28 05:09:25 +00:00
|
|
|
static void rna_def_space_outliner(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem display_mode_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{SO_ALL_SCENES, "ALL_SCENES", 0, "All Scenes", "Display datablocks in all scenes"},
|
|
|
|
|
{SO_CUR_SCENE, "CURRENT_SCENE", 0, "Current Scene", "Display datablocks in current scene"},
|
|
|
|
|
{SO_VISIBLE, "VISIBLE_LAYERS", 0, "Visible Layers", "Display datablocks in visible layers"},
|
|
|
|
|
{SO_SELECTED, "SELECTED", 0, "Selected", "Display datablocks of selected objects"},
|
|
|
|
|
{SO_ACTIVE, "ACTIVE", 0, "Active", "Display datablocks of active object"},
|
|
|
|
|
{SO_SAME_TYPE, "SAME_TYPES", 0, "Same Types", "Display datablocks of all objects of same type as selected object"},
|
|
|
|
|
{SO_GROUPS, "GROUPS", 0, "Groups", "Display groups and their datablocks"},
|
|
|
|
|
{SO_LIBRARIES, "LIBRARIES", 0, "Libraries", "Display libraries"},
|
|
|
|
|
{SO_SEQUENCE, "SEQUENCE", 0, "Sequence", "Display sequence datablocks"},
|
|
|
|
|
{SO_DATABLOCKS, "DATABLOCKS", 0, "Datablocks", "Display raw datablocks"},
|
|
|
|
|
{SO_USERDEF, "USER_PREFERENCES", 0, "User Preferences", "Display the user preference datablocks"},
|
|
|
|
|
{SO_KEYMAP, "KEYMAPS", 0, "Key Maps", "Display keymap datablocks"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2010-04-23 03:53:05 +00:00
|
|
|
|
2009-05-28 05:09:25 +00:00
|
|
|
srna= RNA_def_struct(brna, "SpaceOutliner", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceOops");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data");
|
2009-05-28 05:09:25 +00:00
|
|
|
|
|
|
|
|
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");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
|
2010-04-23 03:53:05 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
|
2010-04-23 03:53:05 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "search_string");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE);
|
2010-04-23 03:53:05 +00:00
|
|
|
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);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE);
|
2010-04-23 03:53:05 +00:00
|
|
|
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");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE);
|
2009-05-28 05:09:25 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS);
|
2010-04-23 03:53:05 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show column");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
|
2009-05-28 05:09:25 +00:00
|
|
|
}
|
|
|
|
|
|
2009-05-31 01:22:34 +00:00
|
|
|
static void rna_def_background_image(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2010-01-19 22:44:43 +00:00
|
|
|
/* note: combinations work but dont flip so arnt that useful */
|
|
|
|
|
static EnumPropertyItem bgpic_axis_items[] = {
|
|
|
|
|
{0, "", 0, "X Axis", ""},
|
2011-05-15 17:59:48 +00:00
|
|
|
{(1<<RV3D_VIEW_LEFT), "LEFT", 0, "Left", "Show background image while looking to the left"},
|
|
|
|
|
{(1<<RV3D_VIEW_RIGHT), "RIGHT", 0, "Right", "Show background image while looking to the right"},
|
2010-01-19 22:44:43 +00:00
|
|
|
/*{(1<<RV3D_VIEW_LEFT)|(1<<RV3D_VIEW_RIGHT), "LEFT_RIGHT", 0, "Left/Right", ""},*/
|
|
|
|
|
{0, "", 0, "Y Axis", ""},
|
2011-05-15 17:59:48 +00:00
|
|
|
{(1<<RV3D_VIEW_BACK), "BACK", 0, "Back", "Show background image in back view"},
|
|
|
|
|
{(1<<RV3D_VIEW_FRONT), "FRONT", 0, "Front", "Show background image in front view"},
|
2010-01-19 22:44:43 +00:00
|
|
|
/*{(1<<RV3D_VIEW_BACK)|(1<<RV3D_VIEW_FRONT), "BACK_FRONT", 0, "Back/Front", ""},*/
|
|
|
|
|
{0, "", 0, "Z Axis", ""},
|
2011-05-15 17:59:48 +00:00
|
|
|
{(1<<RV3D_VIEW_BOTTOM), "BOTTOM", 0, "Bottom", "Show background image in bottom view"},
|
|
|
|
|
{(1<<RV3D_VIEW_TOP), "TOP", 0, "Top", "Show background image in top view"},
|
2010-01-19 22:44:43 +00:00
|
|
|
/*{(1<<RV3D_VIEW_BOTTOM)|(1<<RV3D_VIEW_TOP), "BOTTOM_TOP", 0, "Top/Bottom", ""},*/
|
|
|
|
|
{0, "", 0, "Other", ""},
|
2011-05-15 17:59:48 +00:00
|
|
|
{0, "ALL", 0, "All Views", "Show background image in all views"},
|
|
|
|
|
{(1<<RV3D_VIEW_CAMERA), "CAMERA", 0, "Camera", "Show background image in camera view"},
|
2010-01-19 22:44:43 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
static EnumPropertyItem bgpic_source_items[] = {
|
|
|
|
|
{V3D_BGPIC_IMAGE, "IMAGE", 0, "Image", ""},
|
2011-11-30 05:34:32 +00:00
|
|
|
{V3D_BGPIC_MOVIE, "MOVIE_CLIP", 0, "Movie Clip", ""},
|
2011-11-07 12:55:18 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2009-05-31 01:22:34 +00:00
|
|
|
srna= RNA_def_struct(brna, "BackgroundImage", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "BGpic");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Background Image", "Image and settings for display in the 3d View background");
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "source");
|
|
|
|
|
RNA_def_property_enum_items(prop, bgpic_source_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Background Source", "Data source used for background");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2009-05-31 01:22:34 +00:00
|
|
|
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ima");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space");
|
2009-07-25 22:22:47 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "clip");
|
|
|
|
|
RNA_def_property_ui_text(prop, "MovieClip", "Movie clip displayed and edited in this space");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2009-09-16 18:04:01 +00:00
|
|
|
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "MovieClipUser");
|
|
|
|
|
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);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2009-08-28 15:03:49 +00:00
|
|
|
prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "xof");
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "X Offset", "Offset image horizontally from the world origin");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2009-08-28 15:03:49 +00:00
|
|
|
prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "yof");
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Y Offset", "Offset image vertically from the world origin");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "size");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image");
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, FLT_MAX);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-11-06 21:40:09 +00:00
|
|
|
prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "blend");
|
2010-11-07 09:53:39 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_BackgroundImage_opacity_get", "rna_BackgroundImage_opacity_set", NULL);
|
2010-11-06 21:40:09 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Opacity", "Image opacity to blend the image against the background color");
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2010-01-19 22:44:43 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "view_axis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "view");
|
|
|
|
|
RNA_def_property_enum_items(prop, bgpic_axis_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image Axis", "The axis to display the image on");
|
2010-01-19 22:44:43 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_EXPANDED);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Expanded", "Show the expanded in the user interface");
|
2010-01-19 22:44:43 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
prop= RNA_def_property(srna, "use_camera_clip", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_CAMERACLIP);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Camera Clip", "Use movie clip from active scene camera");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2011-11-29 21:05:18 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "show_background_image", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_BGPIC_DISABLED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Background Image", "Show this image as background");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2011-11-07 12:55:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
|
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "BackgroundImages");
|
|
|
|
|
srna= RNA_def_struct(brna, "BackgroundImages", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "View3D");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Background Images", "Collection of background images");
|
|
|
|
|
|
2011-11-18 14:28:45 +00:00
|
|
|
func= RNA_def_function(srna, "new", "rna_BackgroundImage_new");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add new background image");
|
|
|
|
|
parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
|
|
|
|
|
RNA_def_function_return(func, parm);
|
2011-11-18 14:28:45 +00:00
|
|
|
|
|
|
|
|
func= RNA_def_function(srna, "remove", "rna_BackgroundImage_remove");
|
|
|
|
|
RNA_def_function_ui_description(func, "Remove background image");
|
2011-11-19 02:48:09 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
2011-11-18 14:28:45 +00:00
|
|
|
parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
|
|
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
2011-11-23 16:12:11 +00:00
|
|
|
|
|
|
|
|
func= RNA_def_function(srna, "clear", "rna_BackgroundImage_clear");
|
|
|
|
|
RNA_def_function_ui_description(func, "Remove all background images");
|
2009-05-31 01:22:34 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-28 07:25:39 +00:00
|
|
|
static void rna_def_space_view3d(BlenderRNA *brna)
|
2009-05-31 01:22:34 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2010-11-15 06:38:07 +00:00
|
|
|
const int matrix_dimsize[]= {4, 4};
|
2009-05-31 01:22:34 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem pivot_items[] = {
|
2011-09-27 10:37:02 +00:00
|
|
|
{V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
|
|
|
|
|
"Pivot around bounding box center of selected object(s)"},
|
2011-05-15 17:59:48 +00:00
|
|
|
{V3D_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Pivot around the 3D cursor"},
|
|
|
|
|
{V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Origins", "Pivot around each object's own origin"},
|
|
|
|
|
{V3D_CENTROID, "MEDIAN_POINT", ICON_ROTATECENTER, "Median Point", "Pivot around the median point of selected objects"},
|
|
|
|
|
{V3D_ACTIVE, "ACTIVE_ELEMENT", ICON_ROTACTIVE, "Active Element", "Pivot around active object"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2010-05-18 21:01:22 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem rv3d_persp_items[] = {
|
|
|
|
|
{RV3D_PERSP, "PERSP", 0, "Perspective", ""},
|
|
|
|
|
{RV3D_ORTHO, "ORTHO", 0, "Orthographic", ""},
|
|
|
|
|
{RV3D_CAMOB, "CAMERA", 0, "Camera", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
static EnumPropertyItem bundle_drawtype_items[] = {
|
|
|
|
|
{OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""},
|
|
|
|
|
{OB_ARROWS, "ARROWS", 0, "Arrows", ""},
|
|
|
|
|
{OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""},
|
|
|
|
|
{OB_CIRCLE, "CIRCLE", 0, "Circle", ""},
|
|
|
|
|
{OB_CUBE, "CUBE", 0, "Cube", ""},
|
|
|
|
|
{OB_EMPTY_SPHERE, "SPHERE", 0, "Sphere", ""},
|
|
|
|
|
{OB_EMPTY_CONE, "CONE", 0, "Cone", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2010-04-28 07:25:39 +00:00
|
|
|
srna= RNA_def_struct(brna, "SpaceView3D", "Space");
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_struct_sdna(srna, "View3D");
|
2010-09-06 05:40:52 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "3D View Space", "3D View space data");
|
2009-05-31 01:22:34 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
|
2009-10-09 14:35:54 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "camera");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera)");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
|
2009-11-27 00:34:46 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
|
2010-11-01 00:09:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock to Object", "3D View center is locked to this object's position");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2009-11-27 00:34:46 +00:00
|
|
|
prop= RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "ob_centre_bone");
|
2010-11-01 00:09:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock to Bone", "3D View center is locked to this bone's position");
|
2009-11-27 00:34:46 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-10-31 01:18:26 +00:00
|
|
|
prop= RNA_def_property(srna, "lock_cursor", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "ob_centre_cursor", 1);
|
2010-11-01 00:09:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock to Cursor", "3D View center is locked to the cursor's position");
|
2010-10-31 01:18:26 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
|
2010-08-17 07:49:53 +00:00
|
|
|
RNA_def_property_enum_items(prop, viewport_shade_items);
|
2011-11-02 18:20:53 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceView3D_viewport_shade_itemf");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View");
|
2011-11-02 18:20:53 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_viewport_shade_update");
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2009-09-22 04:40:16 +00:00
|
|
|
prop= RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "localvd");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility");
|
2010-03-17 00:05:40 +00:00
|
|
|
|
2010-06-05 15:31:55 +00:00
|
|
|
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
|
2010-03-17 00:05:40 +00:00
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
|
RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "3D Cursor Location", "3D cursor location for this view (dependent on local view setting)");
|
|
|
|
|
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2009-05-31 01:22:34 +00:00
|
|
|
prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "lens");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view");
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_range(prop, 1.0f, 250.0f);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
user interface units, off by default.
- currently only distances work.
- user preferences, edit section to set the units and scale.
- option to display pairs (nicer for imperial display?)
- support for evaluating multiple comma separated values eg: 2',11" ..or.. 5ft, 4mil
- comma separated expressions/values accumulate 1+1,2**3,4cm/3
- attempted fast conversion from a value to a string so button drawing isn't too slow.
* imperial long/short *
- mile, mi
- yard, yd
- foot, '
- inch, "
- thou, mil
* metric long/short *
kilometer, km
meter, m
centimeter, cm
millimeter, mm
micrometer, um
nanometer, nm
picometer, pm
2009-08-11 18:53:01 +00:00
|
|
|
prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "near");
|
2011-05-16 18:04:19 +00:00
|
|
|
RNA_def_property_range(prop, 0.001f, FLT_MAX);
|
2010-09-06 05:40:52 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
user interface units, off by default.
- currently only distances work.
- user preferences, edit section to set the units and scale.
- option to display pairs (nicer for imperial display?)
- support for evaluating multiple comma separated values eg: 2',11" ..or.. 5ft, 4mil
- comma separated expressions/values accumulate 1+1,2**3,4cm/3
- attempted fast conversion from a value to a string so button drawing isn't too slow.
* imperial long/short *
- mile, mi
- yard, yd
- foot, '
- inch, "
- thou, mil
* metric long/short *
kilometer, km
meter, m
centimeter, cm
millimeter, mm
micrometer, um
nanometer, nm
picometer, pm
2009-08-11 18:53:01 +00:00
|
|
|
prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "far");
|
|
|
|
|
RNA_def_property_range(prop, 1.0f, FLT_MAX);
|
2010-09-06 05:40:52 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2010-11-23 14:14:06 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "grid");
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Grid Scale", "Distance between 3D View grid lines");
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2010-11-23 14:14:06 +00:00
|
|
|
|
2009-05-31 01:22:34 +00:00
|
|
|
prop= RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "gridlines");
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Grid Lines", "Number of grid lines to display in perspective view");
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_range(prop, 0, 1024);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of subdivisions between grid lines");
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_range(prop, 1, 1024);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Outline Selected",
|
|
|
|
|
"Show an outline highlight around selected objects in non-wireframe views");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_all_objects_origin", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "All Object Origins",
|
|
|
|
|
"Show the object origin center dot for all (selected and unselected) objects");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_relationship_lines", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_HIDE_HELPLINES);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_textured_solid", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
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");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2010-03-16 17:49:31 +00:00
|
|
|
|
2011-05-14 17:50:33 +00:00
|
|
|
prop= RNA_def_property(srna, "lock_camera", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_LOCK_CAMERA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Lock Camera to View", "Enable view navigation within the camera view");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_only_render", PROP_BOOLEAN, PROP_NONE);
|
2010-03-16 17:49:31 +00:00
|
|
|
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);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_occlude_geometry", PROP_BOOLEAN, PROP_NONE);
|
2009-11-28 18:19:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ZBUF_SELECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Occlude Geometry", "Limit selection to visible (clipped with depth buffer)");
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2010-01-19 22:44:43 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "background_images", PROP_COLLECTION, PROP_NONE);
|
|
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "bgpicbase", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "BackgroundImage");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Background Images", "List of background images");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2011-11-07 12:55:18 +00:00
|
|
|
rna_def_backgroundImages(brna, prop);
|
2010-01-19 22:44:43 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_background_images", PROP_BOOLEAN, PROP_NONE);
|
2010-01-19 22:44:43 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPICS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Display Background Images", "Display reference images behind objects in the 3D View");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2009-05-31 01:22:34 +00:00
|
|
|
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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
|
2011-05-03 12:37:15 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
|
2009-10-13 15:30:19 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN);
|
2011-10-06 10:06:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Align", "Manipulate center points (object and pose mode only)");
|
2009-11-28 20:02:10 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_ALIGN, 0);
|
2011-05-03 12:37:15 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");
|
2009-10-13 15:30:19 +00:00
|
|
|
|
2010-08-17 13:14:41 +00:00
|
|
|
prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms");
|
2009-11-28 17:20:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_manipulator_translate", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations");
|
2009-11-28 17:20:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_MAN_TRANS, 0);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_manipulator_rotate", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations");
|
2009-11-28 17:20:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_MAN_ROT, 0);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_manipulator_scale", PROP_BOOLEAN, PROP_NONE);
|
2009-05-31 01:22:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations");
|
2009-11-28 17:20:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_MAN_SCALE, 0);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
|
|
|
|
|
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);
|
2009-10-14 21:05:35 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_TransformOrientation_itemf");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Transform Orientation", "Transformation orientation");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-07-24 22:09:30 +00:00
|
|
|
|
2009-10-14 21:05:35 +00:00
|
|
|
prop= RNA_def_property(srna, "current_orientation", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "TransformOrientation");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_CurrentOrientation_get", NULL, NULL, NULL);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Current Transform Orientation", "Current transformation orientation");
|
2009-10-14 21:05:35 +00:00
|
|
|
|
2009-11-28 21:27:28 +00:00
|
|
|
prop= RNA_def_property(srna, "lock_camera_and_layers", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scenelock", 1);
|
2010-04-28 07:25:39 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_lock_camera_and_layers_set");
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock Camera and Layers",
|
|
|
|
|
"Use the scene's active camera and layers in this view, rather than local layers");
|
2009-11-28 21:27:28 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_LOCKVIEW_OFF, 1);
|
2009-12-03 09:49:21 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-11-29 02:42:47 +00:00
|
|
|
|
2010-04-22 20:00:19 +00:00
|
|
|
prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
|
2009-12-03 09:49:21 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
|
|
|
|
|
RNA_def_property_array(prop, 20);
|
2010-04-28 07:25:39 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_layer_set");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View");
|
2011-03-23 14:06:44 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_layer_update");
|
2009-12-03 09:49:21 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER);
|
2009-11-29 02:42:47 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1);
|
|
|
|
|
RNA_def_property_array(prop, 20);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Used Layers", "Layers that contain something");
|
2010-01-30 03:22:22 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE);
|
2010-04-28 07:25:39 +00:00
|
|
|
RNA_def_property_struct_type(prop, "RegionView3D");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_3d_get", NULL, NULL, NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "3D Region", "3D region in this space, in case of quad view the camera region");
|
2010-01-30 03:22:22 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "region_quadview", PROP_POINTER, PROP_NONE);
|
2010-04-28 07:25:39 +00:00
|
|
|
RNA_def_property_struct_type(prop, "RegionView3D");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_quadview_get", NULL, NULL, NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Quad View Region", "3D region that defines the quad view settings");
|
2010-01-30 03:22:22 +00:00
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
prop= RNA_def_property(srna, "show_reconstruction", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_RECONSTRUCTION);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Reconstruction", "Display reconstruction data from active movie clip");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2011-11-14 06:41:42 +00:00
|
|
|
prop= RNA_def_property(srna, "tracks_draw_size", PROP_FLOAT, PROP_NONE);
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, FLT_MAX);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bundle_size");
|
2011-11-14 06:41:42 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tracks Size", "Display size of tracks from reconstructed data");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2011-11-14 06:41:42 +00:00
|
|
|
prop= RNA_def_property(srna, "tracks_draw_type", PROP_ENUM, PROP_NONE);
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "bundle_drawtype");
|
|
|
|
|
RNA_def_property_enum_items(prop, bundle_drawtype_items);
|
2011-11-14 06:41:42 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tracks Display Type", "Viewport display style for tracks");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "show_camera_path", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_CAMERAPATH);
|
2011-11-15 12:20:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed camera path");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2011-11-21 17:05:27 +00:00
|
|
|
prop= RNA_def_property(srna, "show_bundle_names", PROP_BOOLEAN, PROP_NONE);
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_BUNDLENAME);
|
2011-11-21 17:05:27 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show 3D Marker Names", "Show names for reconstructed tracks objects");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2010-01-30 03:22:22 +00:00
|
|
|
/* region */
|
|
|
|
|
|
2010-06-07 05:45:30 +00:00
|
|
|
srna= RNA_def_struct(brna, "RegionView3D", NULL);
|
2010-01-30 03:22:22 +00:00
|
|
|
RNA_def_struct_sdna(srna, "RegionView3D");
|
2010-09-06 05:40:52 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data");
|
2010-01-30 03:22:22 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_LOCKED);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock", "Lock view rotation in side views");
|
2010-04-28 07:25:39 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
|
2010-01-30 03:22:22 +00:00
|
|
|
|
2010-08-17 17:03:52 +00:00
|
|
|
prop= RNA_def_property(srna, "show_sync_view", PROP_BOOLEAN, PROP_NONE);
|
2010-01-30 03:22:22 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXVIEW);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Box", "Sync view position between side views");
|
2010-04-28 07:25:39 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
|
2010-01-30 03:22:22 +00:00
|
|
|
|
2010-08-19 17:46:00 +00:00
|
|
|
prop= RNA_def_property(srna, "use_box_clip", PROP_BOOLEAN, PROP_NONE);
|
2010-01-30 03:22:22 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXCLIP);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Clip", "Clip objects based on what's visible in other side views");
|
2010-11-08 03:44:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_clip_update");
|
2010-03-05 03:16:16 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Perspective Matrix", "Current perspective matrix of the 3D region");
|
|
|
|
|
|
|
|
|
|
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, matrix_dimsize);
|
2011-04-25 03:02:26 +00:00
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_RegionView3D_view_matrix_set", NULL);
|
2010-03-05 03:16:16 +00:00
|
|
|
RNA_def_property_ui_text(prop, "View Matrix", "Current view matrix of the 3D region");
|
2011-04-25 03:02:26 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2010-05-18 21:01:22 +00:00
|
|
|
|
2010-05-19 21:10:46 +00:00
|
|
|
prop= RNA_def_property(srna, "view_perspective", PROP_ENUM, PROP_NONE);
|
2010-05-18 21:01:22 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "persp");
|
|
|
|
|
RNA_def_property_enum_items(prop, rv3d_persp_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Perspective", "View Perspective");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2011-05-18 17:52:26 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
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);
|
2010-05-19 21:10:46 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
#else
|
|
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
|
RNA_def_property_float_funcs(prop, "rna_RegionView3D_view_location_get", "rna_RegionView3D_view_location_set", NULL);
|
|
|
|
|
#endif
|
|
|
|
|
RNA_def_property_ui_text(prop, "View Location", "View pivot location");
|
|
|
|
|
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
|
|
|
|
|
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
|
|
|
|
|
2011-04-25 03:02:26 +00:00
|
|
|
prop= RNA_def_property(srna, "view_rotation", PROP_FLOAT, PROP_QUATERNION); // cant use because its inverted
|
|
|
|
|
#if 0
|
2010-05-19 21:10:46 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "viewquat");
|
2011-04-25 03:02:26 +00:00
|
|
|
#else
|
|
|
|
|
RNA_def_property_array(prop, 4);
|
|
|
|
|
RNA_def_property_float_funcs(prop, "rna_RegionView3D_view_rotation_get", "rna_RegionView3D_view_rotation_set", NULL);
|
|
|
|
|
#endif
|
2010-05-19 21:10:46 +00:00
|
|
|
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");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Distance", "Distance to the view location");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2011-11-07 16:26:53 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "view_camera_zoom", PROP_INT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "camzoom");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Camera Zoom", "Zoom factor in camera view");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "view_camera_offset", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "camdx");
|
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Camera Offset", "View shift in camera view");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
|
2009-05-31 01:22:34 +00:00
|
|
|
}
|
|
|
|
|
|
2009-06-02 08:08:41 +00:00
|
|
|
static void rna_def_space_buttons(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem buttons_context_items[] = {
|
2009-06-21 10:26:39 +00:00
|
|
|
{BCONTEXT_SCENE, "SCENE", ICON_SCENE, "Scene", "Scene"},
|
2009-10-14 14:07:32 +00:00
|
|
|
{BCONTEXT_RENDER, "RENDER", ICON_SCENE_DATA, "Render", "Render"},
|
2009-06-21 10:26:39 +00:00
|
|
|
{BCONTEXT_WORLD, "WORLD", ICON_WORLD, "World", "World"},
|
|
|
|
|
{BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Object"},
|
2009-09-19 19:40:38 +00:00
|
|
|
{BCONTEXT_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, "Constraints", "Constraints"},
|
|
|
|
|
{BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifiers", "Modifiers"},
|
2009-06-21 10:26:39 +00:00
|
|
|
{BCONTEXT_DATA, "DATA", 0, "Data", "Data"},
|
|
|
|
|
{BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone"},
|
2009-09-19 19:40:38 +00:00
|
|
|
{BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT, "Bone Constraints", "Bone Constraints"},
|
2009-06-21 10:26:39 +00:00
|
|
|
{BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"},
|
|
|
|
|
{BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"},
|
2011-04-25 13:47:15 +00:00
|
|
|
{BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle"},
|
2009-06-21 10:26:39 +00:00
|
|
|
{BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-06-02 08:08:41 +00:00
|
|
|
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
static EnumPropertyItem align_items[] = {
|
|
|
|
|
{BUT_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""},
|
|
|
|
|
{BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2011-02-08 14:29:48 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem buttons_texture_context_items[] = {
|
|
|
|
|
{SB_TEXC_MAT_OR_LAMP, "MATERIAL", ICON_MATERIAL, "Material", "Material"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}}; //actually populated dynamically trough a function
|
2009-06-02 08:08:41 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
srna= RNA_def_struct(brna, "SpaceProperties", "Space");
|
2009-06-02 08:08:41 +00:00
|
|
|
RNA_def_struct_sdna(srna, "SpaceButs");
|
2009-08-18 12:58:51 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
|
2009-06-02 08:08:41 +00:00
|
|
|
|
2009-07-24 16:41:12 +00:00
|
|
|
prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
|
2009-06-02 08:08:41 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "mainb");
|
|
|
|
|
RNA_def_property_enum_items(prop, buttons_context_items);
|
2011-01-06 02:20:30 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_context_set", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
|
2009-06-02 08:08:41 +00:00
|
|
|
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
|
2009-06-02 08:08:41 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "align");
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
RNA_def_property_enum_items(prop, align_items);
|
2009-08-18 12:58:51 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
|
2009-06-07 13:09:18 +00:00
|
|
|
|
2011-02-08 14:29:48 +00:00
|
|
|
prop= RNA_def_property(srna, "texture_context", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_items(prop, buttons_texture_context_items);
|
|
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceProperties_texture_context_itemf");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Texture Context", "Type of texture data to display and edit");
|
2011-02-22 10:27:32 +00:00
|
|
|
RNA_def_property_update(prop, NC_TEXTURE, NULL);
|
2009-07-25 22:22:47 +00:00
|
|
|
|
2009-06-07 13:09:18 +00:00
|
|
|
/* 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");
|
2011-04-21 13:11:51 +00:00
|
|
|
/* note: custom set function is ONLY to avoid rna setting a user for this. */
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceProperties_pin_id_set", "rna_SpaceProperties_pin_id_typef", NULL);
|
2009-06-07 13:09:18 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-05-18 05:40:30 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, "rna_SpaceProperties_pin_id_update");
|
* Multiply for panorama cameras
* Some cases of struct name being set where it shouldnt have been.
* Spelling: wich --> which
* Copy and initialize uv modifier scale, remove unneeded enum.
* Ability to pin any object into the context.
* Update uv window while transforming (useful when used with UVProject modifier)
* Patch by Wahooney, so new template's are internal text and dont get saved over
by mistake.
* Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process
/usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted
by Jochen Schmitt.
* [#21816] bpy.data.add_image has stopped working on Windows. moved to
bpy.data.images.load(), missed this call.
(commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch)
2010-03-30 12:15:16 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_PIN_CONTEXT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Pin ID", "Use the pinned context");
|
2009-06-02 08:08:41 +00:00
|
|
|
}
|
|
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
static void rna_def_space_image(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "SpaceImageEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceImage");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data");
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* image */
|
|
|
|
|
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL, NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space");
|
2009-06-16 00:52:21 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-11-20 17:31:59 +00:00
|
|
|
RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL); // is handled in image editor too
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2009-09-16 18:04:01 +00:00
|
|
|
prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2011-03-25 04:37:59 +00:00
|
|
|
prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "cumap");
|
2011-03-25 04:37:59 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Curve", "Color curve mapping to use for displaying the image");
|
2009-09-16 19:27:08 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_curves_update");
|
2010-04-06 02:05:54 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "scopes");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Scopes");
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize image statistics");
|
2010-04-06 02:05:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_scopes_update");
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_image_pin", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image Pin", "Display current image regardless of object selection");
|
2010-03-30 12:01:17 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2010-03-23 01:22:33 +00:00
|
|
|
prop= RNA_def_property(srna, "sample_histogram", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "sample_line_hist");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Histogram");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Line sample", "Sampled colors along line");
|
2011-05-12 01:57:47 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
|
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");
|
2010-03-23 01:22:33 +00:00
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
/* image draw */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
2009-10-14 19:19:43 +00:00
|
|
|
RNA_def_property_enum_items(prop, draw_channels_items);
|
2009-06-16 00:52:21 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* uv */
|
2009-09-16 18:04:01 +00:00
|
|
|
prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_struct_type(prop, "SpaceUVEditor");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings");
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* paint */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_image_paint", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode");
|
2009-06-16 00:52:21 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_paint_update");
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* grease pencil */
|
|
|
|
|
prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
|
2010-04-05 06:52:27 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "GreasePencil");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
|
2011-09-04 15:53:12 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DISPGP);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay");
|
2009-01-15 04:22:23 +00:00
|
|
|
|
|
|
|
|
/* update */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 04:22:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lock", 0);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Update Automatically",
|
|
|
|
|
"Update other affected window spaces automatically to reflect changes "
|
|
|
|
|
"during interactive operations such as transform");
|
2009-01-15 04:22:23 +00:00
|
|
|
|
2009-06-16 00:52:21 +00:00
|
|
|
/* state */
|
|
|
|
|
prop= RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_render_get", NULL);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Render", "Show render related properties");
|
2009-06-16 00:52:21 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_paint_get", NULL);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties");
|
2009-06-16 00:52:21 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_uvedit_get", NULL);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show UV Editor", "Show UV editing related properties");
|
2009-06-16 00:52:21 +00:00
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
rna_def_space_image_uv(brna);
|
|
|
|
|
}
|
|
|
|
|
|
2009-06-09 05:39:01 +00:00
|
|
|
static void rna_def_space_sequencer(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2009-12-14 21:42:25 +00:00
|
|
|
static EnumPropertyItem view_type_items[] = {
|
|
|
|
|
{SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
|
|
|
|
|
{SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""},
|
2010-04-18 18:46:16 +00:00
|
|
|
{SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, "Sequencer and Image Preview", ""},
|
2009-12-14 21:42:25 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-06-09 05:39:01 +00:00
|
|
|
static EnumPropertyItem display_mode_items[] = {
|
2009-08-12 14:39:57 +00:00
|
|
|
{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", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2010-04-11 18:37:49 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem proxy_render_size_items[] = {
|
2010-04-18 15:30:21 +00:00
|
|
|
{SEQ_PROXY_RENDER_SIZE_NONE, "NONE", 0, "No display", ""},
|
|
|
|
|
{SEQ_PROXY_RENDER_SIZE_SCENE, "SCENE", 0, "Scene render size", ""},
|
|
|
|
|
{SEQ_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""},
|
|
|
|
|
{SEQ_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""},
|
|
|
|
|
{SEQ_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""},
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
{SEQ_PROXY_RENDER_SIZE_100, "PROXY_100", 0, "Proxy size 100%", ""},
|
2010-04-18 15:30:21 +00:00
|
|
|
{SEQ_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render", ""},
|
2010-04-11 18:37:49 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-06-09 05:39:01 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceSeq");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data");
|
2009-06-09 05:39:01 +00:00
|
|
|
|
2009-12-14 21:42:25 +00:00
|
|
|
/* view type, fairly important */
|
|
|
|
|
prop= RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "view");
|
|
|
|
|
RNA_def_property_enum_items(prop, view_type_items);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "View Type", "Type of the Sequencer view (sequencer, preview or both)");
|
2011-09-05 19:34:27 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update");
|
2009-12-14 21:42:25 +00:00
|
|
|
|
2009-06-09 05:39:01 +00:00
|
|
|
/* display type, fairly important */
|
|
|
|
|
prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "mainb");
|
|
|
|
|
RNA_def_property_enum_items(prop, display_mode_items);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display Mode", "View mode to use for displaying sequencer output");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
|
|
|
|
/* flag's */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
|
2009-11-19 02:58:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_DRAW_CFRANUM);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
|
2009-11-19 02:58:48 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_frames", PROP_BOOLEAN, PROP_NONE);
|
2009-06-09 05:39:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather than seconds");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
2010-03-16 18:01:22 +00:00
|
|
|
prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
|
2009-06-09 05:39:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
|
2011-10-03 02:49:08 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sync Markers", "Transform markers as well as strips");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE);
|
2009-06-09 05:39:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPERATED);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Separate Colors", "Separate color channels in preview");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_safe_margin", PROP_BOOLEAN, PROP_NONE);
|
2009-06-09 05:39:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_SAFE_MARGINS);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
|
|
|
|
/* 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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "chanshown");
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display Channel",
|
|
|
|
|
"The channel number shown in the image preview. 0 is the result of all strips combined");
|
2011-09-11 10:35:26 +00:00
|
|
|
RNA_def_property_range(prop, -5, MAXSEQ);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "zebra");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes");
|
2009-06-09 05:39:01 +00:00
|
|
|
RNA_def_property_range(prop, 0, 110);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
|
2009-06-09 05:39:01 +00:00
|
|
|
|
2010-04-11 18:37:49 +00:00
|
|
|
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);
|
2009-06-09 05:39:01 +00:00
|
|
|
}
|
|
|
|
|
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
static void rna_def_space_text(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "SpaceTextEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceText");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data");
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
|
|
|
|
/* text */
|
|
|
|
|
prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
|
2009-03-23 13:24:48 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL, NULL);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
|
|
|
|
/* display */
|
2010-08-11 05:21:43 +00:00
|
|
|
prop= RNA_def_property(srna, "show_word_wrap", PROP_BOOLEAN, PROP_NONE);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Word Wrap", "Wrap words if there is not enough horizontal space");
|
2009-06-16 00:52:21 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_WORDWRAP_OFF, 1);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
2010-08-11 05:21:43 +00:00
|
|
|
prop= RNA_def_property(srna, "show_line_numbers", PROP_BOOLEAN, PROP_NONE);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text");
|
2009-06-16 00:52:21 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_OFF, 1);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
2010-08-11 05:21:43 +00:00
|
|
|
prop= RNA_def_property(srna, "show_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);
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2009-06-13 06:42:12 +00:00
|
|
|
|
2010-08-11 05:21:43 +00:00
|
|
|
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");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
|
|
|
|
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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with");
|
2011-04-23 08:52:27 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, "rna_SpaceTextEditor_updateEdited");
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
2009-07-12 02:06:15 +00:00
|
|
|
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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
2011-02-18 13:57:54 +00:00
|
|
|
prop= RNA_def_property(srna, "show_margin", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_SHOW_MARGIN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Margin", "Show right margin");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "margin_column", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "margin_column");
|
|
|
|
|
RNA_def_property_range(prop, 0, 1024);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Margin Column", "Column number to show right margin at");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
|
|
|
|
|
2010-08-11 05:21:43 +00:00
|
|
|
/* functionality options */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "overwrite", 1);
|
2010-08-11 05:21:43 +00:00
|
|
|
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);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_live_edit", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "live_edit", 1);
|
2010-08-11 05:21:43 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
|
|
|
|
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
/* find */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_find_all", PROP_BOOLEAN, PROP_NONE);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Find All", "Search in all text datablocks, instead of only the active one");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_find_wrap", PROP_BOOLEAN, PROP_NONE);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_WRAP);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Find Wrap", "Search again from the start of the file when reaching the end");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
2011-05-07 17:52:44 +00:00
|
|
|
prop= RNA_def_property(srna, "use_match_case", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_MATCH_CASE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Match case", "Search string is sensitive to uppercase and lowercase letters");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
|
|
|
|
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
prop= RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "findstr");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "replacestr");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
}
|
|
|
|
|
|
2009-06-22 03:26:36 +00:00
|
|
|
static void rna_def_space_dopesheet(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
Animation Editors - Small Visual Tweaks for Usability
== Datablock filters in the headers are now hidden by default ==
This has been done because users were generally not frequently
toggling these, so quick access vs screen-estate cost wasn't really
worth it to have these always showing and taking up space on the
header.
Usage notes:
- To show these again, click on the "Filter more..." toggle.
- The "Filter more..." button DOES NOT affect whether those filters
apply.
Design notes:
- I tried many other button/icon combinations, but those were either
too space-hogging, vague, or had wrong button order.
- I also tried putting a box around these, but there was too much
padding.
- The ordering of the filters has also been modified a bit so that the
group/fcurve-name filters occur earlier in the list, given that
they're used more frequently
== Graph Editor - Use Fancy Drawing ==
Renamed this option to "Use High Quality Drawing" as suggested by
Matt. "Fancy" isn't really descriptive enough.
== Icons for Mode Dropdowns ==
The mode dropdowns in the DopeSheet and Graph Editors now have icons.
- These were important enough (compared to the auto-snap mode) that
some visual decoration was perhaps warranted.
- It makes it easier to see at a glance what mode the view is in
Icon choices:
- In some cases, the icons seem like quite a natural fit IMO (i.e.
outliner<->dopesheet, key<->shapekey editor, grease pencil, fcurve
editor)
- Action Editor uses an "object" icon to indicate that this is object-
level only for now (though I hope to find a way to address this
soon/later). This will be kept like this until then.
- There isn't any icon for drivers, so after trying a few
alternatives, I settled on area-link icon, since it ties together two
entities using some link.
2011-06-29 13:00:19 +00:00
|
|
|
// XXX: action-editor is currently for object-level only actions, so show that using object-icon hint
|
2009-06-22 03:26:36 +00:00
|
|
|
static EnumPropertyItem mode_items[] = {
|
Animation Editors - Small Visual Tweaks for Usability
== Datablock filters in the headers are now hidden by default ==
This has been done because users were generally not frequently
toggling these, so quick access vs screen-estate cost wasn't really
worth it to have these always showing and taking up space on the
header.
Usage notes:
- To show these again, click on the "Filter more..." toggle.
- The "Filter more..." button DOES NOT affect whether those filters
apply.
Design notes:
- I tried many other button/icon combinations, but those were either
too space-hogging, vague, or had wrong button order.
- I also tried putting a box around these, but there was too much
padding.
- The ordering of the filters has also been modified a bit so that the
group/fcurve-name filters occur earlier in the list, given that
they're used more frequently
== Graph Editor - Use Fancy Drawing ==
Renamed this option to "Use High Quality Drawing" as suggested by
Matt. "Fancy" isn't really descriptive enough.
== Icons for Mode Dropdowns ==
The mode dropdowns in the DopeSheet and Graph Editors now have icons.
- These were important enough (compared to the auto-snap mode) that
some visual decoration was perhaps warranted.
- It makes it easier to see at a glance what mode the view is in
Icon choices:
- In some cases, the icons seem like quite a natural fit IMO (i.e.
outliner<->dopesheet, key<->shapekey editor, grease pencil, fcurve
editor)
- Action Editor uses an "object" icon to indicate that this is object-
level only for now (though I hope to find a way to address this
soon/later). This will be kept like this until then.
- There isn't any icon for drivers, so after trying a few
alternatives, I settled on area-link icon, since it ties together two
entities using some link.
2011-06-29 13:00:19 +00:00
|
|
|
{SACTCONT_DOPESHEET, "DOPESHEET", ICON_OOPS, "DopeSheet", "DopeSheet Editor"},
|
|
|
|
|
{SACTCONT_ACTION, "ACTION", ICON_OBJECT_DATA, "Action Editor", "Action Editor"},
|
|
|
|
|
{SACTCONT_SHAPEKEY, "SHAPEKEY", ICON_SHAPEKEY_DATA, "ShapeKey Editor", "ShapeKey Editor"},
|
|
|
|
|
{SACTCONT_GPENCIL, "GPENCIL", ICON_GREASEPENCIL, "Grease Pencil", "Grease Pencil"},
|
2009-06-22 03:26:36 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceAction");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data");
|
2009-09-16 18:32:10 +00:00
|
|
|
|
|
|
|
|
/* data */
|
|
|
|
|
prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2011-04-19 13:01:50 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL, "rna_Action_actedit_assign_poll");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space");
|
2010-06-18 04:39:32 +00:00
|
|
|
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, "rna_SpaceDopeSheetEditor_action_update");
|
2009-06-22 03:26:36 +00:00
|
|
|
|
|
|
|
|
/* 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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
|
2009-12-08 09:07:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update");
|
2009-06-22 03:26:36 +00:00
|
|
|
|
|
|
|
|
/* display */
|
|
|
|
|
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
|
2009-06-22 03:26:36 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
2011-01-09 23:16:05 +00:00
|
|
|
prop= RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_POSEMARKERS_SHOW);
|
2011-09-27 10:37:02 +00:00
|
|
|
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)");
|
2011-01-09 23:16:05 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
|
|
|
|
|
|
2009-06-22 03:26:36 +00:00
|
|
|
/* editing */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
|
2009-06-22 03:26:36 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
|
2010-07-13 17:11:50 +00:00
|
|
|
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
|
2010-01-20 11:20:20 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
|
2010-01-20 11:20:20 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOREALTIMEUPDATES);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Realtime Updates",
|
|
|
|
|
"When transforming keyframes, changes to the animation data are flushed to other views");
|
2010-01-20 11:20:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
|
2009-12-07 21:51:44 +00:00
|
|
|
|
2010-03-08 09:06:58 +00:00
|
|
|
prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_MARKERS_MOVE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sync Markers", "Sync Markers with keyframe edits");
|
|
|
|
|
|
2009-12-07 21:51:44 +00:00
|
|
|
/* dopesheet */
|
|
|
|
|
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "DopeSheet");
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ads");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
|
2009-12-07 21:51:44 +00:00
|
|
|
|
|
|
|
|
/* autosnap */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
|
2009-12-07 21:51:44 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
|
|
|
|
|
RNA_def_property_enum_items(prop, autosnap_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
|
2009-12-07 21:51:44 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_space_graph(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem mode_items[] = {
|
Animation Editors - Small Visual Tweaks for Usability
== Datablock filters in the headers are now hidden by default ==
This has been done because users were generally not frequently
toggling these, so quick access vs screen-estate cost wasn't really
worth it to have these always showing and taking up space on the
header.
Usage notes:
- To show these again, click on the "Filter more..." toggle.
- The "Filter more..." button DOES NOT affect whether those filters
apply.
Design notes:
- I tried many other button/icon combinations, but those were either
too space-hogging, vague, or had wrong button order.
- I also tried putting a box around these, but there was too much
padding.
- The ordering of the filters has also been modified a bit so that the
group/fcurve-name filters occur earlier in the list, given that
they're used more frequently
== Graph Editor - Use Fancy Drawing ==
Renamed this option to "Use High Quality Drawing" as suggested by
Matt. "Fancy" isn't really descriptive enough.
== Icons for Mode Dropdowns ==
The mode dropdowns in the DopeSheet and Graph Editors now have icons.
- These were important enough (compared to the auto-snap mode) that
some visual decoration was perhaps warranted.
- It makes it easier to see at a glance what mode the view is in
Icon choices:
- In some cases, the icons seem like quite a natural fit IMO (i.e.
outliner<->dopesheet, key<->shapekey editor, grease pencil, fcurve
editor)
- Action Editor uses an "object" icon to indicate that this is object-
level only for now (though I hope to find a way to address this
soon/later). This will be kept like this until then.
- There isn't any icon for drivers, so after trying a few
alternatives, I settled on area-link icon, since it ties together two
entities using some link.
2011-06-29 13:00:19 +00:00
|
|
|
{SIPO_MODE_ANIMATION, "FCURVES", ICON_IPO, "F-Curve Editor", "Edit animation/keyframes displayed as 2D curves"},
|
2011-07-01 02:37:44 +00:00
|
|
|
{SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"},
|
2009-06-22 03:26:36 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-10-21 10:36:46 +00:00
|
|
|
|
|
|
|
|
/* this is basically the same as the one for the 3D-View, but with some entries ommitted */
|
|
|
|
|
static EnumPropertyItem gpivot_items[] = {
|
2009-12-07 01:26:34 +00:00
|
|
|
{V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""},
|
|
|
|
|
{V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
|
2009-12-09 00:03:18 +00:00
|
|
|
{V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Centers", ""},
|
2009-10-21 10:36:46 +00:00
|
|
|
//{V3D_CENTROID, "MEDIAN_POINT", 0, "Median Point", ""},
|
|
|
|
|
//{V3D_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-12-06 22:28:59 +00:00
|
|
|
|
2009-06-22 03:26:36 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceIpo");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data");
|
2009-06-22 03:26:36 +00:00
|
|
|
|
|
|
|
|
/* 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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
|
2010-02-03 00:54:26 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update");
|
2009-06-22 03:26:36 +00:00
|
|
|
|
|
|
|
|
/* display */
|
|
|
|
|
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
|
2009-06-22 03:26:36 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
2009-08-24 04:31:13 +00:00
|
|
|
prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-08-24 04:31:13 +00:00
|
|
|
|
2009-06-22 03:26:36 +00:00
|
|
|
prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
|
2009-12-09 22:54:25 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
|
2009-07-28 06:50:30 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Only Selected Curve Keyframes",
|
|
|
|
|
"Only keyframes of selected F-Curves are visible and editable");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-07-28 06:50:30 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE);
|
2009-11-30 11:37:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELVHANDLESONLY);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes");
|
2009-11-30 11:37:27 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
|
|
|
|
|
Animation Editors - Small Visual Tweaks for Usability
== Datablock filters in the headers are now hidden by default ==
This has been done because users were generally not frequently
toggling these, so quick access vs screen-estate cost wasn't really
worth it to have these always showing and taking up space on the
header.
Usage notes:
- To show these again, click on the "Filter more..." toggle.
- The "Filter more..." button DOES NOT affect whether those filters
apply.
Design notes:
- I tried many other button/icon combinations, but those were either
too space-hogging, vague, or had wrong button order.
- I also tried putting a box around these, but there was too much
padding.
- The ordering of the filters has also been modified a bit so that the
group/fcurve-name filters occur earlier in the list, given that
they're used more frequently
== Graph Editor - Use Fancy Drawing ==
Renamed this option to "Use High Quality Drawing" as suggested by
Matt. "Fancy" isn't really descriptive enough.
== Icons for Mode Dropdowns ==
The mode dropdowns in the DopeSheet and Graph Editors now have icons.
- These were important enough (compared to the auto-snap mode) that
some visual decoration was perhaps warranted.
- It makes it easier to see at a glance what mode the view is in
Icon choices:
- In some cases, the icons seem like quite a natural fit IMO (i.e.
outliner<->dopesheet, key<->shapekey editor, grease pencil, fcurve
editor)
- Action Editor uses an "object" icon to indicate that this is object-
level only for now (though I hope to find a way to address this
soon/later). This will be kept like this until then.
- There isn't any icon for drivers, so after trying a few
alternatives, I settled on area-link icon, since it ties together two
entities using some link.
2011-06-29 13:00:19 +00:00
|
|
|
prop= RNA_def_property(srna, "use_beauty_drawing", PROP_BOOLEAN, PROP_NONE);
|
2011-02-09 02:09:25 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_BEAUTYDRAW_OFF);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use High Quality Drawing",
|
2011-09-28 14:08:56 +00:00
|
|
|
"Draw F-Curves using Anti-Aliasing and other fancy effects (disable for better performance)");
|
2011-02-09 02:09:25 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
|
|
|
|
|
2009-06-22 03:26:36 +00:00
|
|
|
/* editing */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
|
2009-06-22 03:26:36 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
|
2010-07-13 17:11:50 +00:00
|
|
|
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
|
2010-01-20 11:20:20 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOREALTIMEUPDATES);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Realtime Updates",
|
|
|
|
|
"When transforming keyframes, changes to the animation data are flushed to other views");
|
2010-01-20 11:20:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
|
|
|
|
|
2009-10-20 12:04:56 +00:00
|
|
|
/* cursor */
|
|
|
|
|
prop= RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCURSOR);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor");
|
2009-10-20 12:04:56 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "cursor_position_y", PROP_FLOAT, PROP_NONE);
|
2009-10-20 12:04:56 +00:00
|
|
|
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);
|
|
|
|
|
|
2009-10-21 10:36:46 +00:00
|
|
|
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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
|
2009-10-21 10:36:46 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-12-06 22:28:59 +00:00
|
|
|
|
|
|
|
|
/* dopesheet */
|
|
|
|
|
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "DopeSheet");
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ads");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
|
2009-12-06 22:28:59 +00:00
|
|
|
|
|
|
|
|
/* autosnap */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
|
2009-12-06 22:28:59 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
|
|
|
|
|
RNA_def_property_enum_items(prop, autosnap_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
|
2009-12-06 22:28:59 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-12-08 06:32:30 +00:00
|
|
|
|
|
|
|
|
/* readonly state info */
|
|
|
|
|
prop= RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", 0); /* XXX: hack to make this compile, since this property doesn't actually exist*/
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored");
|
2009-12-08 06:32:30 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
}
|
|
|
|
|
|
2009-06-12 06:44:49 +00:00
|
|
|
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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data");
|
2009-06-12 06:44:49 +00:00
|
|
|
|
|
|
|
|
/* display */
|
|
|
|
|
prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_DRAWTIME);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
|
2009-06-12 06:44:49 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
|
2009-06-12 06:44:49 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
|
2009-06-22 03:26:36 +00:00
|
|
|
|
2009-07-24 06:08:03 +00:00
|
|
|
prop= RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES);
|
2011-09-28 14:08:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Control F-Curves", "Show influence F-Curves on strips");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
|
2010-01-20 11:20:20 +00:00
|
|
|
|
|
|
|
|
/* editing */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
|
2010-01-20 11:20:20 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOREALTIMEUPDATES);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Realtime Updates",
|
|
|
|
|
"When transforming strips, changes to the animation data are flushed to other views");
|
2010-01-20 11:20:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
|
2009-12-07 21:51:44 +00:00
|
|
|
|
|
|
|
|
/* dopesheet */
|
|
|
|
|
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "DopeSheet");
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ads");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
|
2009-12-07 21:51:44 +00:00
|
|
|
|
|
|
|
|
/* autosnap */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
|
2009-12-07 21:51:44 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
|
|
|
|
|
RNA_def_property_enum_items(prop, autosnap_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
|
2009-12-07 21:51:44 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
|
2009-06-12 06:44:49 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-13 16:59:52 +00:00
|
|
|
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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data");
|
2009-08-13 16:59:52 +00:00
|
|
|
|
2011-02-01 23:41:01 +00:00
|
|
|
/* view settings */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
|
2009-08-17 11:45:24 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL);
|
2011-09-27 10:37:02 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Only Selected Channels", "Show keyframes for active Object and/or its selected bones only");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
|
2009-12-11 11:18:55 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
|
2009-12-11 11:18:55 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
|
2009-12-11 11:18:55 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
|
Timeline addition: Display cached frames
This started off doing pointcache debugging but it's also very useful for users too.
Previously it was very hard to see the state of the system when you're working caches
such as physics point cache - is it baked? which frames are cached? is it out of date?
Now, for better feedback, cached frames are drawn for the active object at the bottom
of the timeline - a semitransparent area shows the entire cache extents, and more
solid blocks on top show the frames that are cached. Darker versions indicate it's
using a disk cache.
It can be disabled in general in the timeline View -> Caches menu, or by each individual
system that can be shown.
There's still a bit to do on this, behaviour needs to be clarified still eg. deciding what
shows when it's out of date, or when it's been played back but not cached, etc. etc.
Part of this is due to a lack of definition in the point cache system itself, so we should
try and clean up/clarify this behaviour and what it means to users, at the same time.
Also would be interested in extending this to other caches such as fluid cache,
sequencer memory cache etc. in the future, too.
2010-06-22 02:29:52 +00:00
|
|
|
|
2012-01-25 21:23:34 +00:00
|
|
|
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);
|
|
|
|
|
|
Timeline addition: Display cached frames
This started off doing pointcache debugging but it's also very useful for users too.
Previously it was very hard to see the state of the system when you're working caches
such as physics point cache - is it baked? which frames are cached? is it out of date?
Now, for better feedback, cached frames are drawn for the active object at the bottom
of the timeline - a semitransparent area shows the entire cache extents, and more
solid blocks on top show the frames that are cached. Darker versions indicate it's
using a disk cache.
It can be disabled in general in the timeline View -> Caches menu, or by each individual
system that can be shown.
There's still a bit to do on this, behaviour needs to be clarified still eg. deciding what
shows when it's out of date, or when it's been played back but not cached, etc. etc.
Part of this is due to a lack of definition in the point cache system itself, so we should
try and clean up/clarify this behaviour and what it means to users, at the same time.
Also would be interested in extending this to other caches such as fluid cache,
sequencer memory cache etc. in the future, too.
2010-06-22 02:29:52 +00:00
|
|
|
/* 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);
|
2011-06-16 10:41:00 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "cache_dynamicpaint", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DYNAMICPAINT);
|
2011-10-13 20:00:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Dynamic Paint", "Show the active object's Dynamic Paint cache");
|
2011-06-16 10:41:00 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
|
2009-08-13 16:59:52 +00:00
|
|
|
}
|
|
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
static void rna_def_console_line(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "ConsoleLine", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console");
|
2009-09-04 23:20:45 +00:00
|
|
|
// XXX using non-inited "prop", uh? RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2010-08-11 05:21:43 +00:00
|
|
|
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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Line", "Text in the line");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
|
|
|
|
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");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
|
2009-07-16 00:50:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console");
|
2009-07-16 00:50:27 +00:00
|
|
|
|
|
|
|
|
/* 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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
|
2010-11-11 13:36:57 +00:00
|
|
|
|
2009-12-27 20:22:06 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "select_start", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
|
2009-12-27 20:22:06 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "sel_start");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "select_end", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
|
2009-12-27 20:22:06 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "sel_end");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
|
|
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
prop= RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Prompt", "Command line prompt");
|
2009-07-16 00:50:27 +00:00
|
|
|
|
2009-11-06 23:53:40 +00:00
|
|
|
prop= RNA_def_property(srna, "language", PROP_STRING, PROP_NONE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Language", "Command line prompt language");
|
2009-11-06 23:53:40 +00:00
|
|
|
|
2009-07-16 00:50:27 +00:00
|
|
|
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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "History", "Command history");
|
2009-07-16 00:50:27 +00:00
|
|
|
|
|
|
|
|
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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Output", "Command output");
|
2009-07-16 00:50:27 +00:00
|
|
|
}
|
|
|
|
|
|
2009-07-02 03:32:57 +00:00
|
|
|
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[] = {
|
2010-02-11 00:33:01 +00:00
|
|
|
{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"},
|
2009-07-02 03:32:57 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "FileSelectParams", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters");
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2009-07-10 17:05:04 +00:00
|
|
|
prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "title");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Title", "Title for the file browser");
|
2009-07-10 17:05:04 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2010-08-28 12:34:22 +00:00
|
|
|
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
|
2009-07-10 17:05:04 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "dir");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-10 17:05:04 +00:00
|
|
|
|
2010-08-28 12:34:22 +00:00
|
|
|
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
|
2009-07-10 17:05:04 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "file");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-10 17:05:04 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
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");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files");
|
2010-03-20 14:23:56 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-17 17:03:52 +00:00
|
|
|
prop= RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
|
2010-08-24 02:12:09 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files");
|
2010-03-20 14:23:56 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS , NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "sort");
|
|
|
|
|
RNA_def_property_enum_items(prop, file_sort_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sort", "");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_image", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Images", "Show image files");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_blender", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_script", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Script", "Show script files");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_font", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_sound", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_text", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Text", "Show text files");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
prop= RNA_def_property(srna, "use_filter_folder", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Folder", "Show folders");
|
2009-07-02 03:32:57 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
|
2010-03-10 19:30:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
|
2010-09-24 07:05:43 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "filter_glob");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Extension Filter", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
|
2009-07-02 03:32:57 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data");
|
2009-07-02 03:32:57 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "params");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser");
|
2010-09-24 07:05:43 +00:00
|
|
|
|
2011-11-07 16:26:53 +00:00
|
|
|
prop= RNA_def_property(srna, "active_operator", PROP_POINTER, PROP_NONE);
|
2010-09-24 07:05:43 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "op");
|
2011-11-07 16:26:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Operator", "");
|
2011-11-29 21:23:58 +00:00
|
|
|
|
|
|
|
|
/* keep this for compatibility with existing presets,
|
|
|
|
|
not exposed in c++ api because of keyword conflict */
|
|
|
|
|
prop= RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "op");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Active Operator", "");
|
2009-08-18 12:58:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_space_info(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
2010-11-11 13:36:57 +00:00
|
|
|
PropertyRNA *prop;
|
2009-08-18 12:58:51 +00:00
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "SpaceInfo", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceInfo");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Info", "Info space data");
|
2010-11-11 13:36:57 +00:00
|
|
|
|
|
|
|
|
/* 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");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL);
|
2009-08-18 12:58:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_space_userpref(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
srna= RNA_def_struct(brna, "SpaceUserPreferences", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceUserPref");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data");
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
|
* Interaction Presets
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
2010-04-14 06:27:50 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "filter");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI");
|
|
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_space_node(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
2009-08-19 00:55:30 +00:00
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem texture_type_items[] = {
|
2010-02-11 00:33:01 +00:00
|
|
|
{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"},
|
2009-08-19 00:55:30 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2011-01-31 11:17:50 +00:00
|
|
|
|
2011-11-02 18:55:32 +00:00
|
|
|
static EnumPropertyItem shader_type_items[] = {
|
|
|
|
|
{SNODE_SHADER_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit shader nodes from Object"},
|
|
|
|
|
{SNODE_SHADER_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit shader nodes from World"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2011-01-31 11:17:50 +00:00
|
|
|
static EnumPropertyItem backdrop_channels_items[] = {
|
|
|
|
|
{0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"},
|
2011-09-27 10:37:02 +00:00
|
|
|
{SNODE_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha",
|
|
|
|
|
"Draw image with RGB colors and alpha transparency"},
|
2011-01-31 11:17:50 +00:00
|
|
|
{SNODE_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
srna= RNA_def_struct(brna, "SpaceNodeEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceNode");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data");
|
2009-08-19 00:55:30 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "treetype");
|
2011-09-05 21:01:50 +00:00
|
|
|
RNA_def_property_enum_items(prop, nodetree_type_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
|
2009-08-19 00:55:30 +00:00
|
|
|
|
|
|
|
|
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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from");
|
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
|
2011-11-02 18:55:32 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "shader_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "shaderfrom");
|
|
|
|
|
RNA_def_property_enum_items(prop, shader_type_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Shader Type", "Type of data to take shader from");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
|
2009-08-19 00:55:30 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "ID", "Datablock whose nodes are being edited");
|
2009-08-19 00:55:30 +00:00
|
|
|
|
|
|
|
|
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);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked");
|
2009-08-19 00:55:30 +00:00
|
|
|
|
2010-09-22 08:10:46 +00:00
|
|
|
prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
2011-09-05 21:01:50 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SpaceNodeEditor_node_tree_poll");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited");
|
2011-09-05 21:01:50 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update");
|
2009-08-19 00:55:30 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
|
2009-08-19 00:55:30 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes");
|
2009-10-20 20:00:12 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
|
2011-01-30 06:58:36 +00:00
|
|
|
|
2011-02-07 16:41:57 +00:00
|
|
|
prop= RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_AUTO_RENDER);
|
2011-09-28 14:08:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Auto Render", "Re-render and composite changed layers on 3D edits");
|
2011-02-07 16:41:57 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
|
|
|
|
|
|
2011-01-30 07:04:12 +00:00
|
|
|
prop= RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE);
|
2011-01-30 06:58:36 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "zoom");
|
2011-02-10 10:24:05 +00:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2011-01-31 16:17:34 +00:00
|
|
|
RNA_def_property_range(prop, 0.01f, FLT_MAX);
|
2011-04-21 13:11:51 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
|
2011-01-30 06:58:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
|
|
|
|
|
|
2011-01-30 07:04:12 +00:00
|
|
|
prop= RNA_def_property(srna, "backdrop_x", PROP_FLOAT, PROP_NONE);
|
2011-01-30 06:58:36 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "xof");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Backdrop X", "Backdrop X offset");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
|
|
|
|
|
|
2011-01-30 07:04:12 +00:00
|
|
|
prop= RNA_def_property(srna, "backdrop_y", PROP_FLOAT, PROP_NONE);
|
2011-01-30 06:58:36 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "yof");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Backdrop Y", "Backdrop Y offset");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
|
2011-01-31 11:17:50 +00:00
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "backdrop_channels", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
|
|
|
|
RNA_def_property_enum_items(prop, backdrop_channels_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
|
2009-08-18 12:58:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_space_logic(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
2010-04-29 07:01:48 +00:00
|
|
|
PropertyRNA *prop;
|
2009-07-02 03:32:57 +00:00
|
|
|
|
2009-08-18 12:58:51 +00:00
|
|
|
srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceLogic");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data");
|
2010-05-04 00:06:13 +00:00
|
|
|
|
|
|
|
|
/* sensors */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_sensors_selected_objects", PROP_BOOLEAN, PROP_NONE);
|
2010-04-29 07:01:48 +00:00
|
|
|
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);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_sensors_active_object", PROP_BOOLEAN, PROP_NONE);
|
2010-04-29 07:01:48 +00:00
|
|
|
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);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_sensors_linked_controller", PROP_BOOLEAN, PROP_NONE);
|
2010-04-29 07:01:48 +00:00
|
|
|
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");
|
|
|
|
|
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
2010-05-04 00:06:13 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_sensors_active_states", PROP_BOOLEAN, PROP_NONE);
|
2010-06-21 07:51:40 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_STATE);
|
2010-04-29 07:01:48 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Active States", "Show only sensors connected to active states");
|
|
|
|
|
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
2010-05-04 00:06:13 +00:00
|
|
|
|
|
|
|
|
/* controllers */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_controllers_selected_objects", PROP_BOOLEAN, PROP_NONE);
|
2010-05-04 00:06:13 +00:00
|
|
|
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);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_controllers_active_object", PROP_BOOLEAN, PROP_NONE);
|
2010-05-04 00:06:13 +00:00
|
|
|
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");
|
|
|
|
|
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_controllers_linked_controller", PROP_BOOLEAN, PROP_NONE);
|
2010-05-04 00:06:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_LINK);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to sensor/actuator");
|
|
|
|
|
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
|
|
|
|
|
|
|
|
|
/* actuators */
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_actuators_selected_objects", PROP_BOOLEAN, PROP_NONE);
|
2010-05-04 00:06:13 +00:00
|
|
|
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);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_actuators_active_object", PROP_BOOLEAN, PROP_NONE);
|
2010-05-04 00:06:13 +00:00
|
|
|
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);
|
2010-04-29 07:01:48 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_actuators_linked_controller", PROP_BOOLEAN, PROP_NONE);
|
2010-05-04 00:06:13 +00:00
|
|
|
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");
|
|
|
|
|
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
prop= RNA_def_property(srna, "show_actuators_active_states", PROP_BOOLEAN, PROP_NONE);
|
2010-06-21 07:51:40 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_STATE);
|
2010-05-04 00:06:13 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Active States", "Show only actuators connected to active states");
|
|
|
|
|
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
|
|
|
|
|
2009-07-02 03:32:57 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
static void rna_def_space_clip(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem mode_items[] = {
|
|
|
|
|
{SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"},
|
|
|
|
|
{SC_MODE_RECONSTRUCTION, "RECONSTRUCTION", ICON_SNAP_FACE, "Reconstruction", "Show tracking/reconstruction tools"},
|
|
|
|
|
{SC_MODE_DISTORTION, "DISTORTION", ICON_GRID, "Distortion", "Show distortion tools"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem view_items[] = {
|
|
|
|
|
{SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"},
|
|
|
|
|
{SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "SpaceClipEditor", "Space");
|
|
|
|
|
RNA_def_struct_sdna(srna, "SpaceClip");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Space Clip Editor", "Clip editor space data");
|
|
|
|
|
|
|
|
|
|
/* movieclip */
|
|
|
|
|
prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Movie Clip", "Movie clip displayed and edited in this space");
|
|
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceClipEditor_clip_set", NULL, NULL);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* clip user */
|
|
|
|
|
prop= RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "MovieClipUser");
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "user");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Movie Clip User", "Parameters defining which frame of the movie clip is displayed");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* 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_CLIP, "rna_SpaceClipEditor_clip_mode_update");
|
|
|
|
|
|
|
|
|
|
/* view */
|
|
|
|
|
prop= RNA_def_property(srna, "view", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "view");
|
|
|
|
|
RNA_def_property_enum_items(prop, view_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "View", "Type of the clip editor view");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, "rna_SpaceClipEditor_view_type_update");
|
|
|
|
|
|
|
|
|
|
/* show pattern */
|
|
|
|
|
prop= RNA_def_property(srna, "show_marker_pattern", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Marker Pattern", "Show pattern boundbox for markers");
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_PATTERN);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show search */
|
|
|
|
|
prop= RNA_def_property(srna, "show_marker_search", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Marker Search", "Show search boundbox for markers");
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_SEARCH);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show pyramid */
|
|
|
|
|
prop= RNA_def_property(srna, "show_pyramid_levels", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Pyramid ", "Show patterns for each pyramid level for markers (KLT only)");
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_PYRAMID_LEVELS);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* lock to selection */
|
|
|
|
|
prop= RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Lock to Selection", "Lock viewport to selected markers during playback");
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_LOCK_SELECTION);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, "rna_SpaceClipEditor_lock_selection_update");
|
|
|
|
|
|
2012-01-26 11:49:38 +00:00
|
|
|
/* lock to time cursor */
|
|
|
|
|
prop= RNA_def_property(srna, "lock_time_cursor", PROP_BOOLEAN, PROP_NONE);
|
2012-01-28 08:45:51 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock to Time Cursor", "Lock curves view to time cursor during playback and tracking");
|
2012-01-26 11:49:38 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_LOCK_TIMECURSOR);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
/* show markers pathes */
|
|
|
|
|
prop= RNA_def_property(srna, "show_track_path", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_TRACK_PATH);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Track Path", "Show path of how track moves");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* path length */
|
|
|
|
|
prop= RNA_def_property(srna, "path_length", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "path_length");
|
|
|
|
|
RNA_def_property_range(prop, 0, 50);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Path Length", "Length of displaying path, in frames");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show tiny markers */
|
|
|
|
|
prop= RNA_def_property(srna, "show_tiny_markers", PROP_BOOLEAN, PROP_NONE);
|
2011-11-15 12:20:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Tiny Markers", "Show markers in a more compact manner");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_TINY_MARKER);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show bundles */
|
|
|
|
|
prop= RNA_def_property(srna, "show_bundles", PROP_BOOLEAN, PROP_NONE);
|
2011-11-21 17:05:27 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of 3D markers into footage");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_BUNDLES);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* mute footage */
|
|
|
|
|
prop= RNA_def_property(srna, "use_mute_footage", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mute Footage", "Mute footage and show black background instead");
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_MUTE_FOOTAGE);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* hide disabled */
|
|
|
|
|
prop= RNA_def_property(srna, "show_disabled", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Disabled", "Show disabled tracks from the footage");
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SC_HIDE_DISABLED);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* scopes */
|
|
|
|
|
prop= RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "scopes");
|
|
|
|
|
RNA_def_property_struct_type(prop, "MovieClipScopes");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize movie clip statistics");
|
|
|
|
|
|
|
|
|
|
/* show names */
|
|
|
|
|
prop= RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_NAMES);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Names", "Show track names and status");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show grid */
|
|
|
|
|
prop= RNA_def_property(srna, "show_grid", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRID);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Grid", "Show grid showing lens distortion");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show stable */
|
|
|
|
|
prop= RNA_def_property(srna, "show_stable", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_STABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Stable", "Show stable footage in editor (if stabilization is enabled)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* manual calibration */
|
|
|
|
|
prop= RNA_def_property(srna, "use_manual_calibration", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_MANUAL_CALIBRATION);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show stable */
|
|
|
|
|
prop= RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GPENCIL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Grease Pencil", "Show grease pencil strokes over the footage");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show filters */
|
|
|
|
|
prop= RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_FILTERS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Filters", "Show filters for graph editor");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show graph_frames */
|
|
|
|
|
prop= RNA_def_property(srna, "show_graph_frames", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_FRAMES);
|
2011-11-15 12:20:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Frames", "Show curve for per-frame average error (camera motion should be solved first)");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show graph_tracks */
|
|
|
|
|
prop= RNA_def_property(srna, "show_graph_tracks", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_TRACKS);
|
2011-11-15 12:20:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Tracks", "Display the speed curves (in \"x\" direction red, in \"y\" direction green) for the selected tracks");
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
2012-01-15 13:31:58 +00:00
|
|
|
|
|
|
|
|
/* ** channels ** */
|
|
|
|
|
|
|
|
|
|
/* show_red_channel */
|
|
|
|
|
prop= RNA_def_property(srna, "show_red_channel", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_RED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Red Channel", "Show red channel in the frame");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show_green_channel */
|
|
|
|
|
prop= RNA_def_property(srna, "show_green_channel", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_GREEN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Green Channel", "Show green channel in the frame");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* show_blue_channel */
|
|
|
|
|
prop= RNA_def_property(srna, "show_blue_channel", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_BLUE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Blue Channel", "Show blue channel in the frame");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
|
|
|
|
|
|
|
|
|
|
/* preview_grayscale */
|
|
|
|
|
prop= RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "postproc_flag", MOVIECLIP_PREVIEW_GRAYSCALE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Grayscale", "Display frame in grayscale mode");
|
|
|
|
|
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
|
2011-11-07 12:55:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-01-15 04:22:23 +00:00
|
|
|
void RNA_def_space(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
rna_def_space(brna);
|
|
|
|
|
rna_def_space_image(brna);
|
2009-06-09 05:39:01 +00:00
|
|
|
rna_def_space_sequencer(brna);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
rna_def_space_text(brna);
|
2009-07-02 03:32:57 +00:00
|
|
|
rna_def_fileselect_params(brna);
|
|
|
|
|
rna_def_space_filebrowser(brna);
|
2009-05-28 05:09:25 +00:00
|
|
|
rna_def_space_outliner(brna);
|
2009-05-31 01:22:34 +00:00
|
|
|
rna_def_background_image(brna);
|
2010-04-28 07:25:39 +00:00
|
|
|
rna_def_space_view3d(brna);
|
2009-06-02 08:08:41 +00:00
|
|
|
rna_def_space_buttons(brna);
|
2009-06-22 03:26:36 +00:00
|
|
|
rna_def_space_dopesheet(brna);
|
|
|
|
|
rna_def_space_graph(brna);
|
2009-06-12 06:44:49 +00:00
|
|
|
rna_def_space_nla(brna);
|
2009-08-13 16:59:52 +00:00
|
|
|
rna_def_space_time(brna);
|
2009-07-16 00:50:27 +00:00
|
|
|
rna_def_space_console(brna);
|
|
|
|
|
rna_def_console_line(brna);
|
2009-08-18 12:58:51 +00:00
|
|
|
rna_def_space_info(brna);
|
|
|
|
|
rna_def_space_userpref(brna);
|
|
|
|
|
rna_def_space_node(brna);
|
|
|
|
|
rna_def_space_logic(brna);
|
2011-11-07 12:55:18 +00:00
|
|
|
rna_def_space_clip(brna);
|
2009-01-15 04:22:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|