From 1788bc298c7afc202346477ac14456f6f208359b Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 24 May 2011 12:12:12 +0000 Subject: = Limit Distance Constraint - 'For Transform' Option = The Limit Distance Constraint now has a "For Transform" option just like all the other Limit constraints. This option controls whether the constraint gets applied to interactive transforms in the 3D View too, preventing controllers from getting large values without the animator knowing. Additional code changes: * Split code to get constraint targets and grab their matrices for solving out to a separate helper function: get_constraint_targets_for_solving() * Fixed a bug where "found constraint ...." prints would appear in the console. Looks like some warning print that was forgotten TODO: * While coding this, I noticed potential division by zero bugs with the Limit Distance constraint. Looking into these after this commit. --- source/blender/makesdna/DNA_constraint_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 1d752fce4ef..c2c0c6f1611 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -677,7 +677,10 @@ typedef enum eRotLimit_Flags { /* distance limit constraint */ /* bDistLimitConstraint->flag */ typedef enum eDistLimit_Flag { - LIMITDIST_USESOFT = (1<<0) + /* "soft" cushion effect when reaching the limit sphere */ // NOT IMPLEMENTED! + LIMITDIST_USESOFT = (1<<0), + /* as for all Limit constraints - allow to be used during transform? */ + LIMITDIST_TRANSFORM = (1<<1) } eDistLimit_Flag; /* bDistLimitConstraint->mode */ -- cgit v1.2.3 From 36a720606e4689eaa2cc3c089a3ff6c27ed023ee Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 26 May 2011 12:34:53 +0000 Subject: New experimental drawtype for armatures: "Wire" This is equivalent to using B-Bones which are all scaled to have xwidth=zwidth=0, which can be useful to see how some limbs will bend, without the overhead of blocks blocking the view or having to scale down bone sizes first. --- source/blender/makesdna/DNA_armature_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 3547101612f..808db1f4843 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -136,7 +136,8 @@ typedef enum eArmature_Drawtype { ARM_OCTA = 0, ARM_LINE, ARM_B_BONE, - ARM_ENVELOPE + ARM_ENVELOPE, + ARM_WIRE } eArmature_Drawtype; /* armature->deformflag */ -- cgit v1.2.3 From 05a1c144ad3ece78a641401be1193905c3db49f5 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 3 Jun 2011 13:34:02 +0000 Subject: Experimental Feature: Frame Range Masks for FModifiers Using this feature, it is now possible to for example have different noise-profiles for different parts of a curve, which makes it possible to do animate camera shake for example. Or perhaps, for having greater control of mixing and matching different parts of F-Modifier effects, such as combining several generator modifiers to get multi-case functions for instance. See http://aligorith.blogspot.com/2011/06/gsoc11-fmodifier-range- masks.html for details. --- source/blender/makesdna/DNA_anim_types.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 4b649031f97..88a3fe81825 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -62,6 +62,9 @@ typedef struct FModifier { short flag; /* settings for the modifier */ float influence; /* the amount that the modifier should influence the value */ + + float sfra; /* start frame of restricted frame-range */ + float efra; /* end frame of restricted frame-range */ } FModifier; /* Types of F-Curve modifier @@ -86,13 +89,15 @@ typedef enum eFModifier_Types { /* F-Curve Modifier Settings */ typedef enum eFModifier_Flags { /* modifier is not able to be evaluated for some reason, and should be skipped (internal) */ - FMODIFIER_FLAG_DISABLED = (1<<0), + FMODIFIER_FLAG_DISABLED = (1<<0), /* modifier's data is expanded (in UI) */ - FMODIFIER_FLAG_EXPANDED = (1<<1), + FMODIFIER_FLAG_EXPANDED = (1<<1), /* modifier is active one (in UI) for editing purposes */ - FMODIFIER_FLAG_ACTIVE = (1<<2), + FMODIFIER_FLAG_ACTIVE = (1<<2), /* user wants modifier to be skipped */ - FMODIFIER_FLAG_MUTED = (1<<3) + FMODIFIER_FLAG_MUTED = (1<<3), + /* restrict range that F-Modifier can be considered over */ + FMODIFIER_FLAG_RANGERESTRICT = (1<<4) } eFModifier_Flags; /* --- */ -- cgit v1.2.3 From 56e20eafe90ba6082acad9f84da3a1dc69c987a0 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 4 Jun 2011 01:54:34 +0000 Subject: User Pref to not overwrite Recent Files list everytime you open a new file This is just a more formalised version of a local hack I've been running locally for the past year now. It's especially useful when you want to maintain your own set of recently opened test files (or perhaps current project files), but then be able to quickly open some .blend files downloaded from the web (i.e. checking out some bug report, or how someone else sets up some node setup) without loosing/polluting your existing recent files list as a result of doing so, and having to either resort to some nasty methods to get it back. Of course, this is still really hacky, as for instance, it means that the currently opened file will not show up in the recent files list for quick reload. However, that's why this is a userpref :) --- source/blender/makesdna/DNA_userdef_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 1057eeae40f..a7a04384d3c 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -435,6 +435,7 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_NONEGFRAMES (1 << 24) #define USER_TXT_TABSTOSPACES_DISABLE (1 << 25) #define USER_TOOLTIPS_PYTHON (1 << 26) +#define USER_NO_RECENTLOAD_UPDATE (1 << 27) /* helper macro for checking frame clamping */ #define FRAMENUMBER_MIN_CLAMP(cfra) \ -- cgit v1.2.3 From 185663b52b618a5fc20878db269ac056ede7591e Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 4 Jun 2011 06:22:01 +0000 Subject: FModifier Influence/BlendIn-Out Following on from my commit to introduce frame ranges for FModifiers, those frame ranges can now have blend in/out values. By setting a blendin or blendout value, you're specifying the number of frames for the modifier's "full influence" to take effect or fade out relative to the start/end frames. The "full influence" above needs a little clarification. When the "use influence" setting is enabled, "full influence" is taken from the "influence" slider (a new setting). Otherwise, it uses 1.0 (i.e. unmodified influence, same as old behaviour before the introduction of influence controls). The influence slider basically says how much the modifier's effects are allowed to contribute to the final result. --- Notes: - This opt-in "Use Influence" approach is really forced upon us because there are heaps of old files for which we cannot easily version patch without spending some effort going through all the data in the file, hunting out the F-Modifiers. - interpf() seems to use a backwards order compared to everything else --- source/blender/makesdna/DNA_anim_types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 88a3fe81825..c650d15722d 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -65,6 +65,8 @@ typedef struct FModifier { float sfra; /* start frame of restricted frame-range */ float efra; /* end frame of restricted frame-range */ + float blendin; /* number of frames from sfra before modifier takes full influence */ + float blendout; /* number of frames from efra before modifier fades out */ } FModifier; /* Types of F-Curve modifier @@ -97,7 +99,9 @@ typedef enum eFModifier_Flags { /* user wants modifier to be skipped */ FMODIFIER_FLAG_MUTED = (1<<3), /* restrict range that F-Modifier can be considered over */ - FMODIFIER_FLAG_RANGERESTRICT = (1<<4) + FMODIFIER_FLAG_RANGERESTRICT = (1<<4), + /* use influence control */ + FMODIFIER_FLAG_USEINFLUENCE = (1<<5) } eFModifier_Flags; /* --- */ -- cgit v1.2.3 From eeba87792661a56f3a2d312421c500186aca8445 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Jun 2011 10:13:50 +0000 Subject: fix [#27607] Scene's render.filepath gets cropped to 159 characters use 240 char limit, remove backbuffer path which wasn't used. --- source/blender/makesdna/DNA_scene_types.h | 2 +- source/blender/makesdna/DNA_userdef_types.h | 2 +- 2 files 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 70e90cfc713..2b88469a28d 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -350,7 +350,7 @@ typedef struct RenderData { float bake_maxdist, bake_biasdist, bake_pad; /* paths to backbufffer, output */ - char backbuf[160], pic[160]; + char pic[240]; /* stamps flags. */ int stamp; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 50e66f91028..907710ae4cd 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -305,7 +305,7 @@ typedef struct UserDef { int savetime; char tempdir[160]; // FILE_MAXDIR length char fontdir[160]; - char renderdir[160]; + char renderdir[240]; // FILE_MAX length char textudir[160]; char plugtexdir[160]; char plugseqdir[160]; -- cgit v1.2.3 From 8e85491ab7f4d2e156910eceb87ca4023d42c95a Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sat, 11 Jun 2011 01:03:03 +0000 Subject: BGE Animations: Adding a layer option to Action actuators. --- source/blender/makesdna/DNA_actuator_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 683d8142cc9..7951ebc8c99 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -56,8 +56,10 @@ typedef struct bActionActuator { char frameProp[32]; /* Set this property to the actions current frame */ short blendin; /* Number of frames of blending */ short priority; /* Execution priority */ + short layer; /* Animation layer */ short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ short strideaxis; /* Displacement axis */ + short pad[3]; float stridelength; /* Displacement incurred by cycle */ // not in use } bActionActuator; -- cgit v1.2.3 From a3101de7be2820bd19fd6aec25c63ccb449a8675 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Jun 2011 08:55:29 +0000 Subject: remove backbuf from internal struct's (unused in 2.5x) --- source/blender/makesdna/DNA_scene_types.h | 17 +++-------------- 1 file changed, 3 insertions(+), 14 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 2b88469a28d..b9830138150 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -253,19 +253,12 @@ typedef struct RenderData { */ short yparts; - short winpos, planes, imtype, subimtype; - - /** Mode bits: */ - /* 0: Enable backbuffering for images */ - short bufflag; - short quality; + short planes, imtype, subimtype, quality; /** * Render to image editor, fullscreen or to new window. */ short displaymode; - - short rpad1, rpad2; /** * Flags for render settings. Use bit-masking to access the settings. @@ -322,11 +315,7 @@ typedef struct RenderData { /** * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45 */ - float xasp; - /** - * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45 - */ - float yasp; + float xasp, yasp; float frs_sec_base; @@ -349,7 +338,7 @@ typedef struct RenderData { short bake_normal_space, bake_quad_split; float bake_maxdist, bake_biasdist, bake_pad; - /* paths to backbufffer, output */ + /* path to render output, can contain // suffix and #'s for current frame */ char pic[240]; /* stamps flags. */ -- cgit v1.2.3 From 81946b9138201800e495eb28addf254958feb1a4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Jun 2011 10:09:56 +0000 Subject: fix for recent commit, this stops makesdna from working right: /* ... // ... */ --- source/blender/makesdna/DNA_scene_types.h | 2 +- 1 file changed, 1 insertion(+), 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 b9830138150..c6fa07482c5 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -338,7 +338,7 @@ typedef struct RenderData { short bake_normal_space, bake_quad_split; float bake_maxdist, bake_biasdist, bake_pad; - /* path to render output, can contain // suffix and #'s for current frame */ + /* path to render output */ char pic[240]; /* stamps flags. */ -- cgit v1.2.3 From 5745f99deed89e547da87235f934c477675dd747 Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Sun, 12 Jun 2011 23:51:30 +0000 Subject: =?UTF-8?q?Elbeem=20/=20Fluidsim=20update:=20a)=20Enable=20the=20p?= =?UTF-8?q?ossibility=20to=20remove=20the=20"air=20bubble"=20around=20subm?= =?UTF-8?q?erged=20collision=20object.=20This=20feature=20is=20enabled=20a?= =?UTF-8?q?s=20standard=20for=20new=20files.=20The=20code=20was=20found=20?= =?UTF-8?q?in=20elbeem=20by=20nudelZ,=20coded=20and=20provided=20by=20Nils?= =?UTF-8?q?=20Th=C3=BCrey=20(thanks!)=20b)=20Old=20baked=20files=20gets=20?= =?UTF-8?q?deleted=20if=20a=20new=20bake=20gets=20started=20(were=20overwr?= =?UTF-8?q?itten=20before=20and=20resulted=20in=20weird=20old=20bake=20+?= =?UTF-8?q?=20new=20bake=20mixture)=20(idea=20by=20nudelZ)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/blender/makesdna/DNA_object_fluidsim.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h index 6f4c16cb7f3..578bf8dd415 100644 --- a/source/blender/makesdna/DNA_object_fluidsim.h +++ b/source/blender/makesdna/DNA_object_fluidsim.h @@ -69,7 +69,7 @@ typedef struct FluidsimSettings { short viscosityMode; short viscosityExponent; /* gravity strength */ - float gravx,gravy,gravz; + float grav[3]; /* anim start end time (in seconds) */ float animStart, animEnd; /* bake start end time (in blender frames) */ @@ -161,6 +161,9 @@ typedef struct FluidsimSettings { #define OB_FSBND_FREESLIP (1<<(OB_TYPEFLAG_START+4)) #define OB_FSINFLOW_LOCALCOORD (1<<(OB_TYPEFLAG_START+5)) +/* surface generation flag (part of enabling chapter 6 of "Free Surface Flows with Moving and Deforming Objects for LBM") */ +#define OB_FSSG_NOOBS (1<<(OB_TYPEFLAG_START+6)) + // guiDisplayMode particle flags #define OB_FSDOM_GEOM 1 #define OB_FSDOM_PREVIEW 2 -- cgit v1.2.3 From a4216cb1d4336bd2244f4519398db0b9f19833ad Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 13 Jun 2011 13:54:21 +0000 Subject: Transformation Channel Driver Variables - "Proper Localspace" By popular demand, the "Transformation Channel" driver variable type now has a "local space" transform space option which uses the same magic that constraints use for defining local-space. This is what many bug reporters and feature requesters have moaned about for a while now, so after reviewing several of the bug reports which lead to the current situation, here is what has been much-wanted for so long! In order to implement this, I've: - renamed the old "Local Space" option here to "Transformation Space", in order to prevent old rigs breaking. This has also been kept, as it is useful for #21384 (though perhaps with this new option it isn't needed anymore) - reviewed my fix for #20870 (IIRC, a Durian-era bug), which related to the non-uniqueness of matrix->euler decomposition --- source/blender/makesdna/DNA_anim_types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index c650d15722d..00a9786fc6f 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -289,8 +289,12 @@ typedef enum eDriverTarget_Flag { DTAR_FLAG_STRUCT_REF = (1<<0), /* idtype can only be 'Object' */ DTAR_FLAG_ID_OB_ONLY = (1<<1), - /* toggles localspace (where transforms are manually obtained) */ + + /* "localspace" flags */ + /* base flag - basically "pre parent+constraints" */ DTAR_FLAG_LOCALSPACE = (1<<2), + /* include constraints transformed to space including parents */ + DTAR_FLAG_LOCAL_CONSTS = (1<<3), } eDriverTarget_Flag; /* Transform Channels for Driver Targets */ -- cgit v1.2.3 From a2dda7c74d74770aeceb37924a1ef8e0d90ae57b Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 13 Jun 2011 17:08:33 +0000 Subject: BGE Patch: [#27425] Allow to change the damping of the camera actuator ########## original name: "Allow to change the strenght of the "go behind" constraint of the camera actuator" The camera actuator is an actuator that drive the camera to follow an object, with a set of constraint. Currently, when the object followed rotate on himself (like a person, or an helicopter), the camera is really slow to go behind (at least 10 seconds). This patch gives the UI to tweak the strenght of the 'go behind'[named damping] constraint. ########### epydocs (rst) updated too --- source/blender/makesdna/DNA_actuator_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 683d8142cc9..887a0300ee2 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -133,7 +133,7 @@ typedef struct bIpoActuator { typedef struct bCameraActuator { struct Object *ob; float height, min, max; - float pad; + float damping; short pad1, axis; float pad2; } bCameraActuator ; -- cgit v1.2.3 From 5e418071352977f0e55e0f84ffbb02ff8c5a6763 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 15 Jun 2011 09:45:26 +0000 Subject: Fix #27654: vertex parenting not working with constructive modifiers. Vertex parents were not requesting the original index layer, now do this as part of depsgraph building, and make constraints with vertex groups use the same system. Fix is based on patch by Campbell, but with some changes. --- source/blender/makesdna/DNA_object_types.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 54a885a0860..f4488c140a0 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -250,12 +250,11 @@ typedef struct Object { struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */ struct DerivedMesh *derivedDeform, *derivedFinal; - int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ + unsigned int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */ + unsigned int customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */ unsigned int state; /* bit masks of game controllers that are active */ unsigned int init_state; /* bit masks of initial state as recorded by the users */ - int pad2; - ListBase gpulamp; /* runtime, for lamps only */ ListBase pc_ids; ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */ -- cgit v1.2.3 From 39443dcb53d56192bdc3165436933c87f4b3f961 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 15 Jun 2011 10:19:35 +0000 Subject: Code cleanup: remove reference to workob global that no longer exists. --- source/blender/makesdna/DNA_object_types.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index f4488c140a0..dfc7d42793d 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -290,10 +290,6 @@ typedef struct DupliObject { float orco[3], uv[2]; } DupliObject; -/* this work object is defined in object.c */ -extern Object workob; - - /* **************** OBJECT ********************* */ /* used many places... should be specialized */ -- cgit v1.2.3 From a3e296fc4060ab9aac46a8ec2f18696d6776d653 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Wed, 15 Jun 2011 18:59:22 +0000 Subject: Committing patch #25676 Anisotropic filtering in viewport and BGE by me. This patch adds anisotropic filtering of textures in the viewport and the BGE. The quality of the filtering is adjustable in the user preferences under System. For more information on anisotropic filtering: http://en.wikipedia.org/wiki/Anisotropic_filtering One current limitation of this setup (having the option a user preference) is it makes runtimes more troublesome. Runtimes don't have user preferences set, so for now the blender player defaults to 2x AF. Options will be added later to change this value (probably a command line option). --- source/blender/makesdna/DNA_userdef_types.h | 3 +-- 1 file changed, 1 insertion(+), 2 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 907710ae4cd..ae57cf3f80b 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -375,7 +375,7 @@ typedef struct UserDef { short scrcastwait; /* milliseconds between screencast snapshots */ short widget_unit; /* defaults to 20 for 72 DPI setting */ - short pad[3]; + short anisotropic_filter; char versemaster[160]; char verseuser[160]; @@ -385,7 +385,6 @@ typedef struct UserDef { short autokey_flag; /* flags for autokeying */ short text_render, pad9; /*options for text rendering*/ - float pad10; struct ColorBand coba_weight; /* from texture.h */ -- cgit v1.2.3 From 47b061609d7a29116cdac9ba375408b5217683bd Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Thu, 16 Jun 2011 01:57:39 +0000 Subject: BGE Animations: FCurve Actuators are now converted to Action Actuators in do_versions(). Note: The fcurve actuator still needs to be removed from menus and such. --- source/blender/makesdna/DNA_actuator_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index b368aadf4c2..071f66cddd6 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -122,6 +122,7 @@ typedef struct bObjectActuator { struct Object *reference; } bObjectActuator; +/* deprecated, handled by bActionActuator now */ typedef struct bIpoActuator { short flag, type; float sta, end; -- cgit v1.2.3 From cfcc4b4fcd7dabd0929db53fc5a9cf0833704259 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 16 Jun 2011 02:46:38 +0000 Subject: == Simple Title Cards for Sequencer == This commit adds an experimental effect strip to the sequencer: "Title Card". This is useful for adding simple one-line text section headers or "title cards" (i.e. title + author/contact details) to video clips, which is often seen in demo videos accompanying papers and/or animation tests. See http://aligorith.blogspot.com/2011/06/gsoc11-simple-title- cards.html for some more details on usage. Code notes: - There are a few things I've done here which will probably need cleaning up. For instance, the hacks to get threadsafe fonts for rendering, and also the way I've tried to piggyback the backdrop drawing on top of the Solid Colour strips (this method was used to keep changes here minimal, but is quite fragile if things change). --- source/blender/makesdna/DNA_sequence_types.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 3e7654bcf47..b9bea7a89b0 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -227,6 +227,14 @@ typedef struct SolidColorVars { float pad; } SolidColorVars; +typedef struct TitleCardVars { + char titlestr[64]; + char subtitle[128]; + + float fgcol[3]; + float bgcol[3]; +} TitleCardVars; + typedef struct SpeedControlVars { float * frameMap; float globalSpeed; @@ -314,7 +322,8 @@ typedef struct SpeedControlVars { #define SEQ_SPEED 29 #define SEQ_MULTICAM 30 #define SEQ_ADJUSTMENT 31 -#define SEQ_EFFECT_MAX 31 +#define SEQ_TITLECARD 40 +#define SEQ_EFFECT_MAX 40 #define STRIPELEM_FAILED 0 #define STRIPELEM_OK 1 -- cgit v1.2.3 From fd24c99b5ddd251ee64f95ae227ba76bcf9cb561 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Jun 2011 15:01:22 +0000 Subject: directory only filesel for operators which don't have a filepath or filename property. --- source/blender/makesdna/DNA_space_types.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 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 e120cd14775..2b039060e47 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -696,18 +696,19 @@ enum FileSortTypeE { #define FILE_OPENFILE 0 #define FILE_SAVE 1 -/* sfile->flag and simasel->flag */ -#define FILE_SHOWSHORT 1 -#define FILE_RELPATH 2 /* was FILE_STRINGCODE */ -#define FILE_LINK 4 -#define FILE_HIDE_DOT 8 -#define FILE_AUTOSELECT 16 -#define FILE_ACTIVELAY 32 -#define FILE_ATCURSOR 64 -#define FILE_SYNCPOSE 128 -#define FILE_FILTER 256 -#define FILE_BOOKMARKS 512 -#define FILE_GROUP_INSTANCE 1024 +/* sfile->params->flag and simasel->flag */ +#define FILE_SHOWSHORT (1<<0) +#define FILE_RELPATH (1<<1) /* was FILE_STRINGCODE */ +#define FILE_LINK (1<<2) +#define FILE_HIDE_DOT (1<<3) +#define FILE_AUTOSELECT (1<<4) +#define FILE_ACTIVELAY (1<<5) +#define FILE_ATCURSOR (1<<6) +#define FILE_DIRSEL_ONLY (1<<7) +#define FILE_FILTER (1<<8) +#define FILE_BOOKMARKS (1<<9) +#define FILE_GROUP_INSTANCE (1<<10) + /* files in filesel list: file types */ #define BLENDERFILE (1<<2) -- cgit v1.2.3 From b306566a44be30fb33d6079c0b2a02b1161ff88c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Jun 2011 13:02:23 +0000 Subject: fix [#25598] projection surface snap issue Excuse the thrashing, this is from r35438, reverted r35444 under the _wrong_ impression Martin considered unacceptable. --- 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 c6fa07482c5..100a66d209f 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1071,6 +1071,7 @@ typedef struct Scene { #define SCE_SNAP_ROTATE 2 #define SCE_SNAP_PEEL_OBJECT 4 #define SCE_SNAP_PROJECT 8 +#define SCE_SNAP_PROJECT_NO_SELF 16 /* toolsettings->snap_target */ #define SCE_SNAP_TARGET_CLOSEST 0 #define SCE_SNAP_TARGET_CENTER 1 -- cgit v1.2.3 From f7e22c729e8fa20a0c9b6d9f1d2bba0505c09585 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 18 Jun 2011 03:14:24 +0000 Subject: throw an error if preprocessor definitions are used for DNA array lengths (previously would fail silently & not work right). --- source/blender/makesdna/intern/makesdna.c | 16 ++++++++++++++-- 1 file changed, 14 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 8b841b67e54..80299d44a78 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -670,6 +670,8 @@ int arraysize(char *astr, int len) } else if( str[a]==']' && cp) { str[a]= 0; + /* if 'cp' is a preprocessor definition, it will evaluate to 0, + * the caller needs to check for this case and throw an error */ mul*= atoi(cp); } } @@ -713,7 +715,12 @@ static int calculate_structlens(int firststruct) /* has the name an extra length? (array) */ mul= 1; if( cp[namelen-1]==']') mul= arraysize(cp, namelen); - + + if (mul == 0) { + printf("Zero array size found or could not parse %s: '%.*s'\n", types[structtype], namelen + 1, cp); + dna_error = 1; + } + /* 4-8 aligned/ */ if(sizeof(void *) == 4) { if (len % 4) { @@ -743,7 +750,12 @@ static int calculate_structlens(int firststruct) /* has the name an extra length? (array) */ mul= 1; if( cp[namelen-1]==']') mul= arraysize(cp, namelen); - + + if (mul == 0) { + printf("Zero array size found or could not parse %s: '%.*s'\n", types[structtype], namelen + 1, cp); + dna_error = 1; + } + /* struct alignment */ if(type >= firststruct) { if(sizeof(void *)==8 && (len % 8) ) { -- cgit v1.2.3 From 2d3d025e8cf8776361e6397502f4e240ae9a5ccc Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Tue, 21 Jun 2011 20:39:41 +0000 Subject: 3D Audio GSoC: - Sequencer dynamics: Now it's possible to change the output channels and the resampling quality also increased (previously maximum quality was 44,1 kHz) - Changed two buffers to use ffmpeg allocation, not sure if that helps somehow. --- source/blender/makesdna/DNA_scene_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 100a66d209f..2fc92aa12c4 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -126,6 +126,8 @@ typedef struct FFMpegCodecData { int video_bitrate; int audio_bitrate; int audio_mixrate; + int audio_channels; + int audio_pad; float audio_volume; int gop_size; int flags; -- cgit v1.2.3 From 587b51831d7c7b40ba94eef941fbe4fe91ad8230 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Thu, 23 Jun 2011 18:59:47 +0000 Subject: More flexible size options for particle billboards. This adds scale factors for width and height of billboards, relative to the particle size. It's useful when the particle size is primarily used for collision and the like, so the billboard appearance can be adjusted independently. Also allows non-square billboards. In addition the billboards can be scaled by the particle velocity with optional head and tail factors (similar to line drawing options). This allows for pseudo-motionblur effects. --- source/blender/makesdna/DNA_particle_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 09053848b28..aace8156e9d 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -168,7 +168,7 @@ typedef struct ParticleSettings { /* billboards */ short bb_align, bb_uv_split, bb_anim, bb_split_offset; - float bb_tilt, bb_rand_tilt, bb_offset[2]; + float bb_tilt, bb_rand_tilt, bb_offset[2], bb_size[2], bb_vel_head, bb_vel_tail; /* draw color */ float color_vec_max; -- cgit v1.2.3 From 57f4844c43c097356c321f6b7efd00646ecd50fc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 28 Jun 2011 09:42:17 +0000 Subject: make drawing faces in the UV editor an image space option, re-using the mesh option was lazy and doesn't make much sense. --- source/blender/makesdna/DNA_space_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 2b039060e47..ff9f2269f53 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -754,7 +754,7 @@ enum FileSortTypeE { #define SI_EDITTILE (1<<1) #define SI_CLIP_UV (1<<2) #define SI_DRAWTOOL (1<<3) -#define SI_DEPRECATED1 (1<<4) /* stick UVs to others in the same location */ +#define SI_NO_DRAWFACES (1<<4) #define SI_DRAWSHADOW (1<<5) #define SI_SELACTFACE (1<<6) /* deprecated */ #define SI_DEPRECATED2 (1<<7) -- cgit v1.2.3 From 2710c567b9deaba51f7d3bc2572a14872cb12641 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 29 Jun 2011 13:00:19 +0000 Subject: 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. --- source/blender/makesdna/DNA_action_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 0716d1ddbf2..3ead485e10a 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -566,7 +566,8 @@ typedef enum eDopeSheet_FilterFlag { /* DopeSheet general flags */ typedef enum eDopeSheet_Flag { - ADS_FLAG_SUMMARY_COLLAPSED = (1<<0) /* when summary is shown, it is collapsed, so all other channels get hidden */ + ADS_FLAG_SUMMARY_COLLAPSED = (1<<0), /* when summary is shown, it is collapsed, so all other channels get hidden */ + ADS_FLAG_SHOW_DBFILTERS = (1<<1) /* show filters for datablocks */ } eDopeSheet_Flag; -- cgit v1.2.3 From 5f4f75c51a511f4f190c16eedfc4c04c3b9aa387 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sun, 3 Jul 2011 01:59:17 +0000 Subject: BGE Animations: Adding in layer weights to allow for layer blending. --- source/blender/makesdna/DNA_actuator_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 071f66cddd6..93db8340aac 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -59,8 +59,9 @@ typedef struct bActionActuator { short layer; /* Animation layer */ short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */ short strideaxis; /* Displacement axis */ - short pad[3]; + short pad; float stridelength; /* Displacement incurred by cycle */ // not in use + float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */ } bActionActuator; typedef struct Sound3D -- cgit v1.2.3 From c4491f558b77530ef45ef7a1b80ba7567e338bae Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 4 Jul 2011 18:14:41 +0000 Subject: Current situation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A mesh can consist out of multiple material. Take a character with clothing's. the skin can be a different material as the different clothing's. During compositing it is a common use-case to only do a part of the composit on only a specific material. Currently this can not be done. In blender movies this feature is known to be implemented, but until now it never got integrated into trunk. Proposal With material index the Blender internal renderer will be capable of creating a buffer containing the material indexes of the first pixel-hit. This will be implemented in the same manner as the object index. In the compositor the ID Mask node can be used to extract the information out of the Render pass. Impact User interface On the properties-space the next changes will be done Scene⇒Render layer⇒Passes⇒Material index will be added Material⇒Options⇒Pass index will be added DNA Material struct will get an new field called “index”. this will be a short-type. Material struct the field pad will be removed. A new Render-layer pass will be added (bit 1«18) RNA Material RNA is updated (based on “pass index” from object) Render layer RNA is updated (based on IndexOB) Blender internal renderer The Blender internal renderer will process the render pass as a copy of the Object index. Blender compositor The render layer input will get a new output socket called “IndexMA” Usage An example on how to use material index can be found at: https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/compositing/composite_materialindex.blend This is also example of a commit message longer than the commit itself :) --- source/blender/makesdna/DNA_material_types.h | 2 +- source/blender/makesdna/DNA_scene_types.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 1489593f7f6..060b1bf42d1 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -161,7 +161,7 @@ typedef struct Material { int mapto_textured; /* render-time cache to optimise texture lookups */ short shadowonly_flag; /* "shadowsonly" type */ - short pad; + short index; /* custom index for render passes */ ListBase gpumaterial; /* runtime */ } Material; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 100a66d209f..f351a48b998 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -201,6 +201,7 @@ typedef struct SceneRenderLayer { #define SCE_PASS_RAYHITS (1<<15) #define SCE_PASS_EMIT (1<<16) #define SCE_PASS_ENVIRONMENT (1<<17) +#define SCE_PASS_INDEXMA (1<<18) /* note, srl->passflag is treestore element 'nr' in outliner, short still... */ -- cgit v1.2.3 From a5906de7c4f1bd188030ee4b8d9822c7c31fc2ea Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 8 Jul 2011 13:22:58 +0000 Subject: Fix #26962: softbody collision doesn't respect subsurf+displace modifiers. Softbody was still using a flag to determine if it should use the final or deform derivedmesh, but this wans't exposed in the UI. Others systems use the collision modifier, now softbody uses it also to get vertices and faces, but with own collision code. --- source/blender/makesdna/DNA_object_force.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 37568a22f54..fc8ce1b5820 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -420,7 +420,7 @@ typedef struct SoftBody { #define OB_SB_SELF 512 #define OB_SB_FACECOLL 1024 #define OB_SB_EDGECOLL 2048 -#define OB_SB_COLLFINAL 4096 +#define OB_SB_COLLFINAL 4096 /* deprecated */ #define OB_SB_BIG_UI 8192 #define OB_SB_AERO_ANGLE 16384 -- cgit v1.2.3 From b2eb2a00f104ae4d201ab58f83623e36ba45aef8 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 14 Jul 2011 03:27:33 +0000 Subject: introduce variables for ndof settings --- source/blender/makesdna/DNA_userdef_types.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 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 50e66f91028..78bc1c73ec9 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -365,7 +365,7 @@ typedef struct UserDef { short recent_files; /* maximum number of recently used files to remember */ short smooth_viewtx; /* miliseconds to spend spinning the view */ short glreslimit; - short ndof_pan, ndof_rotate; +/* short ndof_pan, ndof_rotate; */ short curssize; short color_picker_type; short ipo_new; /* interpolation mode for newly added F-Curves */ @@ -375,7 +375,10 @@ typedef struct UserDef { short scrcastwait; /* milliseconds between screencast snapshots */ short widget_unit; /* defaults to 20 for 72 DPI setting */ - short pad[3]; + short pad[1]; + + float ndof_sensitivity; /* overall sensitivity of 3D mouse */ + int ndof_flag; /* flags for 3D mouse */ char versemaster[160]; char verseuser[160]; @@ -578,6 +581,17 @@ extern UserDef U; /* from blenkernel blender.c */ #define TH_OLDSKOOL 3 #define TH_SHADED 4 +/* ndof_flag (3D mouse options) */ +#define NDOF_SHOW_GUIDE (1 << 0) +#define NDOF_FLY_HELICOPTER (1 << 1) +#define NDOF_LOCK_HORIZON (1 << 2) +/* the following might not need to be saved between sessions, + but they do need to live somewhere accessible... +#define NDOF_SHOULD_PAN (1 << 3) +#define NDOF_SHOULD_ZOOM (1 << 4) +#define NDOF_SHOULD_ROTATE (1 << 5) +*/ + #ifdef __cplusplus } #endif -- cgit v1.2.3 From 729498ab2da989d0bfbba02c1b1a6bc9f6964b1c Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Fri, 15 Jul 2011 13:32:02 +0000 Subject: Fix for [#26712] Particle group instance 'Use Count' value gets reset on file-load. * New object pointers can't be loaded properly for library linked groups, so the weight groups now store an index to the group objects at save time. This index is used at load time to set the objects without relying on the old pointers. * If the library linked group is modified the indices can be wrong, but this can't really be avoided easily as there's no way to relate objects in a linked group between loads. --- source/blender/makesdna/DNA_particle_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index aace8156e9d..69ee530c0b6 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -89,7 +89,8 @@ typedef struct ParticleDupliWeight { struct ParticleDupliWeight *next, *prev; struct Object *ob; short count; - short flag, rt[2]; + short flag; + short index, rt; /* only updated on file save and used on file load */ } ParticleDupliWeight; typedef struct ParticleData { -- cgit v1.2.3 From d8e216833a278d85caece8407d6ea5fad1a10c11 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 19 Jul 2011 02:47:43 +0000 Subject: cleanup of scene->gamedata DNA xsch and ysch were originally planed to replace the scene->r.xsch/r.ysch however in blender/3dview we still need to use the r. values. Therefore we can't really run from using those values even in bplayer. So removed the values in gamedata. The way it's now, render values (xsch and ysch) are responsible for aspect ratio and gamedata xplay and yplay are responsible for the size of the window. --- source/blender/makesdna/DNA_scene_types.h | 6 ++++-- 1 file changed, 4 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 f351a48b998..3c14dacf973 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -430,7 +430,8 @@ typedef struct GameData { /* * Radius of the activity bubble, in Manhattan length. Objects * outside the box are activity-culled. */ - float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!! + float activityBoxRadius; + /* * bit 3: (gameengine): Activity culling is enabled. * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling @@ -447,7 +448,8 @@ typedef struct GameData { /* stereo/dome mode */ struct GameDome dome; - short stereoflag, stereomode, xsch, ysch; //xsch and ysch used for backwards compat. + short stereoflag, stereomode; + short pad2, pad3; float eyeseparation, pad1; } GameData; -- cgit v1.2.3 From 28780342eddb0e1e767bf64d69cb99bd138d621f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Jul 2011 00:41:00 +0000 Subject: fix/workaround [#28040] float images reduced to 256 levels per channel upon save Generated images would not be re-generated with a float buffer on load, even when selected on creation. Now save the float buffer setting as a generated image flag. This means you can enable before baking to enable baking to a float buffer. --- source/blender/makesdna/DNA_image_types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index 99ed2319415..dd033339ca4 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -102,7 +102,8 @@ typedef struct Image { short animspeed; /* for generated images */ - short gen_x, gen_y, gen_type; + short gen_x, gen_y; + char gen_type, gen_flag; /* display aspect - for UV editing images resized for faster openGL display */ float aspx, aspy; @@ -136,5 +137,8 @@ typedef struct Image { #define IMA_MAX_RENDER_TEXT 512 #define IMA_MAX_RENDER_SLOT 8 +/* gen_flag */ +#define IMA_GEN_FLOAT 1 + #endif -- cgit v1.2.3 From 407a2a8439f61922139a3c5d1607818234924fe1 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 21 Jul 2011 21:40:04 +0000 Subject: tweaked ephemeral ndof data types --- source/blender/makesdna/DNA_userdef_types.h | 5 ++--- source/blender/makesdna/DNA_view3d_types.h | 7 +++---- 2 files changed, 5 insertions(+), 7 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 a94c10a7aa0..6fbdb9842d6 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -365,7 +365,6 @@ typedef struct UserDef { short recent_files; /* maximum number of recently used files to remember */ short smooth_viewtx; /* miliseconds to spend spinning the view */ short glreslimit; -/* short ndof_pan, ndof_rotate; */ short curssize; short color_picker_type; short ipo_new; /* interpolation mode for newly added F-Curves */ @@ -586,11 +585,11 @@ extern UserDef U; /* from blenkernel blender.c */ #define NDOF_FLY_HELICOPTER (1 << 1) #define NDOF_LOCK_HORIZON (1 << 2) /* the following might not need to be saved between sessions, - but they do need to live somewhere accessible... + but they do need to live somewhere accessible... */ #define NDOF_SHOULD_PAN (1 << 3) #define NDOF_SHOULD_ZOOM (1 << 4) #define NDOF_SHOULD_ROTATE (1 << 5) -*/ + #ifdef __cplusplus } diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 7379493003d..27ffc6d856b 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -190,11 +190,10 @@ typedef struct View3D { /* drawflags, denoting state */ short zbuf, transp, xray; - char ndofmode; /* mode of transform for 6DOF devices -1 not found, 0 normal, 1 fly, 2 ob transform */ - char ndoffilter; /* filter for 6DOF devices 0 normal, 1 dominant */ - + char pad3[2]; + void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */ - + /* XXX depricated? */ struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */ -- cgit v1.2.3 From 58895bee7bb1b877a7ba1e1648e75c9598706566 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Jul 2011 23:36:17 +0000 Subject: fix [#28052] PET: Shift-O cycling skips "random falloff" --- 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 3c14dacf973..8203a4dd77c 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1107,7 +1107,8 @@ typedef struct Scene { #define PROP_SHARP 3 #define PROP_LIN 4 #define PROP_CONST 5 -#define PROP_RANDOM 6 +#define PROP_RANDOM 6 +#define PROP_MODE_MAX 7 /* toolsettings->proportional */ #define PROP_EDIT_OFF 0 -- cgit v1.2.3 From ea90544d65a5b2549d5e0b4761de3bf0f2631688 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 22 Jul 2011 15:28:50 +0000 Subject: Need some fun once a while: On dragging a non-connected node on a noodle, it will insert it. Functionality tweaks are possible, but it already feels non-intrusive. Rules: - Insertion only when a single noodle is intersecting with node. - Default connects first matching socket type. - If no socket match, it connects the first. --- source/blender/makesdna/DNA_node_types.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 03387c3a63a..efaf30b02f6 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -179,6 +179,10 @@ typedef struct bNodeLink { } bNodeLink; + +/* link->flag */ +#define NODE_LINKFLAG_HILITE 1 + /* the basis for a Node tree, all links and nodes reside internal here */ /* only re-usable node trees are in the library though, materials and textures allocate own tree struct */ typedef struct bNodeTree { -- cgit v1.2.3 From c692351fdfe96ec396af9f9c1dfc92ae4e8ee5c6 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Mon, 25 Jul 2011 00:20:45 +0000 Subject: added option to invert axes for orbiting (part 1 of 2) --- source/blender/makesdna/DNA_userdef_types.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 6fbdb9842d6..12f8cd656a0 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -589,6 +589,17 @@ extern UserDef U; /* from blenkernel blender.c */ #define NDOF_SHOULD_PAN (1 << 3) #define NDOF_SHOULD_ZOOM (1 << 4) #define NDOF_SHOULD_ROTATE (1 << 5) +/* orbit navigation modes + only two options, so it's sort of a hyrbrid bool/enum + if ((U.ndof_flag & NDOF_ORBIT_MODE) == NDOF_OM_OBJECT)... */ +/* +#define NDOF_ORBIT_MODE (1 << 6) +#define NDOF_OM_TARGETCAMERA 0 +#define NDOF_OM_OBJECT NDOF_ORBIT_MODE +*/ +/* actually... users probably don't care about what the mode + is called, just that it feels right */ +#define NDOF_ORBIT_INVERT_AXES (1 << 6) #ifdef __cplusplus -- cgit v1.2.3 From 72f70874bb3477a0861735d612e0c15c931ff7e5 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Tue, 26 Jul 2011 02:35:46 +0000 Subject: experimental onscreen rotation guide --- source/blender/makesdna/DNA_view3d_types.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 27ffc6d856b..89b8bad2806 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -130,7 +130,11 @@ typedef struct RegionView3D { float twangle[3]; - float padf; + /* active rotation from NDOF or elsewhere */ + float rot_angle; + float rot_axis[3]; + + char pad2[4]; } RegionView3D; -- cgit v1.2.3 From 1f65b3b1a8f5ccc54a794ed0d6f8cf2d3e2c5a36 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 26 Jul 2011 06:10:05 +0000 Subject: BGE Animations: Adding a new choice for vertex deformation for armatures, which can be found in the Armature's Skeleton panel by the Deform options. Before only Blender's armature_deform_verts() was used. Now users can choose a vertex deformation function that is optimized for the BGE. At the moment it is mostly a copy of armature_deform_verts() with various chunks of code removed, and the BLI_math code was replaced with Eigen2. In my test scene, the new function offered about a 40% improvement over armature_deform_verts() (17~19ms rasterizer to 11~12ms). The only current limitation that I'm aware of if that B-Bone segments are not supported in the BGE version, and I will probably leave it out. I would like to also limit the BGE version to 4 weights to make things easier for a GPU version, but this may just make things slower (sorting weights to find the top 4). --- source/blender/makesdna/DNA_armature_types.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 808db1f4843..1675fdd3e90 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -96,7 +96,9 @@ typedef struct bArmature { void *sketch; /* sketch struct for etch-a-ton */ int flag; - int drawtype; + int drawtype; + int gevertdeformer; /* how vertex deformation is handled in the ge */ + int pad; short deformflag; short pathflag; @@ -140,6 +142,12 @@ typedef enum eArmature_Drawtype { ARM_WIRE } eArmature_Drawtype; +/* armature->gevertdeformer */ +typedef enum eArmature_VertDeformer { + ARM_VDEF_BLENDER, + ARM_VDEF_BGE_CPU +} eArmature_VertDeformer; + /* armature->deformflag */ typedef enum eArmature_DeformFlag { ARM_DEF_VGROUP = (1<<0), -- cgit v1.2.3 From 46cea372669f25b691fd90dc792a1fee33e36887 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Jul 2011 07:22:31 +0000 Subject: fix [#28066] Unchecking 'self project' messes up 'Snap to Vertex' this option is useful for all non-grid snapping modes (when in editmode) so make available in those cases too. --- source/blender/makesdna/DNA_scene_types.h | 2 +- 1 file changed, 1 insertion(+), 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 8203a4dd77c..2211f93a8ae 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1074,7 +1074,7 @@ typedef struct Scene { #define SCE_SNAP_ROTATE 2 #define SCE_SNAP_PEEL_OBJECT 4 #define SCE_SNAP_PROJECT 8 -#define SCE_SNAP_PROJECT_NO_SELF 16 +#define SCE_SNAP_NO_SELF 16 /* toolsettings->snap_target */ #define SCE_SNAP_TARGET_CLOSEST 0 #define SCE_SNAP_TARGET_CENTER 1 -- cgit v1.2.3 From 73a9ce7ec04bd1170b292c8f2c83a8c5c10a95ad Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Wed, 27 Jul 2011 07:42:53 +0000 Subject: svn merge -r38558:38752 https://svn.blender.org/svnroot/bf-blender/trunk/blender . --- source/blender/makesdna/DNA_node_types.h | 4 ++++ source/blender/makesdna/DNA_scene_types.h | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 03387c3a63a..efaf30b02f6 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -179,6 +179,10 @@ typedef struct bNodeLink { } bNodeLink; + +/* link->flag */ +#define NODE_LINKFLAG_HILITE 1 + /* the basis for a Node tree, all links and nodes reside internal here */ /* only re-usable node trees are in the library though, materials and textures allocate own tree struct */ typedef struct bNodeTree { diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 3c14dacf973..2211f93a8ae 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1074,7 +1074,7 @@ typedef struct Scene { #define SCE_SNAP_ROTATE 2 #define SCE_SNAP_PEEL_OBJECT 4 #define SCE_SNAP_PROJECT 8 -#define SCE_SNAP_PROJECT_NO_SELF 16 +#define SCE_SNAP_NO_SELF 16 /* toolsettings->snap_target */ #define SCE_SNAP_TARGET_CLOSEST 0 #define SCE_SNAP_TARGET_CENTER 1 @@ -1107,7 +1107,8 @@ typedef struct Scene { #define PROP_SHARP 3 #define PROP_LIN 4 #define PROP_CONST 5 -#define PROP_RANDOM 6 +#define PROP_RANDOM 6 +#define PROP_MODE_MAX 7 /* toolsettings->proportional */ #define PROP_EDIT_OFF 0 -- cgit v1.2.3 From 2dc826f083c2209aab83981a8d1dc39c621e0841 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 28 Jul 2011 11:16:10 +0000 Subject: New option for multires modifier: Subdivide UVs Enabled by default and also enabled for older filesm so there should be no regressions. In some cases it's useful to not use subdivided uvs for multires. --- source/blender/makesdna/DNA_modifier_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index d2d8e014015..3787675f339 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -624,6 +624,7 @@ typedef struct MultiresModifierData { typedef enum { eMultiresModifierFlag_ControlEdges = (1<<0), + eMultiresModifierFlag_PlainUv = (1<<1), } MultiresModifierFlag; typedef struct FluidsimModifierData { -- cgit v1.2.3 From bd6ca0570e089afc1d29b4f18b8bb6cc086545ea Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Thu, 28 Jul 2011 13:58:59 +0000 Subject: 3D Audio GSoC: Implemented basic audio animation. * AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation) * Animatable properties so far are: volume, pitch, panning * Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference. * Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1]. * Disabled animation of audio related ffmpeg output parameters. * Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here --- source/blender/makesdna/DNA_scene_types.h | 9 ++++++--- source/blender/makesdna/DNA_sequence_types.h | 7 ++++++- 2 files changed, 12 insertions(+), 4 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 937c33d6a65..b39f0a68854 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -149,6 +149,8 @@ typedef struct AudioData { int distance_model; short flag; short pad; + float volume; + float pad2; } AudioData; typedef struct SceneRenderLayer { @@ -1131,9 +1133,10 @@ typedef struct Scene { #define F_DUPLI 3 /* audio->flag */ -#define AUDIO_MUTE 1 -#define AUDIO_SYNC 2 -#define AUDIO_SCRUB 4 +#define AUDIO_MUTE (1<<0) +#define AUDIO_SYNC (1<<1) +#define AUDIO_SCRUB (1<<2) +#define AUDIO_VOLUME_ANIMATED (1<<3) #define FFMPEG_MULTIPLEX_AUDIO 1 /* deprecated, you can choose none as audiocodec now */ #define FFMPEG_AUTOSPLIT_OUTPUT 2 diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index b9bea7a89b0..aa04dc9ac13 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -155,7 +155,7 @@ typedef struct Sequence { void *scene_sound; float volume; - float level, pan; /* level in dB (0=full), pan -1..1 */ + float pitch, pan; /* pitch (-0.1..10), pan -2..2 */ int scenenr; /* for scene selection */ int multicam_source; /* for multicam source selection */ float strobe; @@ -284,6 +284,11 @@ typedef struct SpeedControlVars { #define SEQ_USE_PROXY_CUSTOM_FILE (1<<21) #define SEQ_USE_EFFECT_DEFAULT_FADE (1<<22) +// flags for whether those properties are animated or not +#define SEQ_AUDIO_VOLUME_ANIMATED (1<<24) +#define SEQ_AUDIO_PITCH_ANIMATED (1<<25) +#define SEQ_AUDIO_PAN_ANIMATED (1<<26) + #define SEQ_INVALID_EFFECT (1<<31) /* convenience define for all selection flags */ -- cgit v1.2.3 From 24def76ac899e106b4a04364504ba0cbc100d7f7 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Fri, 29 Jul 2011 07:58:03 +0000 Subject: svn merge -r38753:38813 https://svn.blender.org/svnroot/bf-blender/trunk/blender . --- source/blender/makesdna/DNA_modifier_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index d2d8e014015..3787675f339 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -624,6 +624,7 @@ typedef struct MultiresModifierData { typedef enum { eMultiresModifierFlag_ControlEdges = (1<<0), + eMultiresModifierFlag_PlainUv = (1<<1), } MultiresModifierFlag; typedef struct FluidsimModifierData { -- cgit v1.2.3 From 3e85ec432ef050563d75488eca3049b77497153d Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Mon, 1 Aug 2011 11:44:20 +0000 Subject: 3D Audio GSoC: Adds new speaker object type. Notes: * Needs some nice icons * Quickily review by Joshua Leung (5 mins) * Properties UI updated (with help of Thomans Dinges) * Speakers have their own theme color * No real audio functionality yet. * Minor bug regarding lamps/lattices fixed in interface_templates.c I personality tested: * Creation, Deletion, Duplication * Saving, Loading * Library linking (incl. make local) * Tracking * Dope Sheet, Outliner * Animation * Drawing (incl. Theme) --- source/blender/makesdna/DNA_ID.h | 1 + source/blender/makesdna/DNA_action_types.h | 3 +- source/blender/makesdna/DNA_object_types.h | 2 + source/blender/makesdna/DNA_speaker_types.h | 68 +++++++++++++++++++++++++++++ source/blender/makesdna/DNA_userdef_types.h | 2 +- source/blender/makesdna/intern/makesdna.c | 2 + 6 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 source/blender/makesdna/DNA_speaker_types.h (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 4cf9f47041b..8fd9f49cd0a 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -178,6 +178,7 @@ typedef struct PreviewImage { #define ID_SCRN MAKE_ID2('S', 'N') /* (depreciated?) */ #define ID_VF MAKE_ID2('V', 'F') /* VectorFont */ #define ID_TXT MAKE_ID2('T', 'X') /* Text */ +#define ID_SPK MAKE_ID2('S', 'K') /* Speaker */ #define ID_SO MAKE_ID2('S', 'O') /* Sound */ #define ID_GR MAKE_ID2('G', 'R') /* Group */ #define ID_ID MAKE_ID2('I', 'D') /* (internal use only) */ diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 3ead485e10a..88e67864456 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -552,6 +552,7 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_NOARM = (1<<18), ADS_FILTER_NONTREE = (1<<19), ADS_FILTER_NOTEX = (1<<20), + ADS_FILTER_NOSPK = (1<<21), /* NLA-specific filters */ ADS_FILTER_NLA_NOACT = (1<<25), /* if the AnimData block has no NLA data, don't include to just show Action-line */ @@ -561,7 +562,7 @@ typedef enum eDopeSheet_FilterFlag { ADS_FILTER_BY_FCU_NAME = (1<<27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */ /* combination filters (some only used at runtime) */ - ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM) + ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM|ADS_FILTER_NOSPK) } eDopeSheet_FilterFlag; /* DopeSheet general flags */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index dfc7d42793d..ffa82092ef1 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -306,6 +306,8 @@ typedef struct DupliObject { #define OB_LAMP 10 #define OB_CAMERA 11 +#define OB_SPEAKER 12 + // #define OB_WAVE 21 #define OB_LATTICE 22 diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h new file mode 100644 index 00000000000..50cb62c79e5 --- /dev/null +++ b/source/blender/makesdna/DNA_speaker_types.h @@ -0,0 +1,68 @@ +/* + * $Id$ + * + * ***** 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. + * + * Contributor(s): Jörg Müller. + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef DNA_SPEAKER_TYPES_H +#define DNA_SPEAKER_TYPES_H + +/** \file DNA_speaker_types.h + * \ingroup DNA + */ + +#include "DNA_ID.h" + +struct AnimData; +struct bSound; + +typedef struct Speaker { + ID id; + struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ + + struct bSound *sound; + + short flag; + short pad1[3]; + + // not animatable properties + float volume_max; + float volume_min; + float distance_max; + float distance_reference; + float attenuation; + float cone_angle_outer; + float cone_angle_inner; + float cone_volume_outer; + + // animatable properties + float volume; + float pitch; +} Speaker; + +/* **************** SPEAKER ********************* */ + +/* flag */ +#define SPK_DS_EXPAND (1<<0) +#define SPK_MUTED (1<<1) +#define SPK_RELATIVE (1<<2) + +#endif /* DNA_SPEAKER_TYPES_H */ + diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4757c112b09..4cf744a7878 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -197,7 +197,7 @@ typedef struct ThemeSpace { char grid[4]; char wire[4], select[4]; - char lamp[4]; + char lamp[4], speaker[4], pad2[4]; char active[4], group[4], group_active[4], transform[4]; char vertex[4], vertex_select[4]; char edge[4], edge_select[4]; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 80299d44a78..16d59356d25 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -132,6 +132,7 @@ const char *includefiles[] = { "DNA_anim_types.h", "DNA_boid_types.h", "DNA_smoke_types.h", + "DNA_speaker_types.h", // empty string to indicate end of includefiles "" @@ -1196,4 +1197,5 @@ int main(int argc, char ** argv) #include "DNA_anim_types.h" #include "DNA_boid_types.h" #include "DNA_smoke_types.h" +#include "DNA_speaker_types.h" /* end of list */ -- cgit v1.2.3 From 3af9651b903e05cea956f2358394fec3e0c81ef6 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Tue, 2 Aug 2011 22:50:06 +0000 Subject: ndof changes: turned off 3D mouse during transform, removed timing bug in image/uv, added option for zoom axis (up/down vs. forward/backward) --- source/blender/makesdna/DNA_userdef_types.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 12f8cd656a0..0bf812f1ec2 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -600,6 +600,9 @@ extern UserDef U; /* from blenkernel blender.c */ /* actually... users probably don't care about what the mode is called, just that it feels right */ #define NDOF_ORBIT_INVERT_AXES (1 << 6) +/* zoom is up/down if this flag is set (otherwise forward/backward) */ +#define NDOF_ZOOM_UPDOWN (1 << 7) +#define NDOF_INVERT_ZOOM (1 << 8) #ifdef __cplusplus -- cgit v1.2.3 From 2b446aa280af60aefd304aae904bc16b1b15f373 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 3 Aug 2011 01:22:31 +0000 Subject: Animation channels can now be renamed by Ctrl-Clicking on them, as in the Outliner Channels which can be renamed include: - Scenes, Objects, World, Material, Texture, etc. (i.e. "ID-blocks", or the dark and light blue channels) - Action Groups (green channels) - Action expanders (i.e. "CubeAction", "WorldAction", etc.) - Grease Pencil stuff Channels which CANNOT be renamed, as they mostly use hardcoded values or otherwise include: - Drivers expander - FCurves (they don't technically have a "name"; what is shown is just a user-friendly representation of their rna_paths) --- source/blender/makesdna/DNA_action_types.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 88e67864456..f40d41f59bd 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -519,6 +519,9 @@ typedef struct bDopeSheet { int filterflag; /* flags to use for filtering data */ int flag; /* standard flags */ + + int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */ + int pad; } bDopeSheet; -- cgit v1.2.3 From 6d7490632f13f9744c6b3e507c838a34f3481846 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Wed, 3 Aug 2011 09:25:40 +0000 Subject: 3D Audio GSoC: * Minor audaspace library improvements. * Considering location, velocity and orientation in AUD_SequencerReader and AUD_SequencerHandle. * Bugfix: Maximum and Minimum volume weren't used before in the software device. * Bugfix: Adding speaker objects via info space crashed. * Listener settings now get updated in the audio system. --- 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 7a5d417b59c..542aea00b00 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -806,6 +806,7 @@ typedef struct Scene { void *sound_scene; void *sound_scene_handle; void *sound_scrub_handle; + void *speaker_handles; void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */ -- cgit v1.2.3 From 9da70f74d37c7c0001a2705afc8fe5044f63bb0a Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 4 Aug 2011 10:05:14 +0000 Subject: UserPref/Node editor feature: Change the level of noodle curving. Some people like curved lines, other hate them. This commit will let the user change the level of curving. In UserPreferences=>Themes=>Node editor=>Noodle curving the level can be modified. Allowed range is 0-10 with the default on 5 The patch will default everything to the way blender works ATM. File subversion has been increased otherwise older 258 files got straight lines. The data is stored in the ThemeSpace.noodle_curving the bezierdrawing is done in the drawnode. Also tested the Line cut tool --- source/blender/makesdna/DNA_userdef_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 0bf812f1ec2..aa6da3aaeca 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -220,7 +220,7 @@ typedef struct ThemeSpace { char console_cursor[4]; char vertex_size, outline_width, facedot_size; - char bpad; + char noodle_curving; char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes char syntaxv[4], syntaxc[4]; -- cgit v1.2.3 From cdea64e32cbe1a8b9c9312b04cf15b0ac3daf685 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Aug 2011 11:27:13 +0000 Subject: remove append to cursor code, wasnt used and made some naive assumptions about object locations. --- source/blender/makesdna/DNA_space_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index ff9f2269f53..1549bd71748 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -703,7 +703,7 @@ enum FileSortTypeE { #define FILE_HIDE_DOT (1<<3) #define FILE_AUTOSELECT (1<<4) #define FILE_ACTIVELAY (1<<5) -#define FILE_ATCURSOR (1<<6) +/* #define FILE_ATCURSOR (1<<6) */ /* deprecated */ #define FILE_DIRSEL_ONLY (1<<7) #define FILE_FILTER (1<<8) #define FILE_BOOKMARKS (1<<9) -- cgit v1.2.3 From 900928f8bf47b8f1bbb1b2cd863d2d9649c940a0 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 4 Aug 2011 14:13:05 +0000 Subject: Bassam Feature Request: "Auto Clamped" handles can now be set per handle/key This used to be a weird per-curve setting which would happen to get applied/work correctly if handles were set to "auto", and was a source of constant confusion for both old and new animators. The main effect of this handle-type/option was really to just ensure that auto-handles stayed horizontal, instead of tilting as the keys were moved. This commit simply changes this from a per-curve to per keyframe/handle setting. --- source/blender/makesdna/DNA_anim_types.h | 2 ++ source/blender/makesdna/DNA_curve_types.h | 2 +- source/blender/makesdna/DNA_userdef_types.h | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 00a9786fc6f..374799ecf08 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -473,7 +473,9 @@ typedef enum eFCurve_Flags { FCURVE_PROTECTED = (1<<3), /* fcurve will not be evaluated for the next round */ FCURVE_MUTED = (1<<4), + /* fcurve uses 'auto-handles', which stay horizontal... */ + // DEPRECATED FCURVE_AUTO_HANDLES = (1<<5), /* skip evaluation, as RNA-path cannot be resolved (similar to muting, but cannot be set by user) */ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index b51612037fc..a38b33e6640 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -314,7 +314,7 @@ typedef enum eBezTriple_Handle { HD_AUTO, HD_VECT, HD_ALIGN, - HD_AUTO_ANIM /* not real handle type, but is just used as dummy item for anim code */ + HD_AUTO_ANIM /* auto-clamped handles for animation */ } eBezTriple_Handle; /* interpolation modes (used only for BezTriple->ipo) */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 85a64e02ddb..e5558c1738b 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -210,10 +210,13 @@ typedef struct ThemeSpace { char bone_solid[4], bone_pose[4]; char strip[4], strip_select[4]; char cframe[4]; + char nurb_uline[4], nurb_vline[4]; char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4], lastsel_point[4]; - char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4]; - char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4]; + + char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4]; + char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4]; + char ds_channel[4], ds_subchannel[4]; // dopesheet char console_output[4], console_input[4], console_info[4], console_error[4]; -- cgit v1.2.3 From e6e4c7ef8bd53b06c879302bbfd3d6a00c6c48af Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 5 Aug 2011 20:45:26 +0000 Subject: KEYMAP REFACTORING Diff Keymaps User edited keymaps now no longer override the builtin keymaps entirely, but rather save only the difference and reapply those changes. This means they can stay better in sync when the builtin keymaps change. The diff/patch algorithm is not perfect, but better for the common case where only a few items are changed rather than entire keymaps The main weakness is that if a builtin keymap item changes, user modification of that item may need to be redone in some cases. Keymap Editor The most noticeable change here is that there is no longer an "Edit" button for keymaps, all are editable immediately, but a "Restore" buttons shows for keymaps and items that have been edited. Shortcuts for addons can also be edited in the keymap editor. Addons Addons now should only modify the new addon keyconfiguration, the keymap items there will be added to the builtin ones for handling events, and not get lost when starting new files. Example code of register/unregister: km = wm.keyconfigs.addon.keymaps.new("3D View", space_type="VIEW_3D") km.keymap_items.new('my.operator', 'ESC', 'PRESS') km = wm.keyconfigs.addon.keymaps["3D View"] km.keymap_items.remove(km.keymap_items["my.operator"]) Compatibility The changes made are not forward compatible, i.e. if you save user preferences with newer versions, older versions will not have key configuration changes that were made. --- source/blender/makesdna/DNA_userdef_types.h | 3 ++- source/blender/makesdna/DNA_windowmanager_types.h | 24 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 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 aa6da3aaeca..a555a196060 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -341,7 +341,8 @@ typedef struct UserDef { struct ListBase themes; struct ListBase uifonts; struct ListBase uistyles; - struct ListBase keymaps; + struct ListBase keymaps; /* deprecated in favor of user_keymaps */ + struct ListBase user_keymaps; struct ListBase addons; char keyconfigstr[64]; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 31e59f18626..1f0ae28a00d 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -144,7 +144,9 @@ typedef struct wmWindowManager { ListBase drags; /* active dragged items */ ListBase keyconfigs; /* known key configurations */ - struct wmKeyConfig *defaultconf; /* default configuration, not saved */ + struct wmKeyConfig *defaultconf; /* default configuration */ + struct wmKeyConfig *addonconf; /* addon configuration */ + struct wmKeyConfig *userconf; /* user configuration */ ListBase timers; /* active timers */ struct wmTimer *autosavetimer; /* timer for auto save */ @@ -239,15 +241,26 @@ typedef struct wmKeyMapItem { struct PointerRNA *ptr; /* rna pointer to access properties */ } wmKeyMapItem; +/* used instead of wmKeyMapItem for diff keymaps */ +typedef struct wmKeyMapDiffItem { + struct wmKeyMapDiffItem *next, *prev; + + wmKeyMapItem *remove_item; + wmKeyMapItem *add_item; +} wmKeyMapDiffItem; + /* wmKeyMapItem.flag */ -#define KMI_INACTIVE 1 -#define KMI_EXPANDED 2 +#define KMI_INACTIVE 1 +#define KMI_EXPANDED 2 +#define KMI_USER_MODIFIED 4 +#define KMI_UPDATE 8 /* stored in WM, the actively used keymaps */ typedef struct wmKeyMap { struct wmKeyMap *next, *prev; ListBase items; + ListBase diff_items; char idname[64]; /* global editor keymaps, or for more per space/region */ short spaceid; /* same IDs as in DNA_space_types.h */ @@ -263,9 +276,12 @@ typedef struct wmKeyMap { /* wmKeyMap.flag */ #define KEYMAP_MODAL 1 /* modal map, not using operatornames */ -#define KEYMAP_USER 2 /* user created keymap */ +#define KEYMAP_USER 2 /* user keymap */ #define KEYMAP_EXPANDED 4 #define KEYMAP_CHILDREN_EXPANDED 8 +#define KEYMAP_DIFF 16 /* diff keymap for user preferences */ +#define KEYMAP_USER_MODIFIED 32 /* keymap has user modifications */ +#define KEYMAP_UPDATE 64 typedef struct wmKeyConfig { struct wmKeyConfig *next, *prev; -- cgit v1.2.3 From 6c821f4078414c81128ebf0d35187054df238371 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Sat, 6 Aug 2011 23:13:36 +0000 Subject: stricter NDOF guards for Windows (forgot in earlier commit) --- source/blender/makesdna/DNA_userdef_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index a555a196060..556f554eb98 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -603,7 +603,7 @@ extern UserDef U; /* from blenkernel blender.c */ #define NDOF_ORBIT_INVERT_AXES (1 << 6) /* zoom is up/down if this flag is set (otherwise forward/backward) */ #define NDOF_ZOOM_UPDOWN (1 << 7) -#define NDOF_INVERT_ZOOM (1 << 8) +#define NDOF_ZOOM_INVERT (1 << 8) #ifdef __cplusplus -- cgit v1.2.3 From 2d884fc035d403d43c7a18e3e61cd56ccdfbec2b Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Sun, 7 Aug 2011 11:54:58 +0000 Subject: 3D Audio GSoC: * Pepper depends on ffmpeg 0.7.1 or higher now, windows and mac build systems set to ffmpeg-0.8 * Fixed orientation retrieval in OpenAL device code. * Added stopAll() method to AUD_IDevice (also for Python) and call it on BGE exit * Changed BGE to use audaspace via native C++ instead over the C API. * Made AUD_SequencerFactory and AUD_SequencerEntry thread safe. * Changed sound caching into a flag which fixes problems on file loading, especially with undo. * Removed unused parameter from sound_mute_scene_sound * Fixed bug: changing FPS didn't update the sequencer sound positions. * Fixed bug: Properties of sequencer strips weren't set correctly. * Minor warning fixes. --- source/blender/makesdna/DNA_sound_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 3e5f82a8052..56ad0e1ff84 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -106,7 +106,8 @@ typedef enum eSound_Type { #define SND_DRAWFRAMES 1 #define SND_CFRA_NUM 2 -#define SOUND_FLAGS_3D (1 << 3) +#define SOUND_FLAGS_3D (1 << 3) /* deprecated! used for sound actuator loading */ +#define SOUND_FLAGS_CACHING (1 << 4) /* to DNA_sound_types.h*/ -- cgit v1.2.3 From 022e815fbd6d81f9b1baa177cce1abf2f42bcb21 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 7 Aug 2011 12:27:20 +0000 Subject: Sound clip NLA Strips for Nexyon These are basically just for specifying when a speaker should fire off it's soundclip, and as such, many NLA operations are irrelevant for it. They can only be specified on object-level for speaker objects. I've still got some UI tweaks I'll need to work on in order for these to be able to be added even when the speaker doesn't have any NLA tracks yet. (EDIT: while typing this, I had an idea for how to do this, but that'll be for next commit). In the mean time, you'll need to add a single keyframe for the object, snowflake that action and delete the NLA strip before you can start editing. --- source/blender/makesdna/DNA_anim_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 374799ecf08..5a031e04fe4 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -651,7 +651,10 @@ typedef enum eNlaStrip_Type { /* 'transition' - blends between the adjacent strips */ NLASTRIP_TYPE_TRANSITION, /* 'meta' - a strip which acts as a container for a few others */ - NLASTRIP_TYPE_META + NLASTRIP_TYPE_META, + + /* 'emit sound' - a strip which is used for timing when speaker emits sounds */ + NLASTRIP_TYPE_SOUND } eNlaStrip_Type; /* NLA Tracks ------------------------------------- */ -- cgit v1.2.3 From 13249b925eda7752b65a36d8270a3af3bdc02981 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Tue, 9 Aug 2011 08:38:14 +0000 Subject: 3D Audio GSoC: Speaker objects fully functional! Minor changes: * Fixed three memory bugs found via valgrind. * Fixed bug with jack transport crashing after file loading. * Sound NLA Strips now start at CFRA instead of 0. --- source/blender/makesdna/DNA_anim_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 5a031e04fe4..c0030cd0e5e 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -585,6 +585,8 @@ typedef struct NlaStrip { short type; /* type of NLA strip */ + void *speaker_handle; /* handle for speaker objects */ + int flag; /* settings */ int pad2; } NlaStrip; -- cgit v1.2.3 From a672ab5e737202bede956a88357a96cf2728df15 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Tue, 9 Aug 2011 14:10:32 +0000 Subject: 3D Audio GSoC: Improved waveform drawing in the sequencer. * Drawing the waveform of a sequencer strip is now independent from whether the sound is cached or not. * Improved drawing of the waveform in the sequencer (especially speed!). * Making it possible to vertically zoom more in the sequencer to better see the waveform for lipsync. * Fixed a bug which crashed blender on loading a sound file via ffmpeg. --- source/blender/makesdna/DNA_sequence_types.h | 1 + source/blender/makesdna/DNA_sound_types.h | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index aa04dc9ac13..359ef8449e9 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -288,6 +288,7 @@ typedef struct SpeedControlVars { #define SEQ_AUDIO_VOLUME_ANIMATED (1<<24) #define SEQ_AUDIO_PITCH_ANIMATED (1<<25) #define SEQ_AUDIO_PAN_ANIMATED (1<<26) +#define SEQ_AUDIO_DRAW_WAVEFORM (1<<27) #define SEQ_INVALID_EFFECT (1<<31) diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 56ad0e1ff84..d7546e84bbf 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -84,6 +84,11 @@ typedef struct bSound { */ void *cache; + /** + * Waveform display data. + */ + void *waveform; + /** * The audaspace handle that should actually be played back. * Should be cache if cache != NULL; otherwise it's handle -- cgit v1.2.3 From fee7337249342c3d5a332358883af9afe961f38d Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Thu, 11 Aug 2011 11:41:24 +0000 Subject: 3D Audio GSoC: Adding a mono flag to mixdown non-mono sounds for 3D audio. * Added mono sound loading. * Bugfix: AUD_COMPARE_SPECS usage was wrong. * Bugfix: JOS resampler = instead of ==. * Bugfix: Change of a sound should apply settings in AUD_SequencerHandle. * Bugfix: Memory leak when canceling open sound operator. --- source/blender/makesdna/DNA_sound_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index d7546e84bbf..4f727b3586b 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -113,6 +113,7 @@ typedef enum eSound_Type { #define SOUND_FLAGS_3D (1 << 3) /* deprecated! used for sound actuator loading */ #define SOUND_FLAGS_CACHING (1 << 4) +#define SOUND_FLAGS_MONO (1 << 5) /* to DNA_sound_types.h*/ -- cgit v1.2.3 From db72192c22787fdf99bc7b20c6864b37b8e871f4 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 12 Aug 2011 07:20:49 +0000 Subject: Bye bye vile relics of extinct version control systems, Causing a flurry of refresh file prompts post-commit, Confusing local diffs and causing merge conflicts, Stating the obvious; redundant and useless... We shall not miss thou, blasted expand $keywords$ --- source/blender/makesdna/DNA_action_types.h | 4 +--- source/blender/makesdna/DNA_anim_types.h | 4 +--- source/blender/makesdna/DNA_armature_types.h | 2 -- source/blender/makesdna/DNA_constraint_types.h | 2 -- source/blender/makesdna/DNA_gpencil_types.h | 2 -- source/blender/makesdna/DNA_ipo_types.h | 2 -- source/blender/makesdna/DNA_nla_types.h | 2 -- 7 files changed, 2 insertions(+), 16 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index f40d41f59bd..a820e59779f 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -1,6 +1,4 @@ -/* - * $Id$ - * +/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index c0030cd0e5e..e1dfd652900 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -586,7 +584,7 @@ typedef struct NlaStrip { short type; /* type of NLA strip */ void *speaker_handle; /* handle for speaker objects */ - + int flag; /* settings */ int pad2; } NlaStrip; diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 1675fdd3e90..442fc3ddcce 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index c2c0c6f1611..1be2c811a1b 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 6eb5f64ffc3..b259d592864 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 5dba9154a3a..43a4b99bc33 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h index c64dda2afd0..b92cf5c67e4 100644 --- a/source/blender/makesdna/DNA_nla_types.h +++ b/source/blender/makesdna/DNA_nla_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or -- cgit v1.2.3 From c5ef9b62c1f7f407c42bb48fe3362fa6cf3cf101 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Fri, 12 Aug 2011 20:53:29 +0000 Subject: BGE Animations: Adding an option to let users choose whether or not to lock animation updates to the framerate. If this option is enabled, animations are only updated at the same speed as the animation framerate. This can give a significant speed up in performance, but at the cost of smoothness in animations. I'm defaulting this behavior to off for now, which is the behavior seen in trunk. --- source/blender/makesdna/DNA_scene_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 542aea00b00..be2a78ac774 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -479,6 +479,7 @@ typedef struct GameData { #define WOPHY_BULLET 5 /* GameData.flag */ +#define GAME_RESTRICT_ANIM_UPDATES (1 << 0) #define GAME_ENABLE_ALL_FRAMES (1 << 1) #define GAME_SHOW_DEBUG_PROPS (1 << 2) #define GAME_SHOW_FRAMERATE (1 << 3) @@ -494,6 +495,7 @@ typedef struct GameData { #define GAME_ENABLE_ANIMATION_RECORD (1 << 13) #define GAME_SHOW_MOUSE (1 << 14) #define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15) +/* Note: GameData.flag is a short (max 16 flags). To add more flags, GameData.flag needs to be an int */ /* GameData.matmode */ #define GAME_MAT_TEXFACE 0 -- cgit v1.2.3 From 0b23d378fbac8e76d4885c3485a4dbf158aab136 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Aug 2011 06:43:58 +0000 Subject: fix [#28225] Solidify Modifier creates wrong results when vertex group is attached infact this is not really a bug, irrespective zero vertex group weights gave overlapping geometry which isn't useful, add an option to set the thickness factor for zero weighted verts. --- source/blender/makesdna/DNA_modifier_types.h | 4 ++-- 1 file changed, 2 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 3787675f339..053f3b38168 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -712,16 +712,16 @@ typedef struct ShapeKeyModifierData { typedef struct SolidifyModifierData { ModifierData modifier; - char defgrp_name[32]; /* name of vertex group to use */ + char defgrp_name[32]; /* name of vertex group to use */ float offset; /* new surface offset level*/ float offset_fac; /* midpoint of the offset */ + float offset_fac_vg; /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */ float crease_inner; float crease_outer; float crease_rim; int flag; short mat_ofs; short mat_ofs_rim; - int pad; } SolidifyModifierData; #define MOD_SOLIDIFY_RIM (1<<0) -- cgit v1.2.3 From d4dec1c3bcc8fa85e8f4cf3372efe077648a67bf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 20 Aug 2011 14:23:43 +0000 Subject: use ghash for DNA_struct_find_nr(), gives ~18% speedup on loading sintel lite, will also speedup undo. note: only works with CMake, wasn't able to get this working with scons, complains about same file being built in different environments. --- source/blender/makesdna/DNA_sdna_types.h | 5 +++- source/blender/makesdna/intern/CMakeLists.txt | 26 +++++++++++++++++ source/blender/makesdna/intern/SConscript | 1 + source/blender/makesdna/intern/dna_genfile.c | 42 +++++++++++++++++++++------ 4 files changed, 64 insertions(+), 10 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index e5f924b5fa6..829d1eee03b 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -54,7 +54,10 @@ typedef struct SDNA { (sp[2], sp[3]), (sp[4], sp[5]), .. are the member type and name numbers respectively */ - + + struct GHash *structs_map; /* ghash for faster lookups, + requires WITH_DNA_GHASH to be used for now */ + /* wrong place for this really, its a simple * cache for findstruct_nr. */ diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 429db63b526..5edebfe3903 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -27,12 +27,17 @@ # message(STATUS "Configuring makesdna") +# add_definitions(-DWITH_DNA_GHASH) + blender_include_dirs( ../../../../intern/guardedalloc ../../blenloader + ../../blenlib .. ) + +# ----------------------------------------------------------------------------- # Build makesdna executable set(SRC makesdna.c @@ -56,6 +61,8 @@ add_custom_command( DEPENDS makesdna ) + +# ----------------------------------------------------------------------------- # Build bf_dna library set(INC @@ -72,3 +79,22 @@ set(SRC ) blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}") + + +# ----------------------------------------------------------------------------- +# Build bf_dna_blenlib library +set(INC + +) + +set(INC_SYS + +) + +set(SRC + ../../blenlib/intern/BLI_mempool.c + ../../blenlib/intern/listbase.c + ../../blenlib/intern/BLI_ghash.c +) + +blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index e51ee53e078..8185676cbfc 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -67,5 +67,6 @@ else: else: dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET") +# TODO, get WITH_DNA_GHASH working, see CMake's 'WITH_DNA_GHASH' obj = ['intern/dna.c', 'intern/dna_genfile.c'] Return ('obj') diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 4e9b023b326..ebcfce84e37 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -42,6 +42,10 @@ #include "MEM_guardedalloc.h" // for MEM_freeN MEM_mallocN MEM_callocN +#ifdef WITH_DNA_GHASH +# include "BLI_ghash.h" +#endif + #include "DNA_genfile.h" #include "DNA_sdna_types.h" // for SDNA ;-) @@ -197,7 +201,11 @@ void DNA_sdna_free(SDNA *sdna) MEM_freeN((void *)sdna->names); MEM_freeN(sdna->types); MEM_freeN(sdna->structs); - + +#ifdef WITH_DNA_GHASH + BLI_ghash_free(sdna->structs_map, NULL, NULL); +#endif + MEM_freeN(sdna); } @@ -275,24 +283,30 @@ static short *findstruct_name(SDNA *sdna, const char *str) int DNA_struct_find_nr(SDNA *sdna, const char *str) { short *sp= NULL; - int a; if(sdna->lastfindnr_structs) { sp= sdna->structs[sdna->lastfind]; if(strcmp( sdna->types[ sp[0] ], str )==0) return sdna->lastfind; } - for(a=0; anr_structs; a++) { +#ifdef WITH_DNA_GHASH + return (intptr_t)BLI_ghash_lookup(sdna->structs_map, str) - 1; +#else + { + int a; - sp= sdna->structs[a]; - - if(strcmp( sdna->types[ sp[0] ], str )==0) { - sdna->lastfind= a; - return a; + for(a=0; anr_structs; a++) { + + sp= sdna->structs[a]; + + if(strcmp( sdna->types[ sp[0] ], str )==0) { + sdna->lastfind= a; + return a; + } } } - return -1; +#endif } /* ************************* END DIV ********************** */ @@ -481,6 +495,16 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap) sp[10]= 9; } } + +#ifdef WITH_DNA_GHASH + /* create a ghash lookup to speed up */ + sdna->structs_map= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "init_structDNA gh"); + + for(nr = 0; nr < sdna->nr_structs; nr++) { + sp= sdna->structs[nr]; + BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], (void *)(nr + 1)); + } +#endif } } -- cgit v1.2.3 From 6a374d266d8213629f74a9f4c9a4984ddf59ef4c Mon Sep 17 00:00:00 2001 From: Morten Mikkelsen Date: Mon, 22 Aug 2011 19:57:54 +0000 Subject: glsl and render support for derivative maps --- source/blender/makesdna/DNA_texture_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index e81a9979c12..6e850a07d94 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -342,6 +342,7 @@ typedef struct TexMapping { #define TEX_NORMALMAP 2048 #define TEX_GAUSS_MIP 4096 #define TEX_FILTER_MIN 8192 +#define TEX_DERIVATIVEMAP 16384 /* texfilter */ // TXF_BOX -> blender's old texture filtering method -- cgit v1.2.3 From f9bffb3ca0ca88a7e774b0ee0da1d384707f0495 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 24 Aug 2011 00:44:58 +0000 Subject: fix [#28340] Can't set image depth, quality from image save --- source/blender/makesdna/DNA_space_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 1549bd71748..67899db5538 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -267,7 +267,7 @@ typedef struct SpaceImage { float centx, centy; /* storage for offset while render drawing */ short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */ - short imtypenr; + short pad; short lock; short pin; char dt_uv; /* UV draw type */ -- cgit v1.2.3 From 7fc26e0123e700113f340068a964c1a12133b7e1 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Wed, 24 Aug 2011 20:28:54 +0000 Subject: Committing patch #25675 "Make "Cast Buffer Shadows" option work in viewport and BGE" by me. Description from the tracker: "It's really handy to be able to prevent an object/material from casting a shadow. So, I made use of the Cast Buffer Shadows option in the material settings, and made it work in the viewport and the BGE." --- source/blender/makesdna/DNA_view3d_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 89b8bad2806..3c8d20a6f16 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -247,6 +247,7 @@ typedef struct View3D { #define V3D_SOLID_TEX 8 #define V3D_DISPGP 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 */ /* View3D->around */ #define V3D_CENTER 0 -- cgit v1.2.3 From a244a787de9d3353efdd4dd42794e14b830b3ddb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Aug 2011 16:42:42 +0000 Subject: sanity checks on operator exec/modal/invoke return values. --- source/blender/makesdna/DNA_windowmanager_types.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 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 1f0ae28a00d..47ebf111eba 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -320,14 +320,20 @@ typedef struct wmOperator { } wmOperator; -/* operator type exec(), invoke() modal(), return values */ -#define OPERATOR_RUNNING_MODAL 1 -#define OPERATOR_CANCELLED 2 -#define OPERATOR_FINISHED 4 + +/* operator type return flags: exec(), invoke() modal(), return values */ +#define OPERATOR_RUNNING_MODAL (1<<0) +#define OPERATOR_CANCELLED (1<<1) +#define OPERATOR_FINISHED (1<<2) /* add this flag if the event should pass through */ -#define OPERATOR_PASS_THROUGH 8 +#define OPERATOR_PASS_THROUGH (1<<3) /* in case operator got executed outside WM code... like via fileselect */ -#define OPERATOR_HANDLED 16 +#define OPERATOR_HANDLED (1<<4) + +#define OPERATOR_FLAGS_ALL ((1<<5)-1) + +/* sanity checks for debug mode only */ +#define OPERATOR_RETVAL_CHECK(ret) BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret) /* wmOperator flag */ #define OP_GRAB_POINTER 1 -- cgit v1.2.3 From 70c955c48437b6387285e963bf8c6f7294700ca2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 27 Aug 2011 02:59:43 +0000 Subject: remove deprecated & unused sequencer transform vars --- source/blender/makesdna/DNA_sequence_types.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 3e7654bcf47..0dd0b9790ab 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -209,14 +209,9 @@ typedef struct GlowVars { typedef struct TransformVars { float ScalexIni; float ScaleyIni; - float ScalexFin; /* deprecated - old transform strip */ - float ScaleyFin; /* deprecated - old transform strip */ float xIni; - float xFin; /* deprecated - old transform strip */ float yIni; - float yFin; /* deprecated - old transform strip */ float rotIni; - float rotFin; /* deprecated - old transform strip */ int percent; int interpolation; int uniform_scale; /* preserve aspect/ratio when scaling */ -- cgit v1.2.3 From fa2ba5fbf5848e4d61b697c624af9b9e9456eb20 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 28 Aug 2011 05:06:30 +0000 Subject: - use static vars and functions where possible. - use NULL rather than 0 when used as pointers. --- source/blender/makesdna/intern/makesdna.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 80299d44a78..3e5e7bbdc0e 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -137,18 +137,18 @@ const char *includefiles[] = { "" }; -int maxdata= 500000, maxnr= 50000; -int nr_names=0; -int nr_types=0; -int nr_structs=0; -char **names, *namedata; /* at address names[a] is string a */ -char **types, *typedata; /* at address types[a] is string a */ -short *typelens; /* at typelens[a] is de length of type a */ -short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits) */ -short **structs, *structdata; /* at sp= structs[a] is the first address of a struct definition - sp[0] is type number - sp[1] is amount of elements - sp[2] sp[3] is typenr, namenr (etc) */ +static int maxdata= 500000, maxnr= 50000; +static int nr_names=0; +static int nr_types=0; +static int nr_structs=0; +static char **names, *namedata; /* at address names[a] is string a */ +static char **types, *typedata; /* at address types[a] is string a */ +static short *typelens; /* at typelens[a] is de length of type a */ +static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */ +static short **structs, *structdata;/* at sp= structs[a] is the first address of a struct definition + sp[0] is type number + sp[1] is amount of elements + sp[2] sp[3] is typenr, namenr (etc) */ /** * Variable to control debug output of makesdna. * debugSDNA: @@ -157,8 +157,8 @@ short **structs, *structdata; /* at sp= structs[a] is the first address of a str * - 2 = full trace, tell which names and types were found * - 4 = full trace, plus all gritty details */ -int debugSDNA = 0; -int additional_slen_offset; +static int debugSDNA = 0; +static int additional_slen_offset; /* ************************************************************************** */ /* Functions */ @@ -889,7 +889,7 @@ void printStructLenghts(void) } -int make_structDNA(char *baseDirectory, FILE *file) +static int make_structDNA(char *baseDirectory, FILE *file) { int len, i; short *sp; -- cgit v1.2.3 From c07bd1439a3f026b8603c52662c3e7ccc364321a Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Sun, 28 Aug 2011 14:46:03 +0000 Subject: == 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. --- source/blender/makesdna/DNA_sequence_types.h | 35 ++++++++++++++++++++++------ source/blender/makesdna/DNA_space_types.h | 1 + 2 files changed, 29 insertions(+), 7 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 0dd0b9790ab..cd3afbf3553 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -71,12 +71,19 @@ typedef struct StripColorBalance { } StripColorBalance; typedef struct StripProxy { - char dir[160]; - char file[80]; - struct anim *anim; - short size; - short quality; - int pad; + char dir[160]; // custom directory for index and proxy files + // (defaults to BL_proxy) + + char file[80]; // custom file + struct anim *anim; // custom proxy anim file + + short tc; // time code in use + + short quality; // proxy build quality + short build_size_flags;// size flags (see below) of all proxies + // to build + short build_tc_flags; // time code flags (see below) of all tc indices + // to build } StripProxy; typedef struct Strip { @@ -128,11 +135,12 @@ typedef struct Sequence { int startstill, endstill; int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */ int startdisp, enddisp; /*starting and ending points in the sequence*/ - float sat, pad; + float sat; float mul, handsize; /* is sfra needed anymore? - it looks like its only used in one place */ int sfra; /* starting frame according to the timeline of the scene. */ int anim_preseek; + int streamindex; /* streamindex for movie or sound files with several streams */ Strip *strip; @@ -283,6 +291,19 @@ typedef struct SpeedControlVars { #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2 #define SEQ_COLOR_BALANCE_INVERSE_LIFT 4 +/* !!! has to be same as IMB_imbuf.h IMB_PROXY_... and IMB_TC_... */ + +#define SEQ_PROXY_IMAGE_SIZE_25 1 +#define SEQ_PROXY_IMAGE_SIZE_50 2 +#define SEQ_PROXY_IMAGE_SIZE_75 4 +#define SEQ_PROXY_IMAGE_SIZE_100 8 + +#define SEQ_PROXY_TC_NONE 0 +#define SEQ_PROXY_TC_RECORD_RUN 1 +#define SEQ_PROXY_TC_FREE_RUN 2 +#define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN 4 +#define SEQ_PROXY_TC_ALL 7 + /* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */ #define SEQ_IMAGE 0 #define SEQ_META 1 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 67899db5538..66b10bcbf21 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -930,6 +930,7 @@ enum { #define SEQ_PROXY_RENDER_SIZE_25 25 #define SEQ_PROXY_RENDER_SIZE_50 50 #define SEQ_PROXY_RENDER_SIZE_75 75 +#define SEQ_PROXY_RENDER_SIZE_100 99 #define SEQ_PROXY_RENDER_SIZE_FULL 100 -- cgit v1.2.3 From 5bac37f6d4d2e8d584ae0ec6bafd2808c47fbb25 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Mon, 29 Aug 2011 15:01:55 +0000 Subject: * Reverting Titlecard commit r37537 * Reverting update recent files commit r37155 * Turning reference counts into unsigned ints * Minor things --- source/blender/makesdna/DNA_sequence_types.h | 11 +---------- source/blender/makesdna/DNA_userdef_types.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 359ef8449e9..93cbb643334 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -227,14 +227,6 @@ typedef struct SolidColorVars { float pad; } SolidColorVars; -typedef struct TitleCardVars { - char titlestr[64]; - char subtitle[128]; - - float fgcol[3]; - float bgcol[3]; -} TitleCardVars; - typedef struct SpeedControlVars { float * frameMap; float globalSpeed; @@ -328,8 +320,7 @@ typedef struct SpeedControlVars { #define SEQ_SPEED 29 #define SEQ_MULTICAM 30 #define SEQ_ADJUSTMENT 31 -#define SEQ_TITLECARD 40 -#define SEQ_EFFECT_MAX 40 +#define SEQ_EFFECT_MAX 31 #define STRIPELEM_FAILED 0 #define STRIPELEM_OK 1 diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index e211a7c33c1..43dc532d4f6 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -442,7 +442,6 @@ extern UserDef U; /* from blenkernel blender.c */ #define USER_NONEGFRAMES (1 << 24) #define USER_TXT_TABSTOSPACES_DISABLE (1 << 25) #define USER_TOOLTIPS_PYTHON (1 << 26) -#define USER_NO_RECENTLOAD_UPDATE (1 << 27) /* helper macro for checking frame clamping */ #define FRAMENUMBER_MIN_CLAMP(cfra) \ -- cgit v1.2.3 From 5b5e600db6f529ad7e1af9d4bb3a193be2265342 Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Tue, 30 Aug 2011 07:57:55 +0000 Subject: Last bunch of minor fixes before merge. * Use NULL in AUD_Reference.h * Use SETLOOPER in sound.c * Move flags to the end of Speaker struct. --- source/blender/makesdna/DNA_speaker_types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h index 50cb62c79e5..fecc65885c5 100644 --- a/source/blender/makesdna/DNA_speaker_types.h +++ b/source/blender/makesdna/DNA_speaker_types.h @@ -39,9 +39,6 @@ typedef struct Speaker { struct bSound *sound; - short flag; - short pad1[3]; - // not animatable properties float volume_max; float volume_min; @@ -55,6 +52,10 @@ typedef struct Speaker { // animatable properties float volume; float pitch; + + // flag + short flag; + short pad1[3]; } Speaker; /* **************** SPEAKER ********************* */ -- cgit v1.2.3 From 8e0fe8bff72e2dc2926618577eaffdd3417a8304 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Mon, 5 Sep 2011 21:01:50 +0000 Subject: Merged the particles-2010 branch with node improvements into trunk. This branch adds mostly organizational improvements to the node system by renaming the node folders and files. A couple of internal features have been added too. Detailed information can be found on the wiki page: http://wiki.blender.org/index.php/User:Phonybone/Particles2010 --- source/blender/makesdna/DNA_node_types.h | 171 +++++++++++++++++++++---------- 1 file changed, 116 insertions(+), 55 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index efaf30b02f6..3a51a6a56a4 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -38,26 +38,29 @@ #include "DNA_vec_types.h" #include "DNA_listBase.h" +struct ID; struct ListBase; struct SpaceNode; struct bNodeLink; struct bNodeType; -struct bNodeGroup; +struct bNodeTreeExec; struct AnimData; struct bGPdata; struct uiBlock; #define NODE_MAXSTR 32 - typedef struct bNodeStack { float vec[4]; - float min, max; /* min/max for values (UI writes it, execute might use it) */ + float min, max; void *data; short hasinput; /* when input has link, tagged before executing */ short hasoutput; /* when output is linked, tagged before executing */ short datatype; /* type of data pointer */ short sockettype; /* type of socket stack comes from, to remap linking different sockets */ + short is_copy; /* data is a copy of external data (no freeing) */ + short external; /* data is used by external nodes (no freeing) */ + short pad[2]; } bNodeStack; /* ns->datatype, shadetree only */ @@ -68,50 +71,58 @@ typedef struct bNodeSocket { struct bNodeSocket *next, *prev, *new_sock; char name[32]; - bNodeStack ns; /* custom data for inputs, only UI writes in this */ + + void *storage; /* custom storage */ short type, flag; short limit; /* max. number of links */ - - /* stack data info (only during execution!) */ - short stack_type; /* type of stack reference */ - /* XXX only one of stack_ptr or stack_index is used (depending on stack_type). - * could store the index in the pointer with SET_INT_IN_POINTER (a bit ugly). - * (union won't work here, not supported by DNA) - */ - struct bNodeStack *stack_ptr; /* constant input value */ - short stack_index; /* local stack index or external input number */ short pad1; float locx, locy; - /* internal data to retrieve relations and groups */ + void *default_value; /* default input value used for unlinked sockets */ + + /* execution data */ + short stack_index; /* local stack index */ + short pad2; + int pad3; + void *cache; /* cached data from execution */ + /* internal data to retrieve relations and groups */ int own_index; /* group socket identifiers, to find matching pairs after reading files */ - struct bNodeSocket *groupsock; int to_index; /* XXX deprecated, only used for restoring old group node links */ - int pad2; + struct bNodeSocket *groupsock; - struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */ + struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */ + + /* DEPRECATED only needed for do_versions */ + bNodeStack ns; /* custom data for inputs, only UI writes in this */ } bNodeSocket; /* sock->type */ -#define SOCK_VALUE 0 -#define SOCK_VECTOR 1 -#define SOCK_RGBA 2 +#define SOCK_FLOAT 0 +#define SOCK_VECTOR 1 +#define SOCK_RGBA 2 +#define SOCK_INT 3 +#define SOCK_BOOLEAN 4 +#define SOCK_MESH 5 +#define NUM_SOCKET_TYPES 6 /* must be last! */ + +/* socket side (input/output) */ +#define SOCK_IN 1 +#define SOCK_OUT 2 /* sock->flag, first bit is select */ - /* hidden is user defined, to hide unused */ + /* hidden is user defined, to hide unused */ #define SOCK_HIDDEN 2 - /* only used now for groups... */ -#define SOCK_IN_USE 4 - /* unavailable is for dynamic sockets */ + /* only used now for groups... */ +#define SOCK_IN_USE 4 /* XXX deprecated */ + /* unavailable is for dynamic sockets */ #define SOCK_UNAVAIL 8 - -/* sock->stack_type */ -#define SOCK_STACK_LOCAL 1 /* part of the local tree stack */ -#define SOCK_STACK_EXTERN 2 /* use input stack pointer */ -#define SOCK_STACK_CONST 3 /* use pointer to constant input value */ + /* dynamic socket (can be modified by user) */ +#define SOCK_DYNAMIC 16 + /* group socket should not be exposed */ +#define SOCK_INTERNAL 32 typedef struct bNodePreview { unsigned char *rect; @@ -119,7 +130,6 @@ typedef struct bNodePreview { int pad; } bNodePreview; - /* limit data in bNode to what we want to see saved? */ typedef struct bNode { struct bNode *next, *prev, *new_node; @@ -132,11 +142,14 @@ typedef struct bNode { short nr; /* number of this node in list, used for UI exec events */ ListBase inputs, outputs; + struct bNode *parent; /* parent node */ struct ID *id; /* optional link to libdata */ void *storage; /* custom data, must be struct, for storage in file */ float locx, locy; /* root offset for drawing */ - float width, miniwidth; + float width, height; /* node custom width and height */ + float miniwidth; /* node width if hidden */ + int pad; char label[32]; /* custom user-defined label */ short custom1, custom2; /* to be abused for buttons */ float custom3, custom4; @@ -151,7 +164,6 @@ typedef struct bNode { struct uiBlock *block; /* runtime during drawing */ struct bNodeType *typeinfo; /* lookup of callbacks and defaults */ - } bNode; /* node->flag */ @@ -163,11 +175,17 @@ typedef struct bNode { #define NODE_ACTIVE_ID 32 #define NODE_DO_OUTPUT 64 #define NODE_GROUP_EDIT 128 - /* free test flag, undefined */ + /* free test flag, undefined */ #define NODE_TEST 256 - /* composite: don't do node but pass on buffer(s) */ + /* composite: don't do node but pass on buffer(s) */ #define NODE_MUTED 512 -#define NODE_CUSTOM_NAME 1024 /* deprecated! */ +#define NODE_CUSTOM_NAME 1024 /* deprecated! */ + /* group node types: use const outputs by default */ +#define NODE_CONST_OUTPUT (1<<11) + /* node is always behind others */ +#define NODE_BACKGROUND (1<<12) + /* automatic flag for nodes included in transforms */ +#define NODE_TRANSFORM (1<<13) typedef struct bNodeLink { struct bNodeLink *next, *prev; @@ -175,13 +193,13 @@ typedef struct bNodeLink { bNode *fromnode, *tonode; bNodeSocket *fromsock, *tosock; - int flag, pad; - + int flag; + int pad; } bNodeLink; - /* link->flag */ -#define NODE_LINKFLAG_HILITE 1 +#define NODE_LINK_VALID 1 /* link has been successfully validated */ +#define NODE_LINKFLAG_HILITE 2 /* the basis for a Node tree, all links and nodes reside internal here */ /* only re-usable node trees are in the library though, materials and textures allocate own tree struct */ @@ -193,19 +211,24 @@ typedef struct bNodeTree { ListBase nodes, links; - bNodeStack *stack; /* stack is only while executing, no read/write in file */ - struct ListBase *threadstack; /* same as above */ - int type, init; /* set init on fileread */ - int stacksize; /* amount of elements in stack */ int cur_index; /* sockets in groups have unique identifiers, adding new sockets always will increase this counter */ - int flag, pad; + int flag; + int update; /* update flags */ + + int nodetype; /* specific node type this tree is used for */ - ListBase alltypes; /* type definitions */ ListBase inputs, outputs; /* external sockets for group nodes */ - - int pad2[2]; + + /* execution data */ + /* XXX It would be preferable to completely move this data out of the underlying node tree, + * so node tree execution could finally run independent of the tree itself. This would allow node trees + * to be merely linked by other data (materials, textures, etc.), as ID data is supposed to. + * Execution data is generated from the tree once at execution start and can then be used + * as long as necessary, even while the tree is being modified. + */ + struct bNodeTreeExec *execdata; /* callbacks */ void (*progress)(void *, float progress); @@ -216,20 +239,59 @@ typedef struct bNodeTree { } bNodeTree; /* ntree->type, index */ -#define NTREE_SHADER 0 -#define NTREE_COMPOSIT 1 -#define NTREE_TEXTURE 2 +#define NTREE_SHADER 0 +#define NTREE_COMPOSIT 1 +#define NTREE_TEXTURE 2 +#define NUM_NTREE_TYPES 3 /* ntree->init, flag */ -#define NTREE_TYPE_INIT 1 -#define NTREE_EXEC_INIT 2 +#define NTREE_TYPE_INIT 1 /* ntree->flag */ #define NTREE_DS_EXPAND 1 /* for animation editors */ -/* XXX not nice, but needed as a temporary flag +/* XXX not nice, but needed as a temporary flags * for group updates after library linking. */ -#define NTREE_DO_VERSIONS 1024 +#define NTREE_DO_VERSIONS_GROUP_EXPOSE 1024 + +/* ntree->update */ +#define NTREE_UPDATE 0xFFFF /* generic update flag (includes all others) */ +#define NTREE_UPDATE_LINKS 1 /* links have been added or removed */ +#define NTREE_UPDATE_NODES 2 /* nodes or sockets have been added or removed */ +#define NTREE_UPDATE_GROUP_IN 16 /* group inputs have changed */ +#define NTREE_UPDATE_GROUP_OUT 32 /* group outputs have changed */ +#define NTREE_UPDATE_GROUP 48 /* group has changed (generic flag including all other group flags) */ + + +/* socket value structs for input buttons */ + +typedef struct bNodeSocketValueInt { + int subtype; /* RNA subtype */ + int value; + int min, max; +} bNodeSocketValueInt; + +typedef struct bNodeSocketValueFloat { + int subtype; /* RNA subtype */ + float value; + float min, max; +} bNodeSocketValueFloat; + +typedef struct bNodeSocketValueBoolean { + char value; + char pad[3]; +} bNodeSocketValueBoolean; + +typedef struct bNodeSocketValueVector { + int subtype; /* RNA subtype */ + float value[3]; + float min, max; +} bNodeSocketValueVector; + +typedef struct bNodeSocketValueRGBA { + float value[4]; +} bNodeSocketValueRGBA; + /* data structs, for node->storage */ @@ -354,7 +416,6 @@ typedef struct TexNodeOutput { char name[32]; } TexNodeOutput; - /* comp channel matte */ #define CMP_NODE_CHANNEL_MATTE_CS_RGB 1 #define CMP_NODE_CHANNEL_MATTE_CS_HSV 2 -- cgit v1.2.3