[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16258] branches/apricot/source/gameengine /Ketsji/KX_Light.cpp: Apricot Branch: bugfix, crash in lights switching blender files,
Revision: 16258 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=16258 Author: blendix Date: 2008-08-26 14:38:05 +0200 (Tue, 26 Aug 2008) Log Message: --- Apricot Branch: bugfix, crash in lights switching blender files, accidentally removed a line of code that should have been kept. Modified Paths: -- branches/apricot/source/gameengine/Ketsji/KX_Light.cpp Modified: branches/apricot/source/gameengine/Ketsji/KX_Light.cpp === --- branches/apricot/source/gameengine/Ketsji/KX_Light.cpp 2008-08-26 04:28:18 UTC (rev 16257) +++ branches/apricot/source/gameengine/Ketsji/KX_Light.cpp 2008-08-26 12:38:05 UTC (rev 16258) @@ -64,6 +64,7 @@ KX_LightObject::~KX_LightObject() { + m_rendertools-RemoveLight(m_lightobj); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16259] branches/soc-2008-unclezeiv/source /blender/render/intern/source/lightcuts.c: Indirect lighting: added clamping mechanism for virtual point li
Revision: 16259 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=16259 Author: unclezeiv Date: 2008-08-26 16:58:33 +0200 (Tue, 26 Aug 2008) Log Message: --- Indirect lighting: added clamping mechanism for virtual point lights, to reduce artifacts such as random bright spots. As the code is still relatively untested (and I'm not 100% even sure to have correctly understood the paper on this), I'm also adding a temporary toggle to disable it, in order to easily perform tests and comparisons. Modified Paths: -- branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c Modified: branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c === --- branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 2008-08-26 12:38:05 UTC (rev 16258) +++ branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 2008-08-26 14:58:33 UTC (rev 16259) @@ -1618,6 +1618,9 @@ R= *re; R.r.mode= ~R_LIGHTCUTS; } + /* other hack to make shadeSkyView work... */ + else if (lcd-options LC_OPT_ENV_LIGHT re-r.lightcuts_env_map 0) + R= *re; if (lcd-options LC_OPT_INDIR_MESH) { /* allocate array to hold coordinates for all possible virtual point lights */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16260] branches/soc-2008-unclezeiv/source /blender: Just realized, thanks to renderdemon, that World Range affects all lights, not only the enviro
Revision: 16260 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=16260 Author: unclezeiv Date: 2008-08-26 17:35:54 +0200 (Tue, 26 Aug 2008) Log Message: --- Just realized, thanks to renderdemon, that World Range affects all lights, not only the environment lighting (sorry!). As a consequence of this, added a slider to control a multiplicative factor for environment lighting. Modified Paths: -- branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_scene_types.h branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c branches/soc-2008-unclezeiv/source/blender/src/buttons_scene.c Modified: branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c === --- branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c 2008-08-26 14:58:33 UTC (rev 16259) +++ branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c 2008-08-26 15:35:54 UTC (rev 16260) @@ -7784,6 +7784,8 @@ r-lightcuts_indir_dist= 5.0f; if(r-lightcuts_color_weight==0) r-lightcuts_color_weight= 1; + if(r-lightcuts_env_map_fac==0.0f) + r-lightcuts_env_map_fac= 1.0f; } sce= sce-id.next; Modified: branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_scene_types.h === --- branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_scene_types.h 2008-08-26 14:58:33 UTC (rev 16259) +++ branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_scene_types.h 2008-08-26 15:35:54 UTC (rev 16260) @@ -322,6 +322,8 @@ short lightcuts_options; short lightcuts_color_weight; float lightcuts_indir_dist; + float lightcuts_env_map_fac; + int lightcuts_pad; int lightcuts_debug_options; } RenderData; Modified: branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c === --- branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 2008-08-26 14:58:33 UTC (rev 16259) +++ branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 2008-08-26 15:35:54 UTC (rev 16260) @@ -891,7 +891,7 @@ } -static void convert_environment_map(Render *re, LightcutsData *lcd, int n) +static void convert_environment_map(Render *re, LightcutsData *lcd, int n, float fac) { GroupObject *gonew; LampRen *lar; @@ -969,7 +969,7 @@ */ /* please note: you can control this factor via Shading World Range */ - lar-energy= M_PI / (float)n; + lar-energy= fac * M_PI / (float)n; lar-r= col[0] * lar-energy; lar-g= col[1] * lar-energy; lar-b= col[2] * lar-energy; @@ -1653,7 +1653,7 @@ /* light conversion */ if (lcd-options LC_OPT_ENV_LIGHT re-r.lightcuts_env_map 0) - convert_environment_map(re, lcd, re-r.lightcuts_env_map); + convert_environment_map(re, lcd, re-r.lightcuts_env_map, re-r.lightcuts_env_map_fac); for(go=lights-first; go; go= go-next) { lar= go-lampren; Modified: branches/soc-2008-unclezeiv/source/blender/src/buttons_scene.c === --- branches/soc-2008-unclezeiv/source/blender/src/buttons_scene.c 2008-08-26 14:58:33 UTC (rev 16259) +++ branches/soc-2008-unclezeiv/source/blender/src/buttons_scene.c 2008-08-26 15:35:54 UTC (rev 16260) @@ -3457,7 +3457,8 @@ uiBlockBeginAlign(block); uiDefButI(block, NUM, B_DIFF, Area lights:, 0, -54, 192, 20, G.scene-r.lightcuts_area_lights, 0, 10, 0, 0, The number of point lights generated for all the area lights); uiDefButBitS(block, TOG, 0x8, B_DIFF, Enable, 0, -76, 31, 20, G.scene-r.lightcuts_options, 0, 0, 0, 0, Enable environment map lighting); - uiDefButS(block, NUM, B_DIFF, Environment map:, 33, -76, 192-33, 20, G.scene-r.lightcuts_env_map, 0, 2, 0, 0, How many point lights are used to convert the environment map); + uiDefButS(block, NUM, B_DIFF, Envmap:, 33, -76, 192-33-64, 20, G.scene-r.lightcuts_env_map, 0, 2, 0, 0, How many point lights are used to convert the environment map); + uiDefButF(block, NUM, B_DIFF, Fac:, 128, -76, 64, 20, G.scene-r.lightcuts_env_map_fac, 0.0f, 100.0f, 0, 0, Intensity of environment map); uiBlockEndAlign(block); uiBlockBeginAlign(block);
Re: [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16259] branches/soc-2008-unclezeiv/source /blender/render/intern/source/lightcuts.c: Indirect lighting: added clamping mechanism for virtual poin
Ops, sorry, wrong log message. This commit tries to fix a long standing bug that would skip environment light creation from time to time. The cause seems to be the R global variable not being copied yet. Davide ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16261] branches/soc-2008-quorn/release/ scripts/textplugin_templates.py: Fix for text plug-in scripts on 64-bit platforms.
Revision: 16261 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=16261 Author: quorn Date: 2008-08-26 19:09:17 +0200 (Tue, 26 Aug 2008) Log Message: --- Fix for text plug-in scripts on 64-bit platforms. Modified Paths: -- branches/soc-2008-quorn/release/scripts/textplugin_templates.py Modified: branches/soc-2008-quorn/release/scripts/textplugin_templates.py === --- branches/soc-2008-quorn/release/scripts/textplugin_templates.py 2008-08-26 15:35:54 UTC (rev 16260) +++ branches/soc-2008-quorn/release/scripts/textplugin_templates.py 2008-08-26 17:09:17 UTC (rev 16261) @@ -40,6 +40,13 @@ '\t\n' '\tdef __init__(self, ${4:params}):\n' '\t\tCreates a new ${1}\n' + '\t\t${5}', + 'class': + 'class ${1:name}(${2:parent}):\n' + '\t${3:docs}\n' + '\t\n' + '\tdef __init__(self, ${4:params}):\n' + '\t\tCreates a new ${1}\n' '\t\t${5}' } @@ -102,7 +109,8 @@ for x, y in points: txt.setCursorPos(y, x) txt.setSelectPos(y, x+len(text)) - txt.markSelection(hash(text)+int(id), color, Text.TMARK_TEMP | Text.TMARK_EDITALL) + txt.markSelection((hash(text)+int(id)) 0x, color, + Text.TMARK_TEMP | Text.TMARK_EDITALL) if first: text, x, y = first txt.setCursorPos(y, x) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16262] branches/apricot/source: Apricot Branch: fix for a change I made to avoid doing where_is_pose
Revision: 16262 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=16262 Author: blendix Date: 2008-08-26 19:38:39 +0200 (Tue, 26 Aug 2008) Log Message: --- Apricot Branch: fix for a change I made to avoid doing where_is_pose too often, didn't work correct for multiple objects sharing the same armature. Modified Paths: -- branches/apricot/source/blender/blenkernel/intern/action.c branches/apricot/source/gameengine/Converter/BL_ArmatureObject.cpp branches/apricot/source/gameengine/Converter/BL_ArmatureObject.h branches/apricot/source/gameengine/Converter/BL_SkinDeformer.cpp branches/apricot/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp Modified: branches/apricot/source/blender/blenkernel/intern/action.c === --- branches/apricot/source/blender/blenkernel/intern/action.c 2008-08-26 17:09:17 UTC (rev 16261) +++ branches/apricot/source/blender/blenkernel/intern/action.c 2008-08-26 17:38:39 UTC (rev 16262) @@ -347,6 +347,7 @@ VECCOPY(pchan-loc, chan-loc); VECCOPY(pchan-size, chan-size); QUATCOPY(pchan-quat, chan-quat); + Mat4CpyMat4(pchan-chan_mat, (float(*)[4])chan-chan_mat); pchan-flag= chan-flag; con= chan-constraints.first; Modified: branches/apricot/source/gameengine/Converter/BL_ArmatureObject.cpp === --- branches/apricot/source/gameengine/Converter/BL_ArmatureObject.cpp 2008-08-26 17:09:17 UTC (rev 16261) +++ branches/apricot/source/gameengine/Converter/BL_ArmatureObject.cpp 2008-08-26 17:38:39 UTC (rev 16262) @@ -53,18 +53,19 @@ : KX_GameObject(sgReplicationInfo,callbacks), m_objArma(armature), - m_mrdPose(NULL), m_lastframe(0.0), m_activeAct(NULL), m_activePriority(999), - m_lastapplyframe(0.0), - m_lastapplypose(NULL) + m_lastapplyframe(0.0) { m_armature = get_armature(m_objArma); - m_pose = m_objArma-pose; + + /* we make a copy of blender object's pose, and then always swap it with +* the original pose before calling into blender functions, to deal with +* replica's or other objects using the same blender object */ + copy_pose(m_pose, m_objArma-pose, 1 /* copy_constraint_channels_hack */); } - CValue* BL_ArmatureObject::GetReplica() { BL_ArmatureObject* replica = new BL_ArmatureObject(*this); @@ -80,42 +81,39 @@ { KX_GameObject::ProcessReplica(replica); + replica-m_pose = NULL; + copy_pose(replica-m_pose, m_pose, 1 /* copy_constraint_channels_hack */); } BL_ArmatureObject::~BL_ArmatureObject() { - if (m_mrdPose) - free_pose(m_mrdPose); + if (m_pose) + free_pose(m_pose); } -/* note, you can only call this for exisiting Armature objects, and not mix it with other Armatures */ -/* there is only 1 unique Pose per Armature */ -void BL_ArmatureObject::ApplyPose() +bool BL_ArmatureObject::VerifyPose() { - if(m_lastapplyframe == m_lastframe m_lastapplypose == m_pose) - return; - - if (m_pose) { - // copy to armature object - if (m_objArma-pose != m_pose)/* This should never happen but it does - Campbell */ - extract_pose_from_pose(m_objArma-pose, m_pose); - - // is this needed anymore? - //if (!m_mrdPose) - // copy_pose (m_mrdPose, m_pose, 0); - //else - // extract_pose_from_pose(m_mrdPose, m_pose); - + if(m_lastapplyframe != m_lastframe) { + extract_pose_from_pose(m_objArma-pose, m_pose); where_is_pose(m_objArma); - m_lastapplyframe = m_lastframe; - m_lastapplypose = m_pose; + extract_pose_from_pose(m_pose, m_objArma-pose); + return false; } + else + return true; } +void BL_ArmatureObject::ApplyPose() +{ + if(VerifyPose()) + extract_pose_from_pose(m_objArma-pose, m_pose); +} + void BL_ArmatureObject::SetPose(bPose *pose) { - m_pose = pose; + extract_pose_from_pose(m_pose, pose); + m_lastapplyframe = -1.0; } bool BL_ArmatureObject::SetActiveAction(BL_ActionActuator *act, short priority, double curtime) @@ -176,20 +174,16 @@ /* If the caller supplies a null pose, create a new one. */ /* Otherwise, copy the armature's pose channels into the caller-supplied pose */ - // is this needed anymore? - //if (!m_mrdPose){ - // copy_pose (m_mrdPose, m_pose, 0); - //} - if (!*pose) { // must duplicate the constraints too otherwise we have corruption in free_pose_channels() // because it will free the blender
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16263] branches/apricot/source/blender/ gpu/intern/gpu_material.c: Apricot Branch: apply glsl object color before mist, makes more sense.
Revision: 16263 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=16263 Author: blendix Date: 2008-08-26 19:53:04 +0200 (Tue, 26 Aug 2008) Log Message: --- Apricot Branch: apply glsl object color before mist, makes more sense. Modified Paths: -- branches/apricot/source/blender/gpu/intern/gpu_material.c Modified: branches/apricot/source/blender/gpu/intern/gpu_material.c === --- branches/apricot/source/blender/gpu/intern/gpu_material.c 2008-08-26 17:38:39 UTC (rev 16262) +++ branches/apricot/source/blender/gpu/intern/gpu_material.c 2008-08-26 17:53:04 UTC (rev 16263) @@ -1161,6 +1161,11 @@ GPU_link(mat, shade_add, shr-combined, shr-spec, shr-combined); } + if(ma-shade_flag MA_OBCOLOR) { + mat-obcolalpha = 1; + GPU_link(mat, shade_obcolor, shr-combined, GPU_builtin(GPU_OBCOLOR), shr-combined); + } + if(world (world-mode WO_MIST) !(ma-mode MA_NOMIST)) { misttype = world-mistype; @@ -1181,11 +1186,6 @@ } GPU_link(mat, mtex_alpha_to_col, shr-combined, shr-alpha, shr-combined); - - if(ma-shade_flag MA_OBCOLOR) { - mat-obcolalpha = 1; - GPU_link(mat, shade_obcolor, shr-combined, GPU_builtin(GPU_OBCOLOR), shr-combined); - } } GPUNodeLink *GPU_blender_material(GPUMaterial *mat, Material *ma) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs