From 5943c81a937dcf3f18c09923938bdb0b6d352f77 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 11 Dec 2012 14:19:41 +0000 Subject: code cleanup: neareast -> nearest --- source/blender/makesdna/DNA_tracking_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 12819303b26..b258fbaa668 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -373,7 +373,7 @@ enum { /* MovieTrackingStrabilization->filter */ enum { - TRACKING_FILTER_NEAREAST = 0, + TRACKING_FILTER_NEAREST = 0, TRACKING_FILTER_BILINEAR = 1, TRACKING_FILTER_BICUBIC = 2 }; -- cgit v1.2.3 From 7c699a217ae8bb98ead02923334db7dd105bf1b5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 11 Dec 2012 14:29:01 +0000 Subject: define the size of matrix args for both rows/cols. --- source/blender/makesdna/DNA_modifier_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 3875a0d5799..68aa7600cd1 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -586,7 +586,7 @@ typedef struct MeshDeformModifierData { /* runtime */ void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd, - float *vertexcos, int totvert, float cagemat[][4]); + float *vertexcos, int totvert, float cagemat[4][4]); } MeshDeformModifierData; typedef enum { -- cgit v1.2.3 From dd0e554d9e76d0c6394d89b10bea4ad9b566d5fb Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 12 Dec 2012 12:42:12 +0000 Subject: Sequencer: add textured solid option for opengl preview --- source/blender/makesdna/DNA_scene_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 1599b71d832..1afa6987ac6 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1198,6 +1198,7 @@ typedef struct Scene { /* seq_flag */ #define R_SEQ_GL_PREV 1 // #define R_SEQ_GL_REND 2 // UNUSED, opengl render has its own operator now. +#define R_SEQ_SOLID_TEX 4 /* displaymode */ -- cgit v1.2.3 From 12b642062c6fcef70151bd2424c2ebbc6a1a6843 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 12 Dec 2012 18:58:11 +0000 Subject: Holiday coding log :) Nice formatted version (pictures soon): http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability Short list of main changes: - Transparent region option (over main region), added code to blend in/out such panels. - Min size window now 640 x 480 - Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake. - Macbook retina support, use command line --no-native-pixels to disable it - Timeline Marker label was drawing wrong - Trackpad and magic mouse: supports zoom (hold ctrl) - Fix for splash position: removed ghost function and made window size update after creation immediate - Fast undo buffer save now adds UI as well. Could be checked for regular file save even... Quit.blend and temp file saving use this now. - Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)" - New Userpref option "Keep Session" - this always saves quit.blend, and loads on start. This allows keeping UI and data without actual saves, until you actually save. When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header) - Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. - User preferences (themes, keymaps, user settings) now can be saved as a separate file. Old option is called "Save Startup File" the new one "Save User Settings". To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still. - OSX: fixed bug that stopped giving mouse events outside window. This also fixes "Continuous Grab" for OSX. (error since 2009) --- source/blender/makesdna/DNA_screen_types.h | 9 ++++----- source/blender/makesdna/DNA_space_types.h | 9 +++++---- source/blender/makesdna/DNA_userdef_types.h | 17 ++++++++++++----- 3 files changed, 21 insertions(+), 14 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index b1cd54950e6..ed2ffdf6702 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -159,7 +159,8 @@ typedef struct ARegion { short do_draw; /* private, cached notifier events */ short do_draw_overlay; /* private, cached notifier events */ short swap; /* private, indicator to survive swap-exchange */ - short pad[3]; + short overlap; /* private, set for indicate drawing overlapped */ + short pad[2]; struct ARegionType *type; /* callbacks for this region type */ @@ -167,6 +168,8 @@ typedef struct ARegion { ListBase panels; /* Panel */ ListBase handlers; /* wmEventHandler */ + struct wmTimer *regiontimer; /* blend in/out */ + char *headerstr; /* use this string to draw info */ void *regiondata; /* XXX 2.50, need spacedata equivalent? */ } ARegion; @@ -235,10 +238,6 @@ enum { #define RGN_ALIGN_VSPLIT 6 #define RGN_ALIGN_FLOAT 7 #define RGN_ALIGN_QSPLIT 8 -#define RGN_OVERLAP_TOP 9 -#define RGN_OVERLAP_BOTTOM 10 -#define RGN_OVERLAP_LEFT 11 -#define RGN_OVERLAP_RIGHT 12 #define RGN_SPLIT_PREV 32 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index be6464778e5..9ef18f31f29 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -797,7 +797,7 @@ typedef struct SpaceText { int top, viewlines; short flags, menunr; - short lheight; /* user preference */ + short lheight; /* user preference, is font_size! */ char cwidth, linenrs_tot; /* runtime computed, character width and the number of chars to use when showing line numbers */ int left; int showlinenrs; @@ -816,8 +816,9 @@ typedef struct SpaceText { char findstr[256]; /* ST_MAX_FIND_STR */ char replacestr[256]; /* ST_MAX_FIND_STR */ - short margin_column; /* column number to show right margin at */ - char pad[6]; + short margin_column; /* column number to show right margin at */ + short lheight_dpi; /* actual lineheight, dpi controlled */ + char pad[4]; void *drawcache; /* cache for faster drawing */ } SpaceText; @@ -886,7 +887,7 @@ typedef struct SpaceNode { struct ID *id, *from; /* context, no need to save in file? well... pinning... */ short flag, pad1; /* menunr: browse id block in header */ - float aspect, aspect_sqrt; + float aspect, pad2; /* internal state variables */ float xof, yof; /* offset for drawing the backdrop */ float zoom; /* zoom for backdrop */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 2e2f65dbec7..8f8cf3eda26 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -359,9 +359,10 @@ typedef struct UserDef { short versions; short dbl_click_time; - int gameflags; - int wheellinescroll; - int uiflag, language; + short gameflags; + short wheellinescroll; + int uiflag, uiflag2; + int language; short userpref, viewzoom; int mixbufsize; @@ -412,7 +413,7 @@ typedef struct UserDef { short scrcastfps; /* frame rate for screencast to be played back */ short scrcastwait; /* milliseconds between screencast snapshots */ - short widget_unit; /* defaults to 20 for 72 DPI setting */ + short widget_unit; /* private, defaults to 20 for 72 DPI setting */ short anisotropic_filter; short use_16bit_textures, use_gpu_mipmap; @@ -443,7 +444,7 @@ typedef struct UserDef { int compute_device_id; float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */ - float pad; + float pixelsize; /* private, set by GHOST, to multiply DPI with */ } UserDef; extern UserDef U; /* from blenkernel blender.c */ @@ -539,6 +540,12 @@ typedef enum eUserpref_UI_Flag { USER_HIDE_SYSTEM_BOOKMARKS = (1 << 31) } eUserpref_UI_Flag; +/* uiflag2 */ +typedef enum eUserpref_UI_Flag2 { + USER_KEEP_SESSION = (1 << 0), + USER_REGION_OVERLAP = (1 << 1) +} eUserpref_UI_Flag2; + /* Auto-Keying mode */ typedef enum eAutokey_Mode { /* AUTOKEY_ON is a bitflag */ -- cgit v1.2.3 From 02689df6c03ec99a1a957a6c29847952eb233b67 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Thu, 13 Dec 2012 14:33:14 +0000 Subject: Part of bratwurst GSOC cleanup of subsurf unwrap code: Ommit subsurf level in the operator and use the modifier level and subdivision type instead. Using subsurf only makes sense if the modifier is first so print an warning and turn off if this is not the case. --- source/blender/makesdna/DNA_scene_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 1afa6987ac6..988517f8ebc 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -945,7 +945,7 @@ typedef struct ToolSettings { short uvcalc_mapalign; short uvcalc_flag; short uv_flag, uv_selectmode; - short uv_subsurf_level; + short pad2; /* Grease Pencil */ short gpencil_flags; @@ -973,7 +973,7 @@ typedef struct ToolSettings { /* Multires */ char multires_subdiv_type; - char pad2[5]; + char pad3[5]; /* Skeleton generation */ short skgen_resolution; -- cgit v1.2.3 From b8d89be64c419a075cf55a1e6e9aa9d021731ad3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 14 Dec 2012 04:07:30 +0000 Subject: UV Warp Modifier: Based on patch [#30837] UV Offset Modifier by Pawel Kowal (pkowal) - Allows you to setup a transformation between objects to apply to UV coords. - Option to select which axis apply to U/V. - Option to select the UV center (needed for transformations that scale or rotate). - Uses from/to objects in a similar way to the Warp modifier. - Vertex group can be used to adjust influence. --- source/blender/makesdna/DNA_modifier_types.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 68aa7600cd1..089103c66e5 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -76,7 +76,8 @@ typedef enum ModifierType { eModifierType_Remesh = 41, eModifierType_Skin = 42, eModifierType_LaplacianSmooth = 43, - eModifierType_Triangulate = 44, + eModifierType_Triangulate = 44, + eModifierType_UVWarp = 45, NUM_MODIFIER_TYPES } ModifierType; @@ -1140,4 +1141,20 @@ typedef struct LaplacianSmoothModifierData { short flag, repeat; } LaplacianSmoothModifierData; -#endif +typedef struct UVWarpModifierData { + ModifierData modifier; + + char axis_u, axis_v; + char pad[6]; + float center[2]; /* used for rotate/scale */ + + struct Object *object_src; /* source */ + char bone_src[64]; /* optional name of bone target, MAX_ID_NAME-2 */ + struct Object *object_dst; /* target */ + char bone_dst[64]; /* optional name of bone target, MAX_ID_NAME-2 */ + + char vgroup_name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ + char uvlayer_name[64]; /* MAX_CUSTOMDATA_LAYER_NAME */ +} UVWarpModifierData; + +#endif /* __DNA_MODIFIER_TYPES_H__ */ -- cgit v1.2.3 From f276b3a3cdfa46be051db981395e4d7cb5691b89 Mon Sep 17 00:00:00 2001 From: Alex Fraser Date: Fri, 14 Dec 2012 04:57:26 +0000 Subject: Adding a new SPH solver that is more physically accurate. See patch #29681 http://projects.blender.org/tracker/index.php?func=detail&aid=29681&group_id=9&atid=127 The solver was mostly implemented by John Mansour at VPAC, with help from me and with funding from the AutoCRC. The SPH formulation is due to Gingold and Monaghan, and the smoothing kernel is due to Wendland. This solver does not replace the old one; it is available as an option. Note that the new solver uses different units than the old one. The patch page has a couple of attachments that can be used to test the new solver, particularly sphclassical_dam_s0.01_grav.blend (ignore the earlier tests). The simulation in that file compares well with a physical experimental dam break; details in a paper by Changhong Hu and Makoto Sueyoshi, also referred to on that page. --- source/blender/makesdna/DNA_particle_types.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 5952aa8afb0..1cf16fb52b3 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -116,6 +116,9 @@ typedef struct ParticleData { float size; /* size and multiplier so that we can update size when ever */ + float sphdensity; /* density of sph particle */ + int pad; + int hair_index; short flag; short alive; /* the life state of a particle */ @@ -130,6 +133,8 @@ typedef struct SPHFluidSettings { float stiffness_k, stiffness_knear, rest_density; float buoyancy; int flag, spring_frames; + short solver; + short pad[3]; } SPHFluidSettings; /* fluid->flag */ @@ -141,6 +146,10 @@ typedef struct SPHFluidSettings { #define SPH_FAC_VISCOSITY 32 #define SPH_FAC_REST_LENGTH 64 +/* fluid->solver (numerical ID field, not bitfield) */ +#define SPH_SOLVER_DDR 0 +#define SPH_SOLVER_CLASSICAL 1 + typedef struct ParticleSettings { ID id; struct AnimData *adt; -- cgit v1.2.3 From 81d240c8c86d0741e26eaa3f8b4b4c9bfac38f1a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 15 Dec 2012 07:57:16 +0000 Subject: avoid using strlen() for comparisons in for loops. for expanding whitespace in the text editor and ui paste. --- source/blender/makesdna/intern/makesdna.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index fa0b313a120..e02a9bfe56a 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -984,7 +984,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) /* little test first... */ /* Mind the breaking condition here! */ if (debugSDNA) printf("\tStart of header scan:\n"); - for (i = 0; strlen(includefiles[i]); i++) { + for (i = 0; *(includefiles[i]) != '\0'; i++) { sprintf(str, "%s%s", baseDirectory, includefiles[i]); if (debugSDNA) printf("\t|-- Converting %s\n", str); if (convert_include(str)) { @@ -1100,7 +1100,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) else { /* add all include files defined in the global array */ - for (i = 0; strlen(includefiles[i]); i++) { + for (i = 0; *(includefiles[i]) != '\0'; i++) { fprintf(fp, "#include \"%s%s\"\n", baseDirectory, includefiles[i]); } -- cgit v1.2.3 From 35dd893c368548b5d9d7bb56a1b9db07c71165d2 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 15 Dec 2012 09:45:34 +0000 Subject: Bugfix, irc collection: With larger header sizes (via DPI setting), splitting an area horizontally (using left-bottom corner widget, move up) stopped immediate after split, not allowing to drag it to a position. Culprit was code to check minimum header size, and area operator using the same flags. Now ScrVert has two flags - one for internal use, one for the tools to set. --- source/blender/makesdna/DNA_screen_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index ed2ffdf6702..de6ddb4b896 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -82,7 +82,8 @@ typedef struct bScreen { typedef struct ScrVert { struct ScrVert *next, *prev, *newv; vec2s vec; - int flag; + /* first one used internally, second one for tools */ + short flag, editflag; } ScrVert; typedef struct ScrEdge { -- cgit v1.2.3 From 695468a3b9a54dc2f26b2aac7c48d6d066f80b3d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 15 Dec 2012 16:22:18 +0000 Subject: Finished themes for transparent Button regions in Blender. Notes and image: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability - now each editor has own settings for "show panel header" and "show panel background", and colors+alpha for this. - this setting used to be global for all editors, but it can conflict with looks of specific editors. - Now you can set for editors to show panels with a 100% transparent tool/properties region. Note: read XML theme files now might get an error, Campbell will fix. --- source/blender/makesdna/DNA_userdef_types.h | 31 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 8f8cf3eda26..a67502d9283 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -143,8 +143,10 @@ typedef struct uiWidgetStateColors { typedef struct uiPanelColors { char header[4]; + char back[4]; short show_header; - short pad; + short show_back; + int pad; } uiPanelColors; typedef struct ThemeUI { @@ -157,7 +159,7 @@ typedef struct ThemeUI { uiWidgetStateColors wcol_state; - uiPanelColors panel; + uiPanelColors panel; /* depricated, but we keep it for do_versions (2.66.1) */ char iconfile[256]; // FILE_MAXFILE length float icon_alpha; @@ -172,33 +174,36 @@ typedef struct ThemeUI { typedef struct ThemeSpace { /* main window colors */ char back[4]; - char title[4]; + char title[4]; /* panel title */ char text[4]; char text_hi[4]; /* header colors */ - char header[4]; - char header_title[4]; + char header[4]; /* region background */ + char header_title[4]; /* unused */ char header_text[4]; char header_text_hi[4]; /* button/tool regions */ - char button[4]; - char button_title[4]; + char button[4]; /* region background */ + char button_title[4]; /* panel title */ char button_text[4]; char button_text_hi[4]; /* listview regions */ - char list[4]; - char list_title[4]; + char list[4]; /* region background */ + char list_title[4]; /* panel title */ char list_text[4]; char list_text_hi[4]; /* float panel */ - char panel[4]; - char panel_title[4]; - char panel_text[4]; - char panel_text_hi[4]; +/* char panel[4]; unused */ +/* char panel_title[4]; unused */ +/* char panel_text[4]; unused */ +/* char panel_text_hi[4]; unused */ + + /* note, cannot use name 'panel' because of DNA mapping old files */ + uiPanelColors panelcolors; char shade1[4]; char shade2[4]; -- cgit v1.2.3 From 9a469b62cabf3d434de68c9e698970cc7f060136 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Dec 2012 08:43:05 +0000 Subject: replace strcpy with BLI_strncpy or memcpy when the size is known. --- source/blender/makesdna/DNA_customdata_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index 6f7bb5a723e..e28b8780250 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -46,7 +46,7 @@ typedef struct CustomDataLayer { int active_clone; /* number of the layer to render*/ int active_mask; /* number of the layer to render*/ int uid; /* shape keyblock unique id reference*/ - char name[64]; /* layer name, MAX_CUSTOMDATA_LAYER_AAME */ + char name[64]; /* layer name, MAX_CUSTOMDATA_LAYER_NAME */ void *data; /* layer data */ } CustomDataLayer; -- cgit v1.2.3 From f9ec10688a634f446e5666eead66e865a1595b67 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 17 Dec 2012 02:34:53 +0000 Subject: fix [#33501] Grease pencil in OpenGL render With the view3d 'Render Only' option, grease pencil wouldn't draw, but for OpenGL render it did. Since grease pencil can be very useful in opengl renders, enable grease pencil drawing with 'Render Only' option in the viewport, and add a checkbox in the grease pencil header not to draw (unchecking each layer is annoying and applies to all spaces). --- source/blender/makesdna/DNA_space_types.h | 7 ++++--- source/blender/makesdna/DNA_view3d_types.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 9ef18f31f29..2e4ecba98c3 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -496,6 +496,7 @@ typedef enum eSpaceSeq_Flag { SEQ_DRAW_SAFE_MARGINS = (1 << 3), /* SEQ_DRAW_GPENCIL = (1 << 4), */ /* DEPRECATED */ SEQ_NO_DRAW_CFRANUM = (1 << 5), + SEQ_SHOW_GPENCIL = (1 << 6), } eSpaceSeq_Flag; /* sseq->view */ @@ -776,7 +777,7 @@ typedef enum eSpaceImage_Flag { SI_DRAW_TILE = (1 << 19), SI_SMOOTH_UV = (1 << 20), SI_DRAW_STRETCH = (1 << 21), -/* SI_DISPGP = (1 << 22), */ /* deprecated */ + SI_SHOW_GPENCIL = (1 << 22), SI_DRAW_OTHER = (1 << 23), SI_COLOR_CORRECTION = (1 << 24), @@ -907,7 +908,7 @@ typedef struct SpaceNode { /* snode->flag */ typedef enum eSpaceNode_Flag { SNODE_BACKDRAW = (1 << 1), -/* SNODE_DISPGP = (1 << 2), */ /* XXX: Grease Pencil - deprecated? */ + SNODE_SHOW_GPENCIL = (1 << 2), SNODE_USE_ALPHA = (1 << 3), SNODE_SHOW_ALPHA = (1 << 4), SNODE_SHOW_R = (1 << 7), @@ -1061,7 +1062,7 @@ typedef enum eSpaceClip_Flag { SC_SHOW_GRID = (1 << 9), SC_SHOW_STABLE = (1 << 10), SC_MANUAL_CALIBRATION = (1 << 11), -/* SC_SHOW_GPENCIL = (1 << 12),*/ /* UNUSED */ + SC_SHOW_GPENCIL = (1 << 12), SC_SHOW_FILTERS = (1 << 13), SC_SHOW_GRAPH_FRAMES = (1 << 14), SC_SHOW_GRAPH_TRACKS = (1 << 15), diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index c83b0bc366f..dbe54a4fcdf 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -225,6 +225,7 @@ typedef struct View3D { #define V3D_DISPBGPICS 2 #define V3D_HIDE_HELPLINES 4 #define V3D_INVALID_BACKBUF 8 +#define V3D_INVALID_BACKBUF 8 #define V3D_ALIGN 1024 #define V3D_SELECT_OUTLINE 2048 @@ -261,7 +262,7 @@ typedef struct View3D { /* View3d->flag2 (short) */ #define V3D_RENDER_OVERRIDE 4 #define V3D_SOLID_TEX 8 -#define V3D_DISPGP 16 +#define V3D_SHOW_GPENCIL 16 #define V3D_LOCK_CAMERA 32 #define V3D_RENDER_SHADOW 64 /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */ #define V3D_SHOW_RECONSTRUCTION 128 -- cgit v1.2.3 From 519378fca6fb3982568ab975c904658954e44c7f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 17 Dec 2012 02:46:30 +0000 Subject: patch [#33441] Remove unneeded strcpy()'s from makesdna.c --- source/blender/makesdna/DNA_space_types.h | 3 +-- source/blender/makesdna/intern/makesdna.c | 27 +++++++++++---------------- 2 files changed, 12 insertions(+), 18 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 2e4ecba98c3..d632a886130 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -494,9 +494,8 @@ typedef enum eSpaceSeq_Flag { SEQ_MARKER_TRANS = (1 << 1), SEQ_DRAW_COLOR_SEPARATED = (1 << 2), SEQ_DRAW_SAFE_MARGINS = (1 << 3), -/* SEQ_DRAW_GPENCIL = (1 << 4), */ /* DEPRECATED */ + SEQ_SHOW_GPENCIL = (1 << 4), SEQ_NO_DRAW_CFRANUM = (1 << 5), - SEQ_SHOW_GPENCIL = (1 << 6), } eSpaceSeq_Flag; /* sseq->view */ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index e02a9bfe56a..e131cde8b27 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -208,7 +208,7 @@ static int calculate_structlens(int); /** * Construct the DNA.c file */ -void dna_write(FILE *file, void *pntr, int size); +static void dna_write(FILE *file, const void *pntr, const int size); /** * Report all structures found so far, and print their lengths. @@ -892,7 +892,7 @@ static int calculate_structlens(int firststruct) #define MAX_DNA_LINE_LENGTH 20 -void dna_write(FILE *file, void *pntr, int size) +static void dna_write(FILE *file, const void *pntr, const int size) { static int linelength = 0; int i; @@ -934,7 +934,7 @@ void printStructLengths(void) } -static int make_structDNA(char *baseDirectory, FILE *file) +static int make_structDNA(const char *baseDirectory, FILE *file) { int len, i; short *sp; @@ -1036,12 +1036,10 @@ static int make_structDNA(char *baseDirectory, FILE *file) /* pass */ } else { - strcpy(str, "SDNA"); - dna_write(file, str, 4); + dna_write(file, "SDNA", 4); /* write names */ - strcpy(str, "NAME"); - dna_write(file, str, 4); + dna_write(file, "NAME", 4); len = nr_names; dna_write(file, &len, 4); @@ -1053,8 +1051,7 @@ static int make_structDNA(char *baseDirectory, FILE *file) dna_write(file, names[0], len); /* write TYPES */ - strcpy(str, "TYPE"); - dna_write(file, str, 4); + dna_write(file, "TYPE", 4); len = nr_types; dna_write(file, &len, 4); @@ -1067,16 +1064,14 @@ static int make_structDNA(char *baseDirectory, FILE *file) dna_write(file, types[0], len); /* WRITE TYPELENGTHS */ - strcpy(str, "TLEN"); - dna_write(file, str, 4); + dna_write(file, "TLEN", 4); len = 2 * nr_types; if (nr_types & 1) len += 2; dna_write(file, typelens_native, len); /* WRITE STRUCTS */ - strcpy(str, "STRC"); - dna_write(file, str, 4); + dna_write(file, "STRC", 4); len = nr_structs; dna_write(file, &len, 4); @@ -1165,13 +1160,13 @@ int main(int argc, char **argv) return_status = 1; } else { - char baseDirectory[256]; + const char *baseDirectory; if (argc == 3) { - strcpy(baseDirectory, argv[2]); + baseDirectory = argv[2]; } else { - strcpy(baseDirectory, BASE_HEADER); + baseDirectory = BASE_HEADER; } fprintf(file, "const unsigned char DNAstr[] = {\n"); -- cgit v1.2.3 From ab2c273b12df9be548abb3cf491be88ddbbf465e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 17 Dec 2012 08:01:43 +0000 Subject: Added GPL header to sconscripts! Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes... --- source/blender/makesdna/SConscript | 28 +++++++++++++++++++++++++++- source/blender/makesdna/intern/SConscript | 28 +++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/SConscript b/source/blender/makesdna/SConscript index c3d39783b00..a6520a6c03e 100644 --- a/source/blender/makesdna/SConscript +++ b/source/blender/makesdna/SConscript @@ -1,4 +1,30 @@ -#!/usr/bin/python +#!/usr/bin/env python +# +# ***** 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, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Nathan Letwory. +# +# ***** END GPL LICENSE BLOCK ***** + Import ('env') objs = [] diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index c1e6eb5281d..add9611866d 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -1,4 +1,30 @@ -#!/usr/bin/python +#!/usr/bin/env python +# +# ***** 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, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2006, Blender Foundation +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): Nathan Letwory. +# +# ***** END GPL LICENSE BLOCK ***** + import sys import os -- cgit v1.2.3 From 5fcb12d7541dc9e83756f26422b160c97d9a124d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 18 Dec 2012 15:22:06 +0000 Subject: changing RNA properties now prints python script in the info view. next will add context so bpy.data.xxx[id] are not used for all references. --- source/blender/makesdna/DNA_windowmanager_types.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 2294abc0735..27aef3b8ec6 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -65,19 +65,21 @@ struct uiLayout; /* keep in sync with 'wm_report_items' in wm_rna.c */ typedef enum ReportType { - RPT_DEBUG = 1<<0, - RPT_INFO = 1<<1, - RPT_OPERATOR = 1<<2, - RPT_WARNING = 1<<3, - RPT_ERROR = 1<<4, - RPT_ERROR_INVALID_INPUT = 1<<5, - RPT_ERROR_INVALID_CONTEXT = 1<<6, - RPT_ERROR_OUT_OF_MEMORY = 1<<7 + RPT_DEBUG = 1 << 0, + RPT_INFO = 1 << 1, + RPT_OPERATOR = 1 << 2, + RPT_PROPERTY = 1 << 3, + RPT_WARNING = 1 << 4, + RPT_ERROR = 1 << 5, + RPT_ERROR_INVALID_INPUT = 1 << 6, + RPT_ERROR_INVALID_CONTEXT = 1 << 7, + RPT_ERROR_OUT_OF_MEMORY = 1 << 8 } ReportType; #define RPT_DEBUG_ALL (RPT_DEBUG) #define RPT_INFO_ALL (RPT_INFO) #define RPT_OPERATOR_ALL (RPT_OPERATOR) +#define RPT_PROPERTY_ALL (RPT_PROPERTY) #define RPT_WARNING_ALL (RPT_WARNING) #define RPT_ERROR_ALL (RPT_ERROR|RPT_ERROR_INVALID_INPUT|RPT_ERROR_INVALID_CONTEXT|RPT_ERROR_OUT_OF_MEMORY) -- cgit v1.2.3 From 6571713ddb7e1f091c30a43b315fb37778605ed2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 18 Dec 2012 17:46:42 +0000 Subject: Ambient occlusion baker from multi-resolution mesh This implements AO baking directly from multi-resolution mesh with much less memory overhead than regular baker. Uses rays distribution implementation from Morten Mikkelsen, raycast is based on RayObject also used by Blender Internal. Works in single-thread yet, multi-threading would be implemented later. --- source/blender/makesdna/DNA_scene_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 988517f8ebc..b3aabf1265a 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -491,7 +491,8 @@ typedef struct RenderData { /* Bake Render options */ short bake_osa, bake_filter, bake_mode, bake_flag; short bake_normal_space, bake_quad_split; - float bake_maxdist, bake_biasdist, bake_pad; + float bake_maxdist, bake_biasdist; + int bake_rays_number; /* path to render output */ char pic[1024]; /* 1024 = FILE_MAX */ -- cgit v1.2.3 From ef0473994b6b21aa49bbfab26a483d90d0fef004 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 18 Dec 2012 20:56:25 +0000 Subject: BGE: Some as of yet unmerged work I did in the Swiss branch. These changes include: * Cleaning up the conversion code to avoid a per-face material conversion. Materials are now stored in buckets and only converted if a new material is found. This replaces some of Campbell's earlier work on the subject. His work wasn't as thorough, but it was much safer for a release. * Shaders are only compiled for LibLoaded materials once. Before they could be compiled twice, which could really slow things down. * Refactoring the rasterizer code to use a strategy design pattern to handle different geometry rendering methods such as immediate mode, vertex arrays and vertex buffer objects. VBOs are added, but they will be disabled in a following commit since they are still slower than vertex arrays with display lists. However, VBOs are still useful for mobile, so it's good to keep them around. * Better multi-uv support. The BGE should now be able to handle more than two UV layers, which should help it better match the viewport. --- source/blender/makesdna/DNA_scene_types.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index b3aabf1265a..2edbf14eb6c 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -636,7 +636,8 @@ typedef struct GameData { short physicsEngine; short exitkey, pad; short ticrate, maxlogicstep, physubstep, maxphystep; - short obstacleSimulation, pad1; + short obstacleSimulation; + short raster_storage; float levelHeight; float deactivationtime, lineardeactthreshold, angulardeactthreshold, pad2; } GameData; @@ -663,6 +664,12 @@ typedef struct GameData { #define OBSTSIMULATION_TOI_rays 1 #define OBSTSIMULATION_TOI_cells 2 +/* Raster storage */ +#define RAS_STORE_AUTO 0 +#define RAS_STORE_IMMEDIATE 1 +#define RAS_STORE_VA 2 +#define RAS_STORE_VBO 3 + /* GameData.flag */ #define GAME_RESTRICT_ANIM_UPDATES (1 << 0) #define GAME_ENABLE_ALL_FRAMES (1 << 1) -- cgit v1.2.3