From 0f2b2e3c60173e85e137df71392d867576e65ac1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 20 Dec 2007 16:35:27 +0000 Subject: Strand Render Simplification ============================ - Strand render now has options to remove child strands as the object's faces becomes smaller, in the Simplification particle panel. - "Reference Size" is the approximate size of the object on screen, after which simplification starts. - "Rate" is how fast strands are removed. - "Transition" is the percentage of strands being faded out as they are removed. - Another "Viewport" option removes strands on faces that are outside of the viewport. "Rate" again controls how fast these are removed. - Strand render in Blender Units now has an adjustable minimum width. Below this minimum width, strands start fading out instead of getting smaller. --- source/blender/blenloader/intern/readfile.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index cf71d9ab41e..8bbcc7016c1 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6826,7 +6826,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } for(ma=main->mat.first; ma; ma= ma->id.next) { - if (ma->samp_gloss_mir == 0) { + if(ma->samp_gloss_mir == 0) { ma->gloss_mir = ma->gloss_tra= 1.0; ma->aniso_gloss_mir = 1.0; ma->samp_gloss_mir = ma->samp_gloss_tra= 18; @@ -6834,11 +6834,23 @@ static void do_versions(FileData *fd, Library *lib, Main *main) ma->dist_mir = 0.0; ma->fadeto_mir = MA_RAYMIR_FADETOSKY; } + + if(ma->strand_min == 0.0f) + ma->strand_min= 1.0f; } - for(part=main->particle.first; part; part=part->id.next) + for(part=main->particle.first; part; part=part->id.next) { if(part->ren_child_nbr==0) part->ren_child_nbr= part->child_nbr; + + if(part->simplify_refsize==0) { + part->simplify_refsize= 1920; + part->simplify_rate= 1.0f; + part->simplify_transition= 0.1f; + part->simplify_viewport= 0.8f; + } + } + if (main->versionfile < 245 || main->subversionfile < 12) { /* initialize skeleton generation toolsettings */ -- cgit v1.2.3 From 801c0799c104872f68fe74597e22c09960cce120 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 20 Dec 2007 19:07:47 +0000 Subject: == Sculpt Mode == Applying Stephan Kassemeyer's patch (#6750) to add a curve modifier for sculpting. A few changes from the patch: * The default curve is closer to the old behavior * Fixed loading files already saved in sculpt mode * Changed the interface; split the brush texture controls off into a third sculpt tab, and put the curve (and curve reset) into the Brush tab. --- source/blender/blenloader/intern/readfile.c | 6 ++++++ source/blender/blenloader/intern/writefile.c | 2 ++ 2 files changed, 8 insertions(+) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 8bbcc7016c1..553ab0eb168 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3323,6 +3323,12 @@ static void direct_link_scene(FileData *fd, Scene *sce) /* SculptData textures */ for(a=0; asculptdata.mtex[a]= newdataadr(fd,sce->sculptdata.mtex[a]); + /* Sculpt intensity curve */ + sce->sculptdata.cumap= newdataadr(fd, sce->sculptdata.cumap); + if(sce->sculptdata.cumap) + direct_link_curvemapping(fd, sce->sculptdata.cumap); + else + sculpt_reset_curve(&sce->sculptdata); if(sce->ed) { ListBase *old_seqbasep= &((Editing *)sce->ed)->seqbase; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index cfaae977bdd..d19c634e610 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1422,6 +1422,8 @@ static void write_scenes(WriteData *wd, ListBase *scebase) for(a=0; asculptdata.mtex[a]); + if(sce->sculptdata.cumap) + write_curvemapping(wd, sce->sculptdata.cumap); ed= sce->ed; if(ed) { -- cgit v1.2.3 From a3a88f9591683df6274e50249e350de5ba2dc7d6 Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Tue, 25 Dec 2007 15:31:36 +0000 Subject: == Sequencer (includes a little bit of Peach :) == Reworked image / movie loading, to add the following features: - Mute strip - Lock strip (peach request :) - Crop / Translate _before_ image rescaling - N-keys editing of start, startofs, endofs, startstill, endstill Added (currently disabled) data structures for - proxy support - strip blend modes (currently only "REPLACE" works, which always did :) Planed: - automatic FPS rescaling - command keys to lock/mute a bunch of selected strips (which would complete the peach request to lock tracks) Caveats: now the N-keys dialog is four-tabbed. I think, we should move those tabs into the panels dialog in the future... --- source/blender/blenloader/intern/readfile.c | 18 ++++++++++++++++++ source/blender/blenloader/intern/writefile.c | 10 +++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 553ab0eb168..a90914e6dcb 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3366,6 +3366,24 @@ static void direct_link_scene(FileData *fd, Scene *sce) } else { seq->strip->stripdata = 0; } + if (seq->flag & SEQ_USE_CROP) { + seq->strip->crop = newdataadr( + fd, seq->strip->crop); + } else { + seq->strip->crop = 0; + } + if (seq->flag & SEQ_USE_TRANSFORM) { + seq->strip->transform = newdataadr( + fd, seq->strip->transform); + } else { + seq->strip->transform = 0; + } + if (seq->flag & SEQ_USE_PROXY) { + seq->strip->proxy = newdataadr( + fd, seq->strip->proxy); + } else { + seq->strip->proxy = 0; + } } } END_SEQ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index d19c634e610..2e14fe55383 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1463,7 +1463,15 @@ static void write_scenes(WriteData *wd, ListBase *scebase) strip= seq->strip; writestruct(wd, DATA, "Strip", 1, strip); - + if(seq->flag & SEQ_USE_CROP && strip->crop) { + writestruct(wd, DATA, "StripCrop", 1, strip->crop); + } + if(seq->flag & SEQ_USE_TRANSFORM && strip->transform) { + writestruct(wd, DATA, "StripTransform", 1, strip->transform); + } + if(seq->flag & SEQ_USE_PROXY && strip->proxy) { + writestruct(wd, DATA, "StripProxy", 1, strip->proxy); + } if(seq->type==SEQ_IMAGE) writestruct(wd, DATA, "StripElem", strip->len, strip->stripdata); else if(seq->type==SEQ_MOVIE || seq->type==SEQ_RAM_SOUND || seq->type == SEQ_HD_SOUND) -- cgit v1.2.3 From 88e71a5b799e852d6803a8c9075c4b46305e2478 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Wed, 26 Dec 2007 09:39:15 +0000 Subject: == Multires == Cleaned up bad level calls for multires; moved most of multires functions to blenkern, where they should have been in the first place. Functionality of the tool is unchanged. --- source/blender/blenloader/intern/readfile.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a90914e6dcb..d30f0da95d6 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -147,8 +147,6 @@ #include "BLO_undofile.h" #include "BLO_readblenfile.h" // streaming read pipe, for BLO_readblenfile BLO_readblenfilememory -#include "multires.h" - #include "readfile.h" #include "genfile.h" -- cgit v1.2.3 From 10b8237eab7e41ef7563cedbf6a2e4e5dda13456 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 26 Dec 2007 11:17:26 +0000 Subject: == PoseLib - Pose-Library Tool for Blender == "A slightly late Christmas present for the Animators out there :-)" This tool allows animators to store frequently used poses in an action, and be able to label those poses to help them retrieve them later. In a way, it acts as a glorified clipboard for poses. One of the cool features with this is the ability to select which stored pose to use interactively in the 3d-view. Once a few poses have been stored in the PoseLib, simply use the "Ctrl L" hotkey to start previewing. Use the Mousewheel or the Page Up/Down keys to change poses, and confirm/cancel the preview in the same way as you do for transforms. Usage Notes: * Each Armature may get its own PoseLib. PoseLibs are simply actions with extra data, so they can get relinked. * Manually editing actions used as PoseLibs is not a good idea, as some data may not be able to be found. Tools to automagically find poses in an action could be investigated... * PoseLib will only apply/retrieve poses to/from selected bones * A basic UI for this can be found in the "Links and Materials" panel. Most of the PoseLib tools are presented there. Useful Hotkeys (also found in Pose->PoseLib menu): * Ctrl L - interactively preview poses * Shift L - add a new pose or replace an existing pose in the PoseLib with the current pose * Ctrl Shift L - rename an existing pose in the PoseLib * Alt L - remove a pose from the poselib.c --- source/blender/blenloader/intern/readfile.c | 15 +++++++++++---- source/blender/blenloader/intern/writefile.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d30f0da95d6..f8f0395300c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1785,6 +1785,9 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose) } } + // ob->id.lib??? + pose->poselib = newlibadr_us(fd, ob->id.lib, pose->poselib); + if(rebuild) { ob->recalc= OB_RECALC; pose->flag |= POSE_RECALC; @@ -1814,12 +1817,12 @@ static void lib_link_action(FileData *fd, Main *main) while(act) { if(act->id.flag & LIB_NEEDLINK) { act->id.flag -= LIB_NEEDLINK; - + for (chan=act->chanbase.first; chan; chan=chan->next) { chan->ipo= newlibadr_us(fd, act->id.lib, chan->ipo); lib_link_constraint_channels(fd, &act->id, &chan->constraintChannels); } - + } act= act->id.next; } @@ -1847,7 +1850,10 @@ static void direct_link_action(FileData *fd, bAction *act) for (achan = act->chanbase.first; achan; achan=achan->next) link_list(fd, &achan->constraintChannels); - + + act->poselib= newdataadr(fd, act->poselib); + if (act->poselib) + link_list(fd, &act->poselib->poses); } static void direct_link_armature(FileData *fd, bArmature *arm) @@ -2942,7 +2948,6 @@ static void direct_link_pose(FileData *fd, bPose *pose) { pchan->iktree.first= pchan->iktree.last= NULL; pchan->path= NULL; } - } static void direct_link_modifiers(FileData *fd, ListBase *lb) @@ -7799,6 +7804,8 @@ static void expand_pose(FileData *fd, Main *mainvar, bPose *pose) expand_constraints(fd, mainvar, &chan->constraints); expand_doit(fd, mainvar, chan->custom); } + + expand_doit(fd, mainvar, pose->poselib); } static void expand_armature(FileData *fd, Main *mainvar, bArmature *arm) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 2e14fe55383..90f48868911 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1743,11 +1743,21 @@ static void write_actions(WriteData *wd, ListBase *idbase) if (act->id.us>0 || wd->current) { writestruct(wd, ID_AC, "bAction", 1, act); if (act->id.properties) IDP_WriteProperty(act->id.properties, wd); - + for (chan=act->chanbase.first; chan; chan=chan->next) { writestruct(wd, DATA, "bActionChannel", 1, chan); write_constraint_channels(wd, &chan->constraintChannels); } + + if (act->poselib) { + bPoseLib *pl= act->poselib; + bPoseLibRef *plr; + + writestruct(wd, DATA, "bPoseLib", 1, pl); + + for (plr= pl->poses.first; plr; plr= plr->next) + writestruct(wd, DATA, "bPoseLibRef", 1, plr); + } } } } -- cgit v1.2.3 From debf29022a1a720cc1ea324ca3d345f8663a84fc Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Wed, 26 Dec 2007 15:25:30 +0000 Subject: =Particle bugfix= Hair keys were saved via a non-sdna function, which resulted in endian problems. As ton pointed out on irc, he invented sdna for a reason! --- source/blender/blenloader/intern/writefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 90f48868911..f1fe64eb820 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -556,7 +556,7 @@ static void write_particlesystems(WriteData *wd, ListBase *particles) ParticleData *pa = psys->particles; for(a=0; atotpart; a++, pa++) - writedata(wd, DATA, MEM_allocN_len(pa->hair),pa->hair); + writestruct(wd, DATA, "HairKey", pa->totkey, pa->hair); } } if(psys->child) writestruct(wd, DATA, "ChildParticle", psys->totchild ,psys->child); -- cgit v1.2.3 From fc2cf13fc6b66caf09e610a83b793fc8e7da09a1 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Wed, 26 Dec 2007 23:08:00 +0000 Subject: == Sculpt == Fixed a memory leak when using the interactive brush resize tool. --- source/blender/blenloader/intern/readfile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f8f0395300c..043febbbc75 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -136,6 +136,7 @@ #include "BKE_sca.h" // for init_actuator #include "BKE_scene.h" #include "BKE_softbody.h" // sbNew() +#include "BKE_sculpt.h" #include "BKE_texture.h" // for open_plugin_tex #include "BKE_utildefines.h" // SWITCH_INT DATA ENDB DNA1 O_BINARY GLOB USER TEST REND #include "BKE_idprop.h" -- cgit v1.2.3 From 4a0dc8d4d94f10b93de4a8bf4441e466da70a64b Mon Sep 17 00:00:00 2001 From: Juho Vepsalainen Date: Fri, 28 Dec 2007 08:04:37 +0000 Subject: Bugfix - Socket selection status was not updated properly on file load This commit adds a missing initialization that caused "Toggle Link (f key)" not to work properly in case a file with an existing selection status was opened. --- source/blender/blenloader/intern/readfile.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 043febbbc75..a886c0d195b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1524,6 +1524,22 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) link->tosock= newdataadr(fd, link->tosock); } + /* set selin and selout */ + for(node= ntree->nodes.first; node; node= node->next) { + for(sock= node->inputs.first; sock; sock= sock->next) { + if(sock->flag & SOCK_SEL) { + ntree->selin= sock; + break; + } + } + for(sock= node->outputs.first; sock; sock= sock->next) { + if(sock->flag & SOCK_SEL) { + ntree->selout= sock; + break; + } + } + } + /* type verification is in lib-link */ } -- cgit v1.2.3 From 5be2e5aa9821a1da9cf16d7dd848a17487f68685 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 30 Dec 2007 12:08:28 +0000 Subject: == PoseLib - Overhauled Implementation == Based on feedback from Ton, I've recoded the way "PoseLibs" are implemented/exposed. Therefore, quite a bit of code has been changed to fit this in better. Now, ANY ACTION can be a "PoseLib". A set of Markers which belong to the Action (it's taken a year, but they're finally back), are used to tag "poses" in the Action. These markers are shown using diamond-shaped blue icons (designed by Matt Ebb) in three shades - unselected/normal, selected, active. Notes: * Each Armature Object has an Action which acts as a PoseLib. * Improved UI presented in buttons panel for this -- added proper buttons for action assigning -- renamed "Validate PoseLib" to "Auto-Sync PoseLib" (this option auto-tags poses based on keyframes found) Like in the 3d-view, use the hotkeys: * Shift-L to add a local marker * Ctrl-Shift-L to rename a local marker * Alt-L to delete selected local markers Note: transforms, etc. are not currently available with these markers == PoseLib Preview == Added a few features here: * Left/Right-Arrow keys now change the poses too (previous and next respectively) * Up/Down-Arrow keys also change the poses, but "jump" to a pose 5 steps away in their respective directions --- source/blender/blenloader/intern/readfile.c | 12 +++--------- source/blender/blenloader/intern/writefile.c | 11 +++-------- 2 files changed, 6 insertions(+), 17 deletions(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a886c0d195b..6381aec7872 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1802,9 +1802,6 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose) } } - // ob->id.lib??? - pose->poselib = newlibadr_us(fd, ob->id.lib, pose->poselib); - if(rebuild) { ob->recalc= OB_RECALC; pose->flag |= POSE_RECALC; @@ -1864,13 +1861,10 @@ static void direct_link_action(FileData *fd, bAction *act) bActionChannel *achan; link_list(fd, &act->chanbase); + link_list(fd, &act->markers); for (achan = act->chanbase.first; achan; achan=achan->next) link_list(fd, &achan->constraintChannels); - - act->poselib= newdataadr(fd, act->poselib); - if (act->poselib) - link_list(fd, &act->poselib->poses); } static void direct_link_armature(FileData *fd, bArmature *arm) @@ -2790,6 +2784,7 @@ static void lib_link_object(FileData *fd, Main *main) ob->track= newlibadr(fd, ob->id.lib, ob->track); ob->ipo= newlibadr_us(fd, ob->id.lib, ob->ipo); ob->action = newlibadr_us(fd, ob->id.lib, ob->action); + ob->poselib= newlibadr_us(fd, ob->id.lib, ob->poselib); ob->dup_group= newlibadr_us(fd, ob->id.lib, ob->dup_group); ob->proxy= newlibadr_us(fd, ob->id.lib, ob->proxy); @@ -7821,8 +7816,6 @@ static void expand_pose(FileData *fd, Main *mainvar, bPose *pose) expand_constraints(fd, mainvar, &chan->constraints); expand_doit(fd, mainvar, chan->custom); } - - expand_doit(fd, mainvar, pose->poselib); } static void expand_armature(FileData *fd, Main *mainvar, bArmature *arm) @@ -7900,6 +7893,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob) expand_doit(fd, mainvar, ob->data); expand_doit(fd, mainvar, ob->ipo); expand_doit(fd, mainvar, ob->action); + expand_doit(fd, mainvar, ob->poselib); for (md=ob->modifiers.first; md; md=md->next) { expand_modifier(fd, mainvar, md); diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index f1fe64eb820..87462ad78f6 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1738,6 +1738,7 @@ static void write_actions(WriteData *wd, ListBase *idbase) { bAction *act; bActionChannel *chan; + TimeMarker *marker; for(act=idbase->first; act; act= act->id.next) { if (act->id.us>0 || wd->current) { @@ -1749,14 +1750,8 @@ static void write_actions(WriteData *wd, ListBase *idbase) write_constraint_channels(wd, &chan->constraintChannels); } - if (act->poselib) { - bPoseLib *pl= act->poselib; - bPoseLibRef *plr; - - writestruct(wd, DATA, "bPoseLib", 1, pl); - - for (plr= pl->poses.first; plr; plr= plr->next) - writestruct(wd, DATA, "bPoseLibRef", 1, plr); + for (marker=act->markers.first; marker; marker=marker->next) { + writestruct(wd, DATA, "TimeMarker", 1, marker); } } } -- cgit v1.2.3