[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23298] trunk/blender/source/blender: 2. 5 - Animation Utility Function
Revision: 23298 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23298 Author: aligorith Date: 2009-09-17 12:14:56 +0200 (Thu, 17 Sep 2009) Log Message: --- 2.5 - Animation Utility Function Added a utility function to check which transforms for an object or bone are animated, returning these as bitflags and/or optionally retrieving the relevant F-Curves too. Beware that this method may not be working correctly yet, but it shouldn't hurt anyone in the meantime :) Also, split RNA-path building function up into a version which only creates the path up to the given struct, with the other parts being added later. Modified Paths: -- trunk/blender/source/blender/blenkernel/BKE_action.h trunk/blender/source/blender/blenkernel/intern/action.c trunk/blender/source/blender/blenkernel/intern/anim_sys.c trunk/blender/source/blender/blenlib/BLI_listbase.h trunk/blender/source/blender/blenlib/intern/listbase.c trunk/blender/source/blender/makesrna/RNA_access.h trunk/blender/source/blender/makesrna/intern/rna_access.c Modified: trunk/blender/source/blender/blenkernel/BKE_action.h === --- trunk/blender/source/blender/blenkernel/BKE_action.h2009-09-17 00:14:47 UTC (rev 23297) +++ trunk/blender/source/blender/blenkernel/BKE_action.h2009-09-17 10:14:56 UTC (rev 23298) @@ -51,7 +51,7 @@ extern C { #endif -/* Action API - */ +/* Action Lib Stuff - */ /* Allocate a new bAction with the given name */ struct bAction *add_empty_action(const char name[]); @@ -65,6 +65,31 @@ // XXX is this needed? void make_local_action(struct bAction *act); + +/* Action API - */ + +/* types of transforms applied to the given item + * - these are the return falgs for action_get_item_transforms() + */ +typedef enum eAction_TransformFlags { + /* location */ + ACT_TRANS_LOC = (10), + /* rotation */ + ACT_TRANS_ROT = (11), + /* scaling */ + ACT_TRANS_SCALE = (12), + + /* all flags */ + ACT_TRANS_ALL = (ACT_TRANS_LOC|ACT_TRANS_ROT|ACT_TRANS_SCALE), +} eAction_TransformFlags; + +/* Return flags indicating which transforms the given object/posechannel has + * - if 'curves' is provided, a list of links to these curves are also returned + * whose nodes WILL NEED FREEING + */ +short action_get_item_transforms(struct bAction *act, struct Object *ob, struct bPoseChannel *pchan, ListBase *curves); + + /* Some kind of bounding box operation on the action */ void calc_action_range(const struct bAction *act, float *start, float *end, short incl_modifiers); @@ -73,6 +98,9 @@ /* Action Groups API - */ +/* Get the active action-group for an Action */ +struct bActionGroup *get_active_actiongroup(struct bAction *act); + /* Make the given Action Group the active one */ void set_active_action_group(struct bAction *act, struct bActionGroup *agrp, short select); Modified: trunk/blender/source/blender/blenkernel/intern/action.c === --- trunk/blender/source/blender/blenkernel/intern/action.c 2009-09-17 00:14:47 UTC (rev 23297) +++ trunk/blender/source/blender/blenkernel/intern/action.c 2009-09-17 10:14:56 UTC (rev 23298) @@ -212,9 +212,10 @@ return dst; } +/* *** Action Groups *** */ /* Get the active action-group for an Action */ -static bActionGroup *get_active_actiongroup (bAction *act) +bActionGroup *get_active_actiongroup (bAction *act) { bActionGroup *agrp= NULL; @@ -404,7 +405,7 @@ return NULL; } -/* Pose channels *** */ +/* *** Pose channels *** */ /* usually used within a loop, so we got a N^2 slowdown */ bPoseChannel *get_pose_channel(const bPose *pose, const char *name) @@ -818,7 +819,7 @@ } } -/* ** time ** */ +/* ** F-Curve Utilities for Actions ** */ /* Check if the given action has any keyframes */ short action_has_motion(const bAction *act) @@ -916,6 +917,99 @@ } } + +/* Return flags indicating which transforms the given object/posechannel has + * - if 'curves' is provided, a list of links to these curves are also returned + */ +short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan, ListBase *curves) +{ + PointerRNA ptr; + FCurve *fcu; + char *basePath=NULL; + short flags=0; + + /* build PointerRNA from provided data to obtain the paths to use */ + if (pchan) + RNA_pointer_create((ID *)ob, RNA_PoseChannel, pchan, ptr); + else if (ob) + RNA_id_pointer_create((ID *)ob, ptr);
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23299] branches/itasc: iTaSC: add joint rotation constraint.
Revision: 23299 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23299 Author: ben2610 Date: 2009-09-17 13:04:10 +0200 (Thu, 17 Sep 2009) Log Message: --- iTaSC: add joint rotation constraint. Joint rotation constraint is the capability of taking the pose channel rotation computed from action as the target for the joint value. The rotation constraint is integrated in the IK tree and solved at the same time as the cartesian constraints. This allows fine control over the armature configuration during the animation. The control is provided per channel and each channel can have a different weight for the constraint. The option appears in the Inverse Kinematics panels (i.e. it requires that you define at least one cartesian space IK constraint). Other improvements: - Fix a bug in IK tree construction in certain tree configuration with more than one IK constraint were defined on a channel. - Detect ill defined armature and avoid crash. - Prepare plugin and solver for other joint space constraint. - Fix bug with joint weight incorrectly computed from stiffness . - Increase feedback range up to 100. Modified Paths: -- branches/itasc/intern/itasc/Armature.cpp branches/itasc/intern/itasc/CopyPose.cpp branches/itasc/intern/itasc/Distance.cpp branches/itasc/intern/itasc/Scene.cpp branches/itasc/release/ui/buttons_data_bone.py branches/itasc/source/blender/blenkernel/intern/action.c branches/itasc/source/blender/editors/armature/editarmature.c branches/itasc/source/blender/editors/armature/poseobject.c branches/itasc/source/blender/editors/object/object_constraint.c branches/itasc/source/blender/ikplugin/BIK_api.h branches/itasc/source/blender/ikplugin/intern/ikplugin_api.c branches/itasc/source/blender/ikplugin/intern/ikplugin_api.h branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp branches/itasc/source/blender/ikplugin/intern/itasc_plugin.h branches/itasc/source/blender/makesdna/DNA_action_types.h branches/itasc/source/blender/makesrna/intern/rna_pose.c branches/itasc/source/gameengine/Converter/BL_ArmatureChannel.cpp branches/itasc/source/gameengine/PyDoc/GameTypes.py Modified: branches/itasc/intern/itasc/Armature.cpp === --- branches/itasc/intern/itasc/Armature.cpp2009-09-17 10:14:56 UTC (rev 23298) +++ branches/itasc/intern/itasc/Armature.cpp2009-09-17 11:04:10 UTC (rev 23299) @@ -696,7 +696,7 @@ *(double*)pConstraint-value[i].y = m_qKdl(nr); *(double*)pConstraint-value[i].ydot = m_qdotKdl(nr); } - if (pConstraint-function (!timestamp.substep || pConstraint-substep)) { + if (pConstraint-function (pConstraint-substep || (!timestamp.reiterate !timestamp.substep))) { (*pConstraint-function)(timestamp, pConstraint-values, pConstraint-v_nr, pConstraint-param); } // recompute the weight in any case, that's the most likely modification Modified: branches/itasc/intern/itasc/CopyPose.cpp === --- branches/itasc/intern/itasc/CopyPose.cpp2009-09-17 10:14:56 UTC (rev 23298) +++ branches/itasc/intern/itasc/CopyPose.cpp2009-09-17 11:04:10 UTC (rev 23299) @@ -430,7 +430,7 @@ found = popPose(timestamp.cacheTimestamp); } } - if (m_constraintCallback (!timestamp.substep || m_substep)) { + if (m_constraintCallback (m_substep || (!timestamp.reiterate !timestamp.substep))) { // initialize first callback the application to get the current values int i=0; if (m_outputControl CTL_POSITION) { Modified: branches/itasc/intern/itasc/Distance.cpp === --- branches/itasc/intern/itasc/Distance.cpp2009-09-17 10:14:56 UTC (rev 23298) +++ branches/itasc/intern/itasc/Distance.cpp2009-09-17 11:04:10 UTC (rev 23299) @@ -296,7 +296,7 @@ if (!timestamp.reiterate) cacheAvail = popDist(timestamp.cacheTimestamp); } - if (m_constraintCallback (m_substep || !timestamp.substep)) { + if (m_constraintCallback (m_substep || (!timestamp.reiterate !timestamp.substep))) { // initialize first callback the application to get the current values *(double*)m_data.y = m_chi(2); *(double*)m_data.ydot = m_ydot(0); Modified: branches/itasc/intern/itasc/Scene.cpp === --- branches/itasc/intern/itasc/Scene.cpp 2009-09-17 10:14:56 UTC (rev 23298) +++ branches/itasc/intern/itasc/Scene.cpp 2009-09-17 11:04:10 UTC (rev 23299) @@ -183,6 +183,9 @@
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23300] trunk/blender/projectfiles_vc9/ blender: Update MSVC project files.
Revision: 23300 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23300 Author: ben2610 Date: 2009-09-17 13:17:49 +0200 (Thu, 17 Sep 2009) Log Message: --- Update MSVC project files. Modified Paths: -- trunk/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj trunk/blender/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj Modified: trunk/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj === --- trunk/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj 2009-09-17 11:04:10 UTC (rev 23299) +++ trunk/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj 2009-09-17 11:17:49 UTC (rev 23300) @@ -379,7 +379,7 @@ /File File - RelativePath=..\..\..\source\blender\editors\datafiles\splash.jpg.c + RelativePath=..\..\..\source\blender\editors\datafiles\splash.png.c /File /Filter Modified: trunk/blender/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj === --- trunk/blender/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj 2009-09-17 11:04:10 UTC (rev 23299) +++ trunk/blender/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj 2009-09-17 11:17:49 UTC (rev 23300) @@ -811,6 +811,10 @@ /File File + RelativePath=..\..\..\source\blender\makesrna\intern\rna_text_api.c + + /File + File RelativePath=..\..\..\source\blender\makesrna\intern\rna_texture.c /File ___ 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 [23301] branches/itasc: svn merge -r 23249 :23300 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Revision: 23301 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23301 Author: ben2610 Date: 2009-09-17 13:59:32 +0200 (Thu, 17 Sep 2009) Log Message: --- svn merge -r 23249:23300 https://svn.blender.org/svnroot/bf-blender/trunk/blender Modified Paths: -- branches/itasc/CMakeLists.txt branches/itasc/intern/ghost/GHOST_Types.h branches/itasc/intern/ghost/intern/GHOST_SystemCarbon.cpp branches/itasc/intern/ghost/intern/GHOST_SystemX11.cpp branches/itasc/intern/ghost/intern/GHOST_WindowCarbon.cpp branches/itasc/intern/ghost/intern/GHOST_WindowWin32.cpp branches/itasc/intern/ghost/intern/GHOST_WindowX11.cpp branches/itasc/po/Makefile branches/itasc/projectfiles_vc9/blender/editors/ED_editors.vcproj branches/itasc/projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj branches/itasc/release/io/engine_render_pov.py branches/itasc/release/io/netrender/client.py branches/itasc/release/io/netrender/master.py branches/itasc/release/io/netrender/operators.py branches/itasc/release/io/netrender/slave.py branches/itasc/release/io/netrender/ui.py branches/itasc/release/io/netrender/utils.py branches/itasc/release/ui/bpy_ops.py branches/itasc/release/ui/buttons_data_lamp.py branches/itasc/release/ui/buttons_data_mesh.py branches/itasc/release/ui/buttons_material.py branches/itasc/release/ui/buttons_scene.py branches/itasc/release/ui/buttons_texture.py branches/itasc/release/ui/space_image.py branches/itasc/release/ui/space_info.py branches/itasc/release/ui/space_userpref.py branches/itasc/release/ui/space_view3d_toolbar.py branches/itasc/source/blender/blenkernel/BKE_action.h branches/itasc/source/blender/blenkernel/BKE_node.h branches/itasc/source/blender/blenkernel/BKE_text.h branches/itasc/source/blender/blenkernel/intern/action.c branches/itasc/source/blender/blenkernel/intern/anim_sys.c branches/itasc/source/blender/blenkernel/intern/image.c branches/itasc/source/blender/blenkernel/intern/paint.c branches/itasc/source/blender/blenkernel/intern/pointcache.c branches/itasc/source/blender/blenkernel/intern/smoke.c branches/itasc/source/blender/blenkernel/intern/text.c branches/itasc/source/blender/blenlib/BLI_listbase.h branches/itasc/source/blender/blenlib/intern/arithb.c branches/itasc/source/blender/blenlib/intern/listbase.c branches/itasc/source/blender/blenloader/intern/readblenentry.c branches/itasc/source/blender/editors/include/ED_datafiles.h branches/itasc/source/blender/editors/include/ED_image.h branches/itasc/source/blender/editors/include/ED_node.h branches/itasc/source/blender/editors/include/UI_interface.h branches/itasc/source/blender/editors/interface/interface.c branches/itasc/source/blender/editors/interface/interface_handlers.c branches/itasc/source/blender/editors/interface/interface_intern.h branches/itasc/source/blender/editors/interface/interface_layout.c branches/itasc/source/blender/editors/interface/interface_regions.c branches/itasc/source/blender/editors/interface/interface_templates.c branches/itasc/source/blender/editors/interface/interface_utils.c branches/itasc/source/blender/editors/mesh/loopcut.c branches/itasc/source/blender/editors/mesh/mesh_intern.h branches/itasc/source/blender/editors/mesh/mesh_ops.c branches/itasc/source/blender/editors/object/object_intern.h branches/itasc/source/blender/editors/object/object_ops.c branches/itasc/source/blender/editors/object/object_select.c branches/itasc/source/blender/editors/screen/area.c branches/itasc/source/blender/editors/screen/screen_edit.c branches/itasc/source/blender/editors/space_action/action_edit.c branches/itasc/source/blender/editors/space_action/action_header.c branches/itasc/source/blender/editors/space_action/action_intern.h branches/itasc/source/blender/editors/space_action/action_ops.c branches/itasc/source/blender/editors/space_buttons/space_buttons.c branches/itasc/source/blender/editors/space_file/file_ops.c branches/itasc/source/blender/editors/space_file/filelist.c branches/itasc/source/blender/editors/space_file/filesel.c branches/itasc/source/blender/editors/space_file/space_file.c branches/itasc/source/blender/editors/space_graph/graph_buttons.c branches/itasc/source/blender/editors/space_image/image_buttons.c branches/itasc/source/blender/editors/space_image/image_ops.c branches/itasc/source/blender/editors/space_logic/logic_window.c branches/itasc/source/blender/editors/space_node/drawnode.c branches/itasc/source/blender/editors/space_node/node_draw.c branches/itasc/source/blender/editors/space_node/node_select.c branches/itasc/source/blender/editors/space_view3d/view3d_ops.c
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23302] branches/itasc/source/blender/ editors: iTaSC: Update scons+cmake
Revision: 23302 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23302 Author: ben2610 Date: 2009-09-17 14:54:48 +0200 (Thu, 17 Sep 2009) Log Message: --- iTaSC: Update scons+cmake Modified Paths: -- branches/itasc/source/blender/editors/CMakeLists.txt branches/itasc/source/blender/editors/object/Makefile branches/itasc/source/blender/editors/object/SConscript Modified: branches/itasc/source/blender/editors/CMakeLists.txt === --- branches/itasc/source/blender/editors/CMakeLists.txt2009-09-17 11:59:32 UTC (rev 23301) +++ branches/itasc/source/blender/editors/CMakeLists.txt2009-09-17 12:54:48 UTC (rev 23302) @@ -40,6 +40,7 @@ ../nodes ../gpu ../blenfont + ../ikplugin ) IF(WITH_GAMEENGINE) Modified: branches/itasc/source/blender/editors/object/Makefile === --- branches/itasc/source/blender/editors/object/Makefile 2009-09-17 11:59:32 UTC (rev 23301) +++ branches/itasc/source/blender/editors/object/Makefile 2009-09-17 12:54:48 UTC (rev 23302) @@ -47,6 +47,7 @@ CPPFLAGS += -I../../makesrna CPPFLAGS += -I../../python CPPFLAGS += -I../../imbuf +CPPFLAGS += -I../../ikplugin # own include Modified: branches/itasc/source/blender/editors/object/SConscript === --- branches/itasc/source/blender/editors/object/SConscript 2009-09-17 11:59:32 UTC (rev 23301) +++ branches/itasc/source/blender/editors/object/SConscript 2009-09-17 12:54:48 UTC (rev 23302) @@ -6,7 +6,7 @@ incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc' incs += ' #/intern/guardedalloc' -incs += ' ../../makesrna ../../python' +incs += ' ../../makesrna ../../python ../../ikplugin' defs = [] ___ 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 [23303] branches/soc-2009-jaguarandi/ source/blender: * converted raytrace visibility test on meshlaplacian. c to new raytrace API
Revision: 23303 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23303 Author: jaguarandi Date: 2009-09-17 14:56:16 +0200 (Thu, 17 Sep 2009) Log Message: --- * converted raytrace visibility test on meshlaplacian.c to new raytrace API I need test scenes and test instructions to make sure this is ok, since i have no idea how to test this feature. Modified Paths: -- branches/soc-2009-jaguarandi/source/blender/editors/armature/meshlaplacian.c branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h branches/soc-2009-jaguarandi/source/blender/render/intern/include/rayobject.h branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject.c Modified: branches/soc-2009-jaguarandi/source/blender/editors/armature/meshlaplacian.c === --- branches/soc-2009-jaguarandi/source/blender/editors/armature/meshlaplacian.c 2009-09-17 12:54:48 UTC (rev 23302) +++ branches/soc-2009-jaguarandi/source/blender/editors/armature/meshlaplacian.c 2009-09-17 12:56:16 UTC (rev 23303) @@ -30,7 +30,6 @@ #include math.h #include string.h -#include assert.h #include MEM_guardedalloc.h @@ -107,7 +106,8 @@ float *mindist; /* minimum distance to a bone for all vertices */ RayObject *raytree; /* ray tracing acceleration structure */ - MFace **vface; /* a face that the vertex belongs to */ + RayFace *faces; /* faces to add to the ray tracing struture */ + MFace **vface; /* a face that the vertex belongs to */ } heat; #ifdef RIGID_DEFORM @@ -398,14 +398,25 @@ static void heat_ray_tree_create(LaplacianSystem *sys) { Mesh *me = sys-heat.mesh; - MFace *mface; int a; - assert(0); //TODO - //sys-heat.raytree = RE_rayobject_mesh_create(me, me); + sys-heat.raytree = RE_rayobject_vbvh_create(me-totface); + sys-heat.faces = MEM_callocN(sizeof(RayFace)*me-totface, Heat RayFaces); + sys-heat.vface = MEM_callocN(sizeof(MFace*)*me-totvert, HeatVFaces); - sys-heat.vface = MEM_callocN(sizeof(MFace*)*me-totvert, HeatVFaces); - for(a=0, mface=me-mface; ame-totface; a++, mface++) { + for(a=0; ame-totface; a++) { + + MFace *mface = me-mface+a; + RayFace *rayface = sys-heat.faces+a; + + RayObject *obj = RE_rayface_from_coords( + rayface, me, mface, + sys-heat.verts[mface-v1], sys-heat.verts[mface-v2], + sys-heat.verts[mface-v3], mface-v4 ? sys-heat.verts[mface-v4] : 0 + ); + RE_rayobject_add(sys-heat.raytree, obj); + + //Setup inverse pointers to use on isect.orig sys-heat.vface[mface-v1]= mface; sys-heat.vface[mface-v2]= mface; sys-heat.vface[mface-v3]= mface; @@ -420,7 +431,6 @@ float end[3]; int visible; - assert( 0 ); mface= sys-heat.vface[vertex]; if(!mface) return 1; @@ -429,23 +439,18 @@ memset(isec, 0, sizeof(isec)); isec.mode= RE_RAY_SHADOW; isec.lay= -1; + isec.orig.ob = sys-heat.mesh; isec.orig.face = mface; isec.skip = RE_SKIP_CULLFACE; + VECCOPY(isec.start, sys-heat.verts[vertex]); PclosestVL3Dfl(end, isec.start, sys-heat.root[bone], sys-heat.tip[bone]); VECSUB(isec.vec, end, isec.start); - isec.labda = 1.0f; + isec.labda = 1.0f - 1e-5; + VECADDFAC( isec.start, isec.start, isec.vec, 1e-5); -#if 0 - TODO - /* add an extra offset to the start position to avoid self intersection */ - VECCOPY(dir, isec.vec); - Normalize(dir); - VecMulf(dir, 1e-5); - VecAddf(isec.start, isec.start, dir); -#endif visible= !RE_rayobject_raycast(sys-heat.raytree, isec); return visible; @@ -712,6 +717,7 @@ RE_rayobject_free(sys-heat.raytree); MEM_freeN(sys-heat.vface); + MEM_freeN(sys-heat.faces); MEM_freeN(sys-heat.mindist); MEM_freeN(sys-heat.H); Modified: branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h === --- branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h 2009-09-17 12:54:48 UTC (rev 23302) +++ branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h 2009-09-17 12:56:16 UTC (rev 23303) @@ -79,6 +79,28 @@ RayObject* RE_rayobject_bih_create(int size); /* rayobject_bih.c */
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23304] branches/itasc/source/blender/ ikplugin/intern/itasc_plugin.cpp: iTaSC: fix linux compile
Revision: 23304 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23304 Author: ben2610 Date: 2009-09-17 15:47:58 +0200 (Thu, 17 Sep 2009) Log Message: --- iTaSC: fix linux compile Modified Paths: -- branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp Modified: branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp === --- branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp 2009-09-17 12:56:16 UTC (rev 23303) +++ branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp 2009-09-17 13:47:58 UTC (rev 23304) @@ -83,6 +83,8 @@ typedef float Vector4[4]; struct IK_Target; typedef void (*ErrorCallback)(const iTaSC::ConstraintValues* values, unsigned int nvalues, IK_Target* iktarget); +// For some reason, gcc doesn't find the declaration of this function in linux +void KDL::SetToZero(JntArray array); // one structure for each target in the scene struct IK_Target ___ 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 [23305] trunk/blender: UI: fix display of shape key list to show with no items,
Revision: 23305 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23305 Author: blendix Date: 2009-09-17 16:35:08 +0200 (Thu, 17 Sep 2009) Log Message: --- UI: fix display of shape key list to show with no items, list template should also accept None. Modified Paths: -- trunk/blender/release/ui/buttons_data_mesh.py trunk/blender/source/blender/makesrna/intern/rna_ui_api.c Modified: trunk/blender/release/ui/buttons_data_mesh.py === --- trunk/blender/release/ui/buttons_data_mesh.py 2009-09-17 13:47:58 UTC (rev 23304) +++ trunk/blender/release/ui/buttons_data_mesh.py 2009-09-17 14:35:08 UTC (rev 23305) @@ -102,8 +102,7 @@ kb = ob.active_shape_key row = layout.row() - if key: # XXX - looks crappy - row.template_list(key, keys, ob, active_shape_key_index, rows=2) + row.template_list(key, keys, ob, active_shape_key_index, rows=2) col = row.column() Modified: trunk/blender/source/blender/makesrna/intern/rna_ui_api.c === --- trunk/blender/source/blender/makesrna/intern/rna_ui_api.c 2009-09-17 13:47:58 UTC (rev 23304) +++ trunk/blender/source/blender/makesrna/intern/rna_ui_api.c 2009-09-17 14:35:08 UTC (rev 23305) @@ -301,7 +301,10 @@ func= RNA_def_function(srna, template_list, uiTemplateList); RNA_def_function_flag(func, FUNC_USE_CONTEXT); - api_ui_item_rna_common(func); + parm= RNA_def_pointer(func, data, AnyType, , Data from which to take property.); + RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); + parm= RNA_def_string(func, property, , 0, , Identifier of property in data.); + RNA_def_property_flag(parm, PROP_REQUIRED); parm= RNA_def_pointer(func, active_data, AnyType, , Data from which to take property for the active element.); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); parm= RNA_def_string(func, active_property, , 0, , Identifier of property in data, for the active element.); ___ 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 [23306] trunk/blender/source/blender/ editors/interface/interface_handlers.c: Fix #19371: vertex group dropdown crash, own fault in commit yesterday.
Revision: 23306 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23306 Author: blendix Date: 2009-09-17 16:37:08 +0200 (Thu, 17 Sep 2009) Log Message: --- Fix #19371: vertex group dropdown crash, own fault in commit yesterday. Modified Paths: -- trunk/blender/source/blender/editors/interface/interface_handlers.c Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c === --- trunk/blender/source/blender/editors/interface/interface_handlers.c 2009-09-17 14:35:08 UTC (rev 23305) +++ trunk/blender/source/blender/editors/interface/interface_handlers.c 2009-09-17 14:37:08 UTC (rev 23306) @@ -246,7 +246,7 @@ if(but-func || but-funcN || block-handle_func || but-rename_func || (but-type == BUTM block-butm_func) || but-optype || but-rnaprop) { after= MEM_callocN(sizeof(uiAfterFunc), uiAfterFunc); - if(ELEM(but, but-func_arg1, but-func_arg2)) { + if(but-func ELEM(but, but-func_arg1, but-func_arg2)) { /* exception, this will crash due to removed button otherwise */ but-func(C, but-func_arg1, but-func_arg2); } ___ 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 [23307] trunk/blender/source/blender: Warning fixes for blenkernel and editors.
Revision: 23307 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23307 Author: blendix Date: 2009-09-17 16:46:22 +0200 (Thu, 17 Sep 2009) Log Message: --- Warning fixes for blenkernel and editors. Note sure what to do with this one, and personally think we should avoid using macros for this kind of thing: V_GROW(edges); source/blender/editors/mesh/loopcut.c:232: warning: value computed is not used Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/fcurve.c trunk/blender/source/blender/blenkernel/intern/implicit.c trunk/blender/source/blender/blenkernel/intern/modifier.c trunk/blender/source/blender/blenkernel/intern/object.c trunk/blender/source/blender/blenkernel/intern/particle.c trunk/blender/source/blender/blenkernel/intern/particle_system.c trunk/blender/source/blender/blenkernel/intern/text.c trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c trunk/blender/source/blender/editors/mesh/editmesh_tools.c trunk/blender/source/blender/editors/mesh/loopcut.c trunk/blender/source/blender/editors/object/object_select.c trunk/blender/source/blender/editors/physics/editparticle.c trunk/blender/source/blender/editors/preview/previewrender.c trunk/blender/source/blender/editors/space_image/image_draw.c trunk/blender/source/blender/editors/space_view3d/drawvolume.c trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c trunk/blender/source/blender/makesrna/intern/rna_pose.c trunk/blender/source/blender/render/intern/source/volumetric.c Modified: trunk/blender/source/blender/blenkernel/intern/fcurve.c === --- trunk/blender/source/blender/blenkernel/intern/fcurve.c 2009-09-17 14:37:08 UTC (rev 23306) +++ trunk/blender/source/blender/blenkernel/intern/fcurve.c 2009-09-17 14:46:22 UTC (rev 23307) @@ -1026,6 +1026,7 @@ } } +#if 0 static void berekenx (float *f, float *o, int b) { float t, c0, c1, c2, c3; @@ -1041,6 +1042,7 @@ o[a]= c0 + t*c1 + t*t*c2 + t*t*t*c3; } } +#endif /* -- */ Modified: trunk/blender/source/blender/blenkernel/intern/implicit.c === --- trunk/blender/source/blender/blenkernel/intern/implicit.c 2009-09-17 14:37:08 UTC (rev 23306) +++ trunk/blender/source/blender/blenkernel/intern/implicit.c 2009-09-17 14:46:22 UTC (rev 23307) @@ -496,6 +496,7 @@ // SPARSE SYMMETRIC big matrix with 3x3 matrix entries /// /* printf a big matrix on console: for debug output */ +#if 0 static void print_bfmatrix(fmatrix3x3 *m3) { unsigned int i = 0; @@ -505,6 +506,8 @@ print_fmatrix(m3[i].m); } } +#endif + /* create big matrix */ DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs) { @@ -1417,7 +1420,6 @@ int i = 0; int j = 0; int k = 0; - lfVector temp; INIT_MINMAX(gmin, gmax); Modified: trunk/blender/source/blender/blenkernel/intern/modifier.c === --- trunk/blender/source/blender/blenkernel/intern/modifier.c 2009-09-17 14:37:08 UTC (rev 23306) +++ trunk/blender/source/blender/blenkernel/intern/modifier.c 2009-09-17 14:46:22 UTC (rev 23307) @@ -8503,6 +8503,7 @@ mti-initData = smoothModifier_initData; mti-copyData = smoothModifier_copyData; mti-requiredDataMask = smoothModifier_requiredDataMask; + mti-isDisabled = smoothModifier_isDisabled; mti-deformVerts = smoothModifier_deformVerts; mti-deformVertsEM = smoothModifier_deformVertsEM; @@ -8513,6 +8514,7 @@ mti-initData = castModifier_initData; mti-copyData = castModifier_copyData; mti-requiredDataMask = castModifier_requiredDataMask; + mti-isDisabled = castModifier_isDisabled; mti-foreachObjectLink = castModifier_foreachObjectLink; mti-updateDepgraph = castModifier_updateDepgraph; mti-deformVerts = castModifier_deformVerts; @@ -9137,19 +9139,6 @@ return i; } -static int modifiers_usesPointCache(Object *ob) -{ - ModifierData *md = ob-modifiers.first; - - for (; md; md=md-next) { - ModifierTypeInfo *mti = modifierType_getInfo(md-type); - if (mti-flags eModifierTypeFlag_UsesPointCache) { - return 1; - } - } - return 0; -} - void modifier_freeTemporaryData(ModifierData *md) { if(md-type == eModifierType_Armature) { Modified: trunk/blender/source/blender/blenkernel/intern/object.c ===
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23308] trunk/blender/source/blender: Wrapped some more Nodes:
Revision: 23308 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23308 Author: dingto Date: 2009-09-17 17:06:03 +0200 (Thu, 17 Sep 2009) Log Message: --- Wrapped some more Nodes: * Composite: Flip, Crop, Map UV, Lens Distortion. Modified Paths: -- trunk/blender/source/blender/editors/space_node/drawnode.c trunk/blender/source/blender/makesrna/intern/rna_nodetree.c Modified: trunk/blender/source/blender/editors/space_node/drawnode.c === --- trunk/blender/source/blender/editors/space_node/drawnode.c 2009-09-17 14:46:22 UTC (rev 23307) +++ trunk/blender/source/blender/editors/space_node/drawnode.c 2009-09-17 15:06:03 UTC (rev 23308) @@ -1409,27 +1409,19 @@ /* qdn: lens distortion node */ static void node_composit_buts_lensdist(uiLayout *layout, PointerRNA *ptr) { - uiBlock *block= uiLayoutFreeBlock(layout); + uiLayout *row, *col; + bNode *node= ptr-data; - rctf *butr= node-butr; NodeLensDist *nld = node-storage; - short dy = butr-ymin + 19, dx = butr-xmax - butr-xmin; - uiBlockBeginAlign(block); - uiDefButS(block, TOG, B_NODE_EXEC, Projector, - butr-xmin, dy, dx, 19, - nld-proj, 0, 0, 0, 0, - Enable/disable projector mode, effect is applied in horizontal direction only); + + col= uiLayoutColumn(layout, 1); + + uiItemR(col, NULL, 0, ptr, projector, UI_ITEM_R_TOGGLE); if (!nld-proj) { - uiDefButS(block, TOG, B_NODE_EXEC, Jitter, - butr-xmin, dy-19, dx/2, 19, - nld-jit, 0, 0, 0, 0, - Enable/disable jittering, faster, but also noisier); - uiDefButS(block, TOG, B_NODE_EXEC, Fit, - butr-xmin+dx/2, dy-19, dx/2, 19, - nld-fit, 0, 0, 0, 0, - For positive distortion factor only, scale image such that black areas are not visible); + row= uiLayoutRow(col, 0); + uiItemR(row, NULL, 0, ptr, jitter, UI_ITEM_R_TOGGLE); + uiItemR(row, NULL, 0, ptr, fit, UI_ITEM_R_TOGGLE); } - uiBlockEndAlign(block); } @@ -1454,59 +1446,24 @@ static void node_composit_buts_flip(uiLayout *layout, PointerRNA *ptr) { - uiBlock *block= uiLayoutFreeBlock(layout); - bNode *node= ptr-data; - rctf *butr= node-butr; - uiBut *bt; - - /* flip x\y */ - bt=uiDefButS(block, MENU, B_NODE_EXEC, Flip X %x0|Flip Y %x1|Flip X Y %x2, -butr-xmin, butr-ymin, butr-xmax-butr-xmin, 20, -node-custom1, 0, 0, 0, 0, ); - uiButSetFunc(bt, node_but_title_cb, node, bt); + uiItemR(layout, , 0, ptr, axis, 0); } static void node_composit_buts_crop(uiLayout *layout, PointerRNA *ptr) { - uiBlock *block= uiLayoutFreeBlock(layout); - bNode *node= ptr-data; - rctf *butr= node-butr; - NodeTwoXYs *ntxy= node-storage; - char elementheight = 19; - short dx= (butr-xmax-butr-xmin)/2; - short dy= butr-ymax - elementheight; - short xymin= 0, xymax= 1; - - uiBlockBeginAlign(block); - - /* crop image size toggle */ - uiDefButS(block, TOG, B_NODE_EXEC, Crop Image Size, - butr-xmin, dy, dx*2, elementheight, - node-custom1, 0, 0, 0, 0, Crop the size of the input image.); - - dy-=elementheight; - - /* x1 */ - uiDefButS(block, NUM, B_NODE_EXEC, X1:, -butr-xmin, dy, dx, elementheight, -ntxy-x1, xymin, xymax, 0, 0, ); - /* y1 */ - uiDefButS(block, NUM, B_NODE_EXEC, Y1:, -butr-xmin+dx, dy, dx, elementheight, -ntxy-y1, xymin, xymax, 0, 0, ); - - dy-=elementheight; - - /* x2 */ - uiDefButS(block, NUM, B_NODE_EXEC, X2:, -butr-xmin, dy, dx, elementheight, -ntxy-x2, xymin, xymax, 0, 0, ); - /* y2 */ - uiDefButS(block, NUM, B_NODE_EXEC, Y2:, -butr-xmin+dx, dy, dx, elementheight, -ntxy-y2, xymin, xymax, 0, 0, ); - - uiBlockEndAlign(block); + uiLayout *row, *col; + + col= uiLayoutColumn(layout, 1); + + uiItemR(col, NULL, 0, ptr, crop_size, UI_ITEM_R_TOGGLE); + + row= uiLayoutRow(col, 0); + uiItemR(row, NULL, 0, ptr, x1, 0); + uiItemR(row, NULL, 0, ptr, y1, 0); + + row= uiLayoutRow(col, 0); + uiItemR(row, NULL, 0, ptr, x2, 0); + uiItemR(row, NULL, 0, ptr, y2, 0); } static
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23309] branches/blender2.4/SConstruct: building scons blenderlite would fail when building the player
Revision: 23309 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23309 Author: campbellbarton Date: 2009-09-17 17:35:25 +0200 (Thu, 17 Sep 2009) Log Message: --- building scons blenderlite would fail when building the player Modified Paths: -- branches/blender2.4/SConstruct Modified: branches/blender2.4/SConstruct === --- branches/blender2.4/SConstruct 2009-09-17 15:06:03 UTC (rev 23308) +++ branches/blender2.4/SConstruct 2009-09-17 15:35:25 UTC (rev 23309) @@ -264,6 +264,7 @@ if 'blenderlite' in B.targets: target_env_defs = {} target_env_defs['WITH_BF_GAMEENGINE'] = False + target_env_defs['WITH_BF_PLAYER'] = False target_env_defs['WITH_BF_OPENAL'] = False target_env_defs['WITH_BF_OPENEXR'] = False target_env_defs['WITH_BF_ICONV'] = False ___ 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 [23310] branches/blender2.4/intern/ghost/ intern/GHOST_WindowX11.cpp: backport Nicholas Bishop's 2. 5 commit from r22581, stylus fails on ubuntu 9.10
Revision: 23310 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23310 Author: campbellbarton Date: 2009-09-17 18:17:32 +0200 (Thu, 17 Sep 2009) Log Message: --- backport Nicholas Bishop's 2.5 commit from r22581, stylus fails on ubuntu 9.10 without this. Modified Paths: -- branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp Modified: branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp === --- branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-17 15:35:25 UTC (rev 23309) +++ branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-17 16:17:32 UTC (rev 23310) @@ -42,6 +42,9 @@ #include cstring #include cstdio +#include algorithm +#include string + // For obscure full screen mode stuuf // lifted verbatim from blut. @@ -441,7 +444,20 @@ old_handler = XSetErrorHandler(ApplicationErrorHandler) ; for(int i=0; idevice_count; ++i) { - if(!strcasecmp(device_info[i].name, stylus)) { + std::string type = ; + + if(device_info[i].type) { + const char *orig = XGetAtomName(m_display, device_info[i].type); + // Make a copy so we can convert to lower case + if(orig) { + type = orig; + XFree((void*)orig); + std::transform(type.begin(), type.end(), type.begin(), ::tolower); + } + } + + + if(type.find(stylus) != std::string::npos) { m_xtablet.StylusID= device_info[i].id; m_xtablet.StylusDevice = XOpenDevice(m_display, m_xtablet.StylusID); @@ -466,7 +482,7 @@ m_xtablet.StylusID= 0; } } - if(!strcasecmp(device_info[i].name, eraser)) { + if(type.find(eraser) != std::string::npos) { m_xtablet.EraserID= device_info[i].id; m_xtablet.EraserDevice = XOpenDevice(m_display, m_xtablet.EraserID); if (m_xtablet.EraserDevice == NULL) m_xtablet.EraserID= 0; @@ -622,7 +638,7 @@ GHOST_TInt32 outX, GHOST_TInt32 outY ) const { - // not sure about this one! + // This is correct! int ax,ay; Window temp; ___ 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 [23311] trunk/blender: -Added Loop Cut to toolbar
Revision: 23311 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23311 Author: billrey Date: 2009-09-17 18:47:04 +0200 (Thu, 17 Sep 2009) Log Message: --- -Added Loop Cut to toolbar -Adjusted some UV Editor panels slightly -Made a few nodes clearer. The Crop node was especially confusing. Modified Paths: -- trunk/blender/release/ui/space_image.py trunk/blender/release/ui/space_view3d_toolbar.py trunk/blender/source/blender/editors/space_node/drawnode.c trunk/blender/source/blender/makesrna/intern/rna_image.c Modified: trunk/blender/release/ui/space_image.py === --- trunk/blender/release/ui/space_image.py 2009-09-17 16:17:32 UTC (rev 23310) +++ trunk/blender/release/ui/space_image.py 2009-09-17 16:47:04 UTC (rev 23311) @@ -314,13 +314,7 @@ split = layout.split() col = split.column() - col.itemR(ima, clamp_x) - col.itemR(ima, clamp_y) - col.itemR(ima, mapping, expand=True) - col.itemR(ima, tiles) - - col = split.column() - + sub = col.column(align=True) sub.itemR(ima, animated) @@ -329,12 +323,22 @@ subsub.itemR(ima, animation_start, text=Start) subsub.itemR(ima, animation_end, text=End) subsub.itemR(ima, animation_speed, text=Speed) - - sub = col.row(align=True) + + col.itemR(ima, tiles) + sub = col.column(align=True) sub.active = ima.tiles or ima.animated sub.itemR(ima, tiles_x, text=X) sub.itemR(ima, tiles_y, text=Y) + + col = split.column() + col.itemL(text=Clamp:) + col.itemR(ima, clamp_x, text=X) + col.itemR(ima, clamp_y, text=Y) + col.itemS() + col.itemR(ima, mapping, expand=True) + + class IMAGE_PT_view_properties(bpy.types.Panel): __space_type__ = 'IMAGE_EDITOR' __region_type__ = 'UI' @@ -368,7 +372,9 @@ col.itemR(uvedit, normalized_coordinates, text=Normalized) if show_uvedit: + col = layout.column() + col.itemL(text=UVs:) row = col.row() row.itemR(uvedit, edge_draw_type, expand=True) Modified: trunk/blender/release/ui/space_view3d_toolbar.py === --- trunk/blender/release/ui/space_view3d_toolbar.py2009-09-17 16:17:32 UTC (rev 23310) +++ trunk/blender/release/ui/space_view3d_toolbar.py2009-09-17 16:47:04 UTC (rev 23311) @@ -67,8 +67,8 @@ col = layout.column(align=True) col.itemL(text=Modeling:) col.itemO(mesh.extrude) - col.itemO(mesh.extrude_repeat, text=Extrude Repeat) col.itemO(mesh.subdivide) + col.itemO(mesh.loopcut) col.itemO(mesh.spin) col.itemO(mesh.screw) col.itemO(mesh.merge) Modified: trunk/blender/source/blender/editors/space_node/drawnode.c === --- trunk/blender/source/blender/editors/space_node/drawnode.c 2009-09-17 16:17:32 UTC (rev 23310) +++ trunk/blender/source/blender/editors/space_node/drawnode.c 2009-09-17 16:47:04 UTC (rev 23311) @@ -1414,14 +1414,15 @@ bNode *node= ptr-data; NodeLensDist *nld = node-storage; - col= uiLayoutColumn(layout, 1); + col= uiLayoutColumn(layout, 0); - uiItemR(col, NULL, 0, ptr, projector, UI_ITEM_R_TOGGLE); + uiItemR(col, NULL, 0, ptr, projector, 0); if (!nld-proj) { - row= uiLayoutRow(col, 0); - uiItemR(row, NULL, 0, ptr, jitter, UI_ITEM_R_TOGGLE); - uiItemR(row, NULL, 0, ptr, fit, UI_ITEM_R_TOGGLE); + col = uiLayoutColumn(col, 0); + uiItemR(col, NULL, 0, ptr, jitter, 0); + uiItemR(col, NULL, 0, ptr, fit, 0); } +// uiLayoutSetActive(col, RNA_boolean_get(imaptr, projector)); } @@ -1431,9 +1432,13 @@ col= uiLayoutColumn(layout, 1); uiItemR(col, NULL, 0, ptr, samples, 0); - uiItemR(col, NULL, 0, ptr, min_speed, 0); - uiItemR(col, NULL, 0, ptr, max_speed, 0); uiItemR(col, Blur, 0, ptr, factor, 0); + + col= uiLayoutColumn(layout, 1); + uiItemL(col, Speed:, 0); + uiItemR(col, Min, 0, ptr, min_speed, 0); + uiItemR(col, Max, 0, ptr, max_speed, 0); + col= uiLayoutColumn(layout, 0); uiItemR(col, NULL, 0, ptr, curved, 0); @@ -1455,15 +1460,13 @@
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23312] trunk/blender/source/blender/ editors/space_node/drawnode.c: 2.5: Adding a crop node caused crash, wrong layout deceleration was used.
Revision: 23312 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23312 Author: dingto Date: 2009-09-17 19:31:50 +0200 (Thu, 17 Sep 2009) Log Message: --- 2.5: Adding a crop node caused crash, wrong layout deceleration was used. Modified Paths: -- trunk/blender/source/blender/editors/space_node/drawnode.c Modified: trunk/blender/source/blender/editors/space_node/drawnode.c === --- trunk/blender/source/blender/editors/space_node/drawnode.c 2009-09-17 16:47:04 UTC (rev 23311) +++ trunk/blender/source/blender/editors/space_node/drawnode.c 2009-09-17 17:31:50 UTC (rev 23312) @@ -1409,7 +1409,7 @@ /* qdn: lens distortion node */ static void node_composit_buts_lensdist(uiLayout *layout, PointerRNA *ptr) { - uiLayout *row, *col; + uiLayout *col; bNode *node= ptr-data; NodeLensDist *nld = node-storage; @@ -1456,17 +1456,17 @@ static void node_composit_buts_crop(uiLayout *layout, PointerRNA *ptr) { - uiLayout *row, *col; + uiLayout *col; col= uiLayoutColumn(layout, 1); uiItemR(col, NULL, 0, ptr, crop_size, 0); col= uiLayoutColumn(layout, 1); - uiItemR(row, Left, 0, ptr, x1, 0); - uiItemR(row, Right, 0, ptr, x2, 0); - uiItemR(row, Up, 0, ptr, y1, 0); - uiItemR(row, Down, 0, ptr, y2, 0); + uiItemR(col, Left, 0, ptr, x1, 0); + uiItemR(col, Right, 0, ptr, x2, 0); + uiItemR(col, Up, 0, ptr, y1, 0); + uiItemR(col, Down, 0, ptr, y2, 0); } static void node_composit_buts_splitviewer(uiLayout *layout, PointerRNA *ptr) ___ 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 [23313] trunk/blender: -Shuffled some user prefs around to make better use of the available space in Preferences .
Revision: 23313 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23313 Author: billrey Date: 2009-09-17 19:42:08 +0200 (Thu, 17 Sep 2009) Log Message: --- -Shuffled some user prefs around to make better use of the available space in Preferences. -Temporarily disabled the Themes tab until we figure out how to manage themes properly. Modified Paths: -- trunk/blender/release/ui/space_userpref.py trunk/blender/source/blender/makesrna/intern/rna_userdef.c Modified: trunk/blender/release/ui/space_userpref.py === --- trunk/blender/release/ui/space_userpref.py 2009-09-17 17:31:50 UTC (rev 23312) +++ trunk/blender/release/ui/space_userpref.py 2009-09-17 17:42:08 UTC (rev 23313) @@ -1,4 +1,4 @@ - + import bpy class USERPREF_HT_header(bpy.types.Header): @@ -195,7 +195,7 @@ sub1 = sub.column() sub1.itemL(text=Keyframing:) sub1.itemR(edit, use_visual_keying) - sub1.itemR(edit, new_interpolation_type) + sub1.itemR(edit, new_interpolation_type, text=New F-Curves) sub1.itemS() sub1.itemR(edit, auto_keying_enable, text=Auto Keyframing) sub2 = sub1.column() @@ -203,13 +203,16 @@ sub2.row().itemR(edit, auto_keying_mode, expand=True) sub2.itemR(edit, auto_keyframe_insert_available, text=Only Insert Available) sub2.itemR(edit, auto_keyframe_insert_needed, text=Only Insert Needed) + sub1.itemS() sub1.itemS() sub1.itemS() + sub1.itemL(text=Undo:) sub1.itemR(edit, global_undo) sub1.itemR(edit, undo_steps, text=Steps) sub1.itemR(edit, undo_memory_limit, text=Memory Limit) + sub1.itemS() sub1.itemS() sub1.itemS() @@ -218,7 +221,7 @@ sub = col.split(percentage=0.85) sub1 = sub.column() - sub1.itemL(text=Duplicate:) + sub1.itemL(text=Duplicate Data:) sub1.itemR(edit, duplicate_mesh, text=Mesh) sub1.itemR(edit, duplicate_surface, text=Surface) sub1.itemR(edit, duplicate_curve, text=Curve) @@ -246,63 +249,64 @@ userpref = context.user_preferences system = userpref.system - lan = userpref.language split = layout.split() col = split.column() - sub = col.split(percentage=0.85) + sub = col.split(percentage=0.9) sub1 = sub.column() - sub1.itemR(system, emulate_numpad) + sub1.itemL(text=General:) + sub1.itemR(system, dpi) + sub1.itemR(system, frame_server_port) + sub1.itemR(system, scrollback, text=Console Scrollback) + sub1.itemR(system, emulate_numpad) + sub1.itemR(system, auto_run_python_scripts) + sub1.itemS() sub1.itemS() + sub1.itemS() - #Weight Colors + sub1.itemL(text=Sound:) + sub1.row().itemR(system, audio_device, expand=True) + sub2 = sub1.column() + sub2.active = system.audio_device != 'AUDIO_DEVICE_NULL' + sub2.itemR(system, enable_all_codecs) + sub2.itemR(system, game_sound) + sub2.itemR(system, audio_channels, text=Channels) + sub2.itemR(system, audio_mixing_buffer, text=Mixing Buffer) + sub2.itemR(system, audio_sample_rate, text=Sample Rate) + sub2.itemR(system, audio_sample_format, text=Sample Format) + + col = split.column() + sub = col.split(percentage=0.9) + + sub1 = sub .column() sub1.itemL(text=Weight Colors:) sub1.itemR(system, use_weight_color_range, text=Use Custom Range) - sub2 = sub1.column() sub2.active = system.use_weight_color_range sub2.template_color_ramp(system, weight_color_range, expand=True) + sub1.itemS() sub1.itemS() + sub1.itemS() - #sequencer - sub1.itemL(text=Sequencer:) - sub1.itemR(system, prefetch_frames) - sub1.itemR(system, memory_cache_limit) + sub1.itemR(system, language) + sub1.itemL(text=Translate:) + sub1.itemR(system, translate_tooltips, text=Tooltips) +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23314] trunk/blender/source/blender/ makesrna/intern/rna_userdef.c: Forgot to delete unused code.
Revision: 23314 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23314 Author: billrey Date: 2009-09-17 19:44:54 +0200 (Thu, 17 Sep 2009) Log Message: --- Forgot to delete unused code. Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_userdef.c Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c === --- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2009-09-17 17:42:08 UTC (rev 23313) +++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2009-09-17 17:44:54 UTC (rev 23314) @@ -1959,87 +1959,6 @@ RNA_def_property_ui_text(prop, Duplicate Particle, Causes particle systems to be duplicated with the object.); } -static void rna_def_userdef_language(BlenderRNA *brna) -{ - PropertyRNA *prop; - StructRNA *srna; - - /* hardcoded here, could become dynamic somehow */ - static EnumPropertyItem language_items[] = { - {0, ENGLISH, 0, English, }, - {1, JAPANESE, 0, Japanese, }, - {2, DUTCH, 0, Dutch, }, - {3, ITALIAN, 0, Italian, }, - {4, GERMAN, 0, German, }, - {5, FINNISH, 0, Finnish, }, - {6, SWEDISH, 0, Swedish, }, - {7, FRENCH, 0, French, }, - {8, SPANISH, 0, Spanish, }, - {9, CATALAN, 0, Catalan, }, - {10, CZECH, 0, Czech, }, - {11, BRAZILIAN_PORTUGUESE, 0, Brazilian Portuguese, }, - {12, SIMPLIFIED_CHINESE, 0, Simplified Chinese, }, - {13, RUSSIAN, 0, Russian, }, - {14, CROATIAN, 0, Croatian, }, - {15, SERBIAN, 0, Serbian, }, - {16, UKRAINIAN, 0, Ukrainian, }, - {17, POLISH, 0, Polish, }, - {18, ROMANIAN, 0, Romanian, }, - {19, ARABIC, 0, Arabic, }, - {20, BULGARIAN, 0, Bulgarian, }, - {21, GREEK, 0, Greek, }, - {22, KOREAN, 0, Korean, }, - {0, NULL, 0, NULL, NULL}}; - - srna= RNA_def_struct(brna, UserPreferencesLanguage, NULL); - RNA_def_struct_sdna(srna, UserDef); - RNA_def_struct_nested(brna, srna, UserPreferences); - RNA_def_struct_ui_text(srna, Language Font, User interface translation settings.); - - prop= RNA_def_property(srna, international_fonts, PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, transopts, USER_DOTRANSLATE); - RNA_def_property_ui_text(prop, International Fonts, Use international fonts.); - RNA_def_property_update(prop, 0, rna_userdef_update); - - prop= RNA_def_property(srna, dpi, PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, dpi); - RNA_def_property_range(prop, 48, 128); - RNA_def_property_ui_text(prop, DPI, Font size and resolution for display.); - RNA_def_property_update(prop, 0, rna_userdef_update); - - prop= RNA_def_property(srna, scrollback, PROP_INT, PROP_UNSIGNED); - RNA_def_property_int_sdna(prop, NULL, scrollback); - RNA_def_property_range(prop, 32, 32768); - RNA_def_property_ui_text(prop, Scrollback, Maximum number of lines to store for the console buffer.); - - /* Language Selection */ - - prop= RNA_def_property(srna, language, PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, language_items); - RNA_def_property_ui_text(prop, Language, Language use for translation.); - RNA_def_property_update(prop, 0, rna_userdef_update); - - prop= RNA_def_property(srna, translate_tooltips, PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, transopts, USER_TR_TOOLTIPS); - RNA_def_property_ui_text(prop, Translate Tooltips, Translate Tooltips.); - RNA_def_property_update(prop, 0, rna_userdef_update); - - prop= RNA_def_property(srna, translate_buttons, PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, transopts, USER_TR_BUTTONS); - RNA_def_property_ui_text(prop, Translate Buttons, Translate button labels.); - RNA_def_property_update(prop, 0, rna_userdef_update); - - prop= RNA_def_property(srna, translate_toolbox, PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, transopts, USER_TR_MENUS); - RNA_def_property_ui_text(prop, Translate Toolbox, Translate toolbox menu.); - RNA_def_property_update(prop, 0, rna_userdef_update); - - prop= RNA_def_property(srna, use_textured_fonts, PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, transopts, USER_USETEXTUREFONT); - RNA_def_property_ui_text(prop, Textured Fonts, Use textures for drawing international fonts.); - RNA_def_property_update(prop, 0, rna_userdef_update); -} - static void
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23315] trunk/blender/release/io/netrender : netrender:
Revision: 23315 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23315 Author: theeth Date: 2009-09-17 20:40:37 +0200 (Thu, 17 Sep 2009) Log Message: --- netrender: Disable windows' blocking crash reports in child process. (windows only) Get server port as well as ip address from master broadcast (broadcast is on a fixed port). Modified Paths: -- trunk/blender/release/io/netrender/master.py trunk/blender/release/io/netrender/operators.py trunk/blender/release/io/netrender/slave.py Modified: trunk/blender/release/io/netrender/master.py === --- trunk/blender/release/io/netrender/master.py2009-09-17 17:44:54 UTC (rev 23314) +++ trunk/blender/release/io/netrender/master.py2009-09-17 18:40:37 UTC (rev 23315) @@ -632,5 +632,5 @@ if broadcast: if time.time() - start_time = 10: # need constant here print(broadcasting address) - s.sendto(bytes(%s:%i % address, encoding='utf8'), 0, ('broadcast',address[1])) + s.sendto(bytes(%i % address[1], encoding='utf8'), 0, ('broadcast', 8000)) start_time = time.time() Modified: trunk/blender/release/io/netrender/operators.py === --- trunk/blender/release/io/netrender/operators.py 2009-09-17 17:44:54 UTC (rev 23314) +++ trunk/blender/release/io/netrender/operators.py 2009-09-17 18:40:37 UTC (rev 23315) @@ -339,14 +339,15 @@ s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) s.settimeout(30) - s.bind(('', netsettings.server_port)) + s.bind(('', 8000)) try: - buf, address = s.recvfrom(128) + buf, address = s.recvfrom(64) print(received:, buf) netsettings.server_address = address[0] + netsettings.server_port = int(str(buf, encoding='utf8')) except socket.timeout: print(no server info) Modified: trunk/blender/release/io/netrender/slave.py === --- trunk/blender/release/io/netrender/slave.py 2009-09-17 17:44:54 UTC (rev 23314) +++ trunk/blender/release/io/netrender/slave.py 2009-09-17 18:40:37 UTC (rev 23315) @@ -9,6 +9,22 @@ MAX_TIMEOUT = 10 INCREMENT_TIMEOUT = 1 +if platform.system() == 'Windows' and platform.version() = '5': # Error mode is only available on Win2k or higher, that's version 5 + import ctypes + def SetErrorMode(): + val = ctypes.windll.kernel32.SetErrorMode(0x0002) + ctypes.windll.kernel32.SetErrorMode(val | 0x0002) + return val + + def RestoreErrorMode(val): + ctypes.windll.kernel32.SetErrorMode(val) +else: + def SetErrorMode(): + return 0 + + def RestoreErrorMode(val): + pass + def slave_Info(): sysname, nodename, release, version, machine, processor = platform.uname() slave = netrender.model.RenderSlave() @@ -100,10 +116,14 @@ for frame in job.frames: print(frame, frame.number) frame_args += [-f, str(frame.number)] - + + + start_t = time.time() - process = subprocess.Popen([sys.argv[0], -b, job_full_path, -o, JOB_PREFIX + ##, -E, BLENDER_RENDER, -F, MULTILAYER] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + val = SetErrorMode() + process = subprocess.Popen([sys.argv[0], -b, job_full_path, -o, JOB_PREFIX + ##, -E, BLENDER_RENDER, -F, MULTILAYER] + frame_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + RestoreErrorMode(val) headers = {job-id:job.id, slave-id:slave_id} ___ 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 [23316] trunk/blender/source/blender: Keymaps now have a poll() function, rather than adding/removing
Revision: 23316 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23316 Author: blendix Date: 2009-09-17 23:36:02 +0200 (Thu, 17 Sep 2009) Log Message: --- Keymaps now have a poll() function, rather than adding/removing their handlers based on notifiers, which is simpler and more reliable. This fixes for example editmode or uv edit keymaps not working when creating a new 3dview or image space. Modified Paths: -- trunk/blender/source/blender/blenloader/intern/readfile.c trunk/blender/source/blender/editors/animation/anim_channels_edit.c trunk/blender/source/blender/editors/animation/anim_markers.c trunk/blender/source/blender/editors/animation/anim_ops.c trunk/blender/source/blender/editors/armature/armature_ops.c trunk/blender/source/blender/editors/curve/curve_ops.c trunk/blender/source/blender/editors/gpencil/gpencil_ops.c trunk/blender/source/blender/editors/include/ED_transform.h trunk/blender/source/blender/editors/interface/view2d_ops.c trunk/blender/source/blender/editors/mesh/mesh_ops.c trunk/blender/source/blender/editors/metaball/mball_ops.c trunk/blender/source/blender/editors/object/object_ops.c trunk/blender/source/blender/editors/physics/ed_pointcache.c trunk/blender/source/blender/editors/physics/editparticle.c trunk/blender/source/blender/editors/screen/area.c trunk/blender/source/blender/editors/screen/screen_ops.c trunk/blender/source/blender/editors/space_action/action_ops.c trunk/blender/source/blender/editors/space_action/space_action.c trunk/blender/source/blender/editors/space_buttons/space_buttons.c trunk/blender/source/blender/editors/space_console/space_console.c trunk/blender/source/blender/editors/space_file/space_file.c trunk/blender/source/blender/editors/space_graph/graph_ops.c trunk/blender/source/blender/editors/space_graph/space_graph.c trunk/blender/source/blender/editors/space_image/space_image.c trunk/blender/source/blender/editors/space_logic/space_logic.c trunk/blender/source/blender/editors/space_nla/nla_ops.c trunk/blender/source/blender/editors/space_nla/space_nla.c trunk/blender/source/blender/editors/space_node/node_ops.c trunk/blender/source/blender/editors/space_node/space_node.c trunk/blender/source/blender/editors/space_outliner/outliner_ops.c trunk/blender/source/blender/editors/space_outliner/space_outliner.c trunk/blender/source/blender/editors/space_script/script_ops.c trunk/blender/source/blender/editors/space_script/space_script.c trunk/blender/source/blender/editors/space_sequencer/sequencer_ops.c trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c trunk/blender/source/blender/editors/space_sound/space_sound.c trunk/blender/source/blender/editors/space_text/space_text.c trunk/blender/source/blender/editors/space_time/space_time.c trunk/blender/source/blender/editors/space_time/time_ops.c trunk/blender/source/blender/editors/space_view3d/space_view3d.c trunk/blender/source/blender/editors/space_view3d/view3d_ops.c trunk/blender/source/blender/editors/transform/transform_ops.c trunk/blender/source/blender/editors/uvedit/uvedit_ops.c trunk/blender/source/blender/makesdna/DNA_view3d_types.h trunk/blender/source/blender/makesdna/DNA_windowmanager_types.h trunk/blender/source/blender/windowmanager/WM_api.h trunk/blender/source/blender/windowmanager/intern/wm_event_system.c trunk/blender/source/blender/windowmanager/intern/wm_keymap.c trunk/blender/source/blender/windowmanager/intern/wm_operators.c trunk/blender/source/blender/windowmanager/intern/wm_window.c trunk/blender/source/blender/windowmanager/wm_event_system.h Modified: trunk/blender/source/blender/blenloader/intern/readfile.c === --- trunk/blender/source/blender/blenloader/intern/readfile.c 2009-09-17 18:40:37 UTC (rev 23315) +++ trunk/blender/source/blender/blenloader/intern/readfile.c 2009-09-17 21:36:02 UTC (rev 23316) @@ -4826,7 +4826,6 @@ rv3d-ri= NULL; rv3d-sms= NULL; rv3d-smooth_timer= NULL; - rv3d-lastmode= 0; } } Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c === --- trunk/blender/source/blender/editors/animation/anim_channels_edit.c 2009-09-17 18:40:37 UTC (rev 23315) +++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c 2009-09-17 21:36:02 UTC (rev 23316) @@ -1572,7 +1572,7 @@ void ED_keymap_animchannels(wmWindowManager *wm) { - ListBase *keymap = WM_keymap_listbase(wm, Animation_Channels, 0, 0); + wmKeyMap *keymap = WM_keymap_find(wm, Animation_Channels, 0, 0);
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23317] trunk/blender: Particles cleanup, optimizations and some small new stuff.
Revision: 23317 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23317 Author: jhk Date: 2009-09-18 00:00:49 +0200 (Fri, 18 Sep 2009) Log Message: --- Particles cleanup, optimizations and some small new stuff. New stuff - Bending springs for hair dynamics. Code cleanup optimization - Disabled reactor particles temporarily for cleanup, it's a clumsy system that will be replaced with something better. - Removed child seams, something better will come here too :) - Normal particle drawing data is now saved between redraws if the particles don't move between redraws. * For example rotating the 3d view is now realtime even with 1M particles. - Many random values for particles now come from a lookup table making things much faster. - Most accessed small point cache functions are now much faster as macros. - Lot's of general code cleanup. - Nothing big should have changed so if something doesn't work like it used to it's probably just a typo somewhere :) Modified Paths: -- trunk/blender/release/ui/buttons_particle.py trunk/blender/source/blender/blenkernel/BKE_boids.h trunk/blender/source/blender/blenkernel/BKE_particle.h trunk/blender/source/blender/blenkernel/intern/anim.c trunk/blender/source/blender/blenkernel/intern/boids.c trunk/blender/source/blender/blenkernel/intern/cloth.c trunk/blender/source/blender/blenkernel/intern/depsgraph.c trunk/blender/source/blender/blenkernel/intern/modifier.c trunk/blender/source/blender/blenkernel/intern/particle.c trunk/blender/source/blender/blenkernel/intern/particle_system.c trunk/blender/source/blender/blenkernel/intern/pointcache.c trunk/blender/source/blender/blenloader/intern/readfile.c trunk/blender/source/blender/editors/physics/editparticle.c trunk/blender/source/blender/editors/space_view3d/drawobject.c trunk/blender/source/blender/makesdna/DNA_particle_types.h trunk/blender/source/blender/makesrna/intern/rna_particle.c trunk/blender/source/blender/render/intern/source/convertblender.c trunk/blender/source/blender/render/intern/source/pointdensity.c Modified: trunk/blender/release/ui/buttons_particle.py === --- trunk/blender/release/ui/buttons_particle.py2009-09-17 21:36:02 UTC (rev 23316) +++ trunk/blender/release/ui/buttons_particle.py2009-09-17 22:00:49 UTC (rev 23317) @@ -255,6 +255,7 @@ sub = col.column(align=True) sub.itemR(cloth, pin_stiffness, text=Stiffness) sub.itemR(cloth, mass) + sub.itemR(cloth, bending_stiffness, text=Bending) col.itemL(text=Damping:) sub = col.column(align=True) sub.itemR(cloth, spring_damping, text=Spring) Modified: trunk/blender/source/blender/blenkernel/BKE_boids.h === --- trunk/blender/source/blender/blenkernel/BKE_boids.h 2009-09-17 21:36:02 UTC (rev 23316) +++ trunk/blender/source/blender/blenkernel/BKE_boids.h 2009-09-17 22:00:49 UTC (rev 23317) @@ -35,9 +35,7 @@ #include DNA_boid_types.h typedef struct BoidBrainData { - Scene *scene; - struct Object *ob; - struct ParticleSystem *psys; + struct ParticleSimulationData *sim; struct ParticleSettings *part; float timestep, cfra, dfra; float wanted_co[3], wanted_speed; Modified: trunk/blender/source/blender/blenkernel/BKE_particle.h === --- trunk/blender/source/blender/blenkernel/BKE_particle.h 2009-09-17 21:36:02 UTC (rev 23316) +++ trunk/blender/source/blender/blenkernel/BKE_particle.h 2009-09-17 22:00:49 UTC (rev 23317) @@ -61,7 +61,24 @@ #define PARTICLE_P ParticleData *pa; int p #define LOOP_PARTICLES for(p=0, pa=psys-particles; ppsys-totpart; p++, pa++) +#define LOOP_EXISTING_PARTICLES for(p=0, pa=psys-particles; ppsys-totpart; p++, pa++) if(!(pa-flag PARS_UNEXIST)) +#define LOOP_SHOWN_PARTICLES for(p=0, pa=psys-particles; ppsys-totpart; p++, pa++) if(!(pa-flag (PARS_UNEXIST|PARS_NO_DISP))) +#define PSYS_FRAND_COUNT 1024 +#define PSYS_FRAND(seed) psys-frand[(seed) % PSYS_FRAND_COUNT] + +/* fast but sure way to get the modifier*/ +#define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim-psmd ? sim-psmd : psys_get_modifier(sim-ob, sim-psys) + +/* common stuff that many particle functions need */ +typedef struct ParticleSimulationData { + struct Scene *scene; + struct Object *ob; + struct ParticleSystem *psys; + struct ParticleSystemModifierData *psmd; + float timestep; +} ParticleSimulationData; + typedef struct ParticleEffectorCache { struct ParticleEffectorCache *next, *prev; struct Object *ob; @@ -118,11 +135,8 @@ typedef
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23318] branches/bmesh/blender/source/ blender: part 1 of cleaning up my little array macro library to be a formal API.
Revision: 23318 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23318 Author: joeedh Date: 2009-09-18 01:05:33 +0200 (Fri, 18 Sep 2009) Log Message: --- part 1 of cleaning up my little array macro library to be a formal API. also removed some extraneous selection calls from loopcut.c. Modified Paths: -- branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c branches/bmesh/blender/source/blender/blenkernel/intern/editderivedbmesh.c branches/bmesh/blender/source/blender/blenkernel/intern/mesh.c branches/bmesh/blender/source/blender/blenkernel/intern/modifier.c branches/bmesh/blender/source/blender/blenkernel/intern/modifiers_bmesh.c branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c branches/bmesh/blender/source/blender/blenlib/BLI_cellalloc.h branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h branches/bmesh/blender/source/blender/bmesh/intern/bmesh_construct.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_interp.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_marking.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_mods.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_operators.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_polygon.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_queries.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_to_editmesh.c branches/bmesh/blender/source/blender/bmesh/intern/bmesh_walkers.c branches/bmesh/blender/source/blender/bmesh/intern/editmesh_to_bmesh.c branches/bmesh/blender/source/blender/bmesh/operators/bmesh_dupeops.c branches/bmesh/blender/source/blender/bmesh/operators/connectops.c branches/bmesh/blender/source/blender/bmesh/operators/createops.c branches/bmesh/blender/source/blender/bmesh/operators/dissolveops.c branches/bmesh/blender/source/blender/bmesh/operators/extrudeops.c branches/bmesh/blender/source/blender/bmesh/operators/mesh_conv.c branches/bmesh/blender/source/blender/bmesh/operators/mirror.c branches/bmesh/blender/source/blender/bmesh/operators/removedoubles.c branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c branches/bmesh/blender/source/blender/bmesh/operators/triangulateop.c branches/bmesh/blender/source/blender/bmesh/operators/utils.c branches/bmesh/blender/source/blender/editors/mesh/bmesh_select.c branches/bmesh/blender/source/blender/editors/mesh/bmesh_selecthistory.c branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c branches/bmesh/blender/source/blender/editors/mesh/bmeshutils.c branches/bmesh/blender/source/blender/editors/mesh/editmesh_loop.c branches/bmesh/blender/source/blender/editors/mesh/loopcut.c branches/bmesh/blender/source/blender/editors/transform/transform_conversions.c branches/bmesh/blender/source/blender/editors/uvedit/uvedit_draw.c branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c branches/bmesh/blender/source/blender/editors/uvedit/uvedit_unwrap_ops.c Added Paths: --- branches/bmesh/blender/source/blender/blenlib/BLI_array.h Modified: branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h === --- branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h 2009-09-17 22:00:49 UTC (rev 23317) +++ branches/bmesh/blender/source/blender/blenkernel/BKE_utildefines.h 2009-09-17 23:05:33 UTC (rev 23318) @@ -195,55 +195,6 @@ #define SET_INT_IN_POINTER(i) ((void*)(intptr_t)(i)) #define GET_INT_FROM_POINTER(i) ((int)(intptr_t)(i)) -/*little array macro library. example of usage: - -int *arr = NULL; -V_DECLARE(arr); -int i; - -for (i=0; i10; i++) { - V_GROW(arr); - arr[i] = something; -} -V_FREE(arr); - -arrays are buffered, using double-buffering (so on each reallocation, -the array size is doubled). supposedly this should give good Big Oh -behaviour, though it may not be the best in practice. -*/ - -#define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp - -/*in the future, I plan on having V_DECLARE allocate stack memory it'll - use at first, and switch over to heap when it needs more. that'll mess - up cases where you'd want to use this API to build a dynamic list for - non-local use, so all such cases should use this macro.*/ -#define V_DYNDECLARE(vec) V_DECLARE(vec) - -/*this returns the entire size of the array, including any buffering.*/ -#define V_SIZE(vec) ((signed int)((vec)==NULL ? 0 : MEM_allocN_len(vec) / sizeof(*vec))) - -/*this returns the logical size of the array, not including buffering.*/ -#define V_COUNT(vec) _##vec##_count - -/*grow the array by one. zeroes the new elements.*/ -#define V_GROW(vec) \ - V_SIZE(vec)
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23319] branches/soc-2009-chingachgook: Support for building opencollada branch using CMake.
Revision: 23319 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23319 Author: hos Date: 2009-09-18 01:17:31 +0200 (Fri, 18 Sep 2009) Log Message: --- Support for building opencollada branch using CMake. Not sure how to tell the system to make the location of libpcre and libexpat a settable option though -- maybe somebody who is more of an expert can look at this. Modified Paths: -- branches/soc-2009-chingachgook/CMake/macros.cmake branches/soc-2009-chingachgook/CMakeLists.txt branches/soc-2009-chingachgook/source/blender/CMakeLists.txt branches/soc-2009-chingachgook/source/creator/CMakeLists.txt Modified: branches/soc-2009-chingachgook/CMake/macros.cmake === --- branches/soc-2009-chingachgook/CMake/macros.cmake 2009-09-17 23:05:33 UTC (rev 23318) +++ branches/soc-2009-chingachgook/CMake/macros.cmake 2009-09-17 23:17:31 UTC (rev 23319) @@ -50,6 +50,11 @@ IF(WITH_OPENAL) LINK_DIRECTORIES(${OPENAL_LIBPATH}) ENDIF(WITH_OPENAL) + IF(WITH_OPENCOLLADA) +LINK_DIRECTORIES(${OPENCOLLADA_LIBPATH}) +LINK_DIRECTORIES(${PCRE_LIBPATH}) +LINK_DIRECTORIES(${EXPAT_LIBPATH}) + ENDIF(WITH_OPENCOLLADA) IF(WIN32) LINK_DIRECTORIES(${PTHREADS_LIBPATH}) @@ -113,6 +118,11 @@ IF(WITH_FFMPEG) TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB}) ENDIF(WITH_FFMPEG) + IF(WITH_OPENCOLLADA) +TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB}) +TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB}) +TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB}) + ENDIF(WITH_OPENCOLLADA) IF(WIN32) TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB}) ENDIF(WIN32) Modified: branches/soc-2009-chingachgook/CMakeLists.txt === --- branches/soc-2009-chingachgook/CMakeLists.txt 2009-09-17 23:05:33 UTC (rev 23318) +++ branches/soc-2009-chingachgook/CMakeLists.txt 2009-09-17 23:17:31 UTC (rev 23319) @@ -68,6 +68,7 @@ OPTION(WITH_OPENAL Enable OpenAL Support (http://www.openal.org) ON) OPTION(WITH_OPENMP Enable OpenMP (has to be supported by the compiler) OFF) OPTION(WITH_WEBPLUGIN Enable Web Plugin (Unix only) OFF) +OPTION(WITH_OPENCOLLADAEnable OpenCollada Support (http://www.opencollada.org/) ON) IF(NOT WITH_GAMEENGINE AND WITH_PLAYER) MESSAGE(WARNING: WITH_PLAYER needs WITH_GAMEENGINE) @@ -140,6 +141,19 @@ SET(SDL_LIB ${SDL_LIBRARY}) ENDIF(WITH_SDL) + IF(WITH_OPENCOLLADA) +SET(OPENCOLLADA /usr/local/opencollada) +SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}) +SET(OPENCOLLADA_LIB OpenCollada) +SET(PCRE /usr) +SET(PCRE_LIBPATH ${PCRE}/lib) +SET(PCRE_LIB pcre) +SET(EXPAT /usr) +SET(EXPAT_LIBPATH ${EXPAT}/lib) +SET(EXPAT_LIB expat) + + ENDIF(WITH_OPENCOLLADA) + FIND_PATH(OPENEXR_INC ImfXdr.h PATHS Modified: branches/soc-2009-chingachgook/source/blender/CMakeLists.txt === --- branches/soc-2009-chingachgook/source/blender/CMakeLists.txt 2009-09-17 23:05:33 UTC (rev 23318) +++ branches/soc-2009-chingachgook/source/blender/CMakeLists.txt 2009-09-17 23:17:31 UTC (rev 23319) @@ -57,3 +57,7 @@ ADD_SUBDIRECTORY(python) ENDIF(WITH_PYTHON) +IF(WITH_OPENCOLLADA) + ADD_SUBDIRECTORY(collada) +ENDIF(WITH_OPENCOLLADA) + Modified: branches/soc-2009-chingachgook/source/creator/CMakeLists.txt === --- branches/soc-2009-chingachgook/source/creator/CMakeLists.txt 2009-09-17 23:05:33 UTC (rev 23318) +++ branches/soc-2009-chingachgook/source/creator/CMakeLists.txt 2009-09-17 23:17:31 UTC (rev 23319) @@ -241,6 +241,7 @@ bf_openexr bf_dds bf_readblenfile +bf_collada blender_bop bf_kernel bf_decimation ___ 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 [23320] trunk/blender/source/tools/guess/ config.guess: Update to 2009-06-10 version.
Revision: 23320 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23320 Author: gsrb3d Date: 2009-09-18 03:49:07 +0200 (Fri, 18 Sep 2009) Log Message: --- Update to 2009-06-10 version. Modified Paths: -- trunk/blender/source/tools/guess/config.guess Modified: trunk/blender/source/tools/guess/config.guess === --- trunk/blender/source/tools/guess/config.guess 2009-09-17 23:17:31 UTC (rev 23319) +++ trunk/blender/source/tools/guess/config.guess 2009-09-18 01:49:07 UTC (rev 23320) @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2008-01-23' +timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -170,7 +170,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2/dev/null \ - | grep __ELF__ /dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -324,6 +324,9 @@ case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; +s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; @@ -331,7 +334,20 @@ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + eval $set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ $CC_FOR_BUILD != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2/dev/null) | \ + grep IS_64BIT_ARCH /dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -640,7 +656,7 @@ # = hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2/dev/null) | - grep __LP64__ /dev/null + grep -q __LP64__ then HP_ARCH=hppa2.0w else @@ -796,7 +812,7 @@ x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd) + EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -806,6 +822,9 @@ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; +8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of ATT UWIN. Should we @@ -866,17 +885,17 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; -mips:Linux:*:*) +mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^//' EOF $dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips + CPU=${UNAME_MACHINE} #else CPU= #endif @@ -889,29 +908,6 @@ }'` test x${CPU} != x { echo ${CPU}-unknown-linux-gnu; exit; } ;; -mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^//' EOF $dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el -
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23321] trunk/blender: * Made image editor paint use predefined left/ right mouse buttons rather than action/select, consistent with 3d view painting
Revision: 23321 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23321 Author: broken Date: 2009-09-18 04:19:27 +0200 (Fri, 18 Sep 2009) Log Message: --- * Made image editor paint use predefined left/right mouse buttons rather than action/select, consistent with 3d view painting (and better for tablets!) * Fixed a small bug in project paint tool ui Modified Paths: -- trunk/blender/release/ui/space_view3d_toolbar.py trunk/blender/source/blender/editors/space_image/space_image.c Modified: trunk/blender/release/ui/space_view3d_toolbar.py === --- trunk/blender/release/ui/space_view3d_toolbar.py2009-09-18 01:49:07 UTC (rev 23320) +++ trunk/blender/release/ui/space_view3d_toolbar.py2009-09-18 02:19:27 UTC (rev 23321) @@ -599,7 +599,7 @@ # ** default tools for texturepaint class VIEW3D_PT_tools_projectpaint(View3DPanel): - __context__ = projectpaint + __context__ = texturepaint __label__ = Project Paint def poll(self, context): Modified: trunk/blender/source/blender/editors/space_image/space_image.c === --- trunk/blender/source/blender/editors/space_image/space_image.c 2009-09-18 01:49:07 UTC (rev 23320) +++ trunk/blender/source/blender/editors/space_image/space_image.c 2009-09-18 02:19:27 UTC (rev 23321) @@ -232,9 +232,9 @@ RNA_float_set(WM_keymap_add_item(keymap, IMAGE_OT_view_zoom_ratio, PAD4, KM_PRESS, 0, 0)-ptr, ratio, 0.25f); RNA_float_set(WM_keymap_add_item(keymap, IMAGE_OT_view_zoom_ratio, PAD8, KM_PRESS, 0, 0)-ptr, ratio, 0.125f); - WM_keymap_add_item(keymap, PAINT_OT_image_paint, ACTIONMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, PAINT_OT_grab_clone, SELECTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, PAINT_OT_sample_color, SELECTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, PAINT_OT_image_paint, LEFTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, PAINT_OT_grab_clone, RIGHTMOUSE, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, PAINT_OT_sample_color, RIGHTMOUSE, KM_PRESS, 0, 0); RNA_enum_set(WM_keymap_add_item(keymap, PAINT_OT_image_paint_radial_control, FKEY, KM_PRESS, 0, 0)-ptr, mode, WM_RADIALCONTROL_SIZE); RNA_enum_set(WM_keymap_add_item(keymap, PAINT_OT_image_paint_radial_control, FKEY, KM_PRESS, KM_SHIFT, 0)-ptr, mode, WM_RADIALCONTROL_STRENGTH); ___ 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 [23322] branches/blender2.4/intern/ghost/ intern/GHOST_WindowX11.cpp: use functions to detect stylus and eraser from the wine project, supposed to wor
Revision: 23322 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23322 Author: campbellbarton Date: 2009-09-18 04:36:23 +0200 (Fri, 18 Sep 2009) Log Message: --- use functions to detect stylus and eraser from the wine project, supposed to work with non-wacom tablets too (searches for wizardpen acecad as well as 'stylus'). 2.4x did an exact check on the name, 2.5 does a case insensitive search on the type. This does a case insensitive check on both the name and type. close the devices on exit too. Modified Paths: -- branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp Modified: branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp === --- branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 02:19:27 UTC (rev 23321) +++ branches/blender2.4/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 02:36:23 UTC (rev 23322) @@ -427,6 +427,100 @@ return 0 ; } +/* These C functions are copied from Wine 1.1.13's wintab.c */ +#define BOOL int +#define TRUE 1 +#define FALSE 0 + +static bool match_token(const char *haystack, const char *needle) +{ + const char *p, *q; + for (p = haystack; *p; ) + { + while (*p isspace(*p)) + p++; + if (! *p) + break; + + for (q = needle; *q *p tolower(*p) == tolower(*q); q++) + p++; + if (! *q (isspace(*p) || !*p)) + return TRUE; + + while (*p ! isspace(*p)) + p++; + } + return FALSE; +} + +/* Determining if an X device is a Tablet style device is an imperfect science. +** We rely on common conventions around device names as well as the type reported +** by Wacom tablets. This code will likely need to be expanded for alternate tablet types +** +** Wintab refers to any device that interacts with the tablet as a cursor, +** (stylus, eraser, tablet mouse, airbrush, etc) +** this is not to be confused with wacom x11 configuration cursor device. +** Wacoms x11 config cursor refers to its device slot (which we mirror with +** our gSysCursors) for puck like devices (tablet mice essentially). +*/ + +static BOOL is_tablet_cursor(const char *name, const char *type) +{ + int i; + static const char *tablet_cursor_whitelist[] = { + wacom, + wizardpen, + acecad, + tablet, + cursor, + stylus, + eraser, + pad, + NULL + }; + + for (i=0; tablet_cursor_whitelist[i] != NULL; i++) { + if (name match_token(name, tablet_cursor_whitelist[i])) + return TRUE; + if (type match_token(type, tablet_cursor_whitelist[i])) + return TRUE; + } + return FALSE; +} + +static BOOL is_stylus(const char *name, const char *type) +{ + int i; + static const char* tablet_stylus_whitelist[] = { + stylus, + wizardpen, + acecad, + NULL + }; + + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name match_token(name, tablet_stylus_whitelist[i])) + return TRUE; + if (type match_token(type, tablet_stylus_whitelist[i])) + return TRUE; + } + + return FALSE; +} + +static BOOL is_eraser(const char *name, const char *type) +{ + if (name match_token(name, eraser)) + return TRUE; + if (type match_token(type, eraser)) + return TRUE; + return FALSE; +} +#undef BOOL +#undef TRUE +#undef FALSE +/* end code copied from wine */ + void GHOST_WindowX11::initXInputDevices() { static XErrorHandler old_handler = (XErrorHandler) 0 ; @@ -436,28 +530,21 @@ if(version-present) { int device_count; XDeviceInfo* device_info = XListInputDevices(m_display, device_count); - m_xtablet.StylusDevice = 0; - m_xtablet.EraserDevice = 0; + m_xtablet.StylusDevice = NULL; + m_xtablet.EraserDevice = NULL; m_xtablet.CommonData.Active= 0; /* Install our error handler to override Xlib's termination behavior */ old_handler = XSetErrorHandler(ApplicationErrorHandler) ; for(int i=0; idevice_count; ++i) { - std::string type = ; + char *device_type = device_info[i].type ? XGetAtomName(m_display, device_info[i].type) : NULL; -
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23323] trunk/blender/intern/ghost/intern/ GHOST_WindowX11.cpp: same as r23322 in 2.4x
Revision: 23323 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23323 Author: campbellbarton Date: 2009-09-18 04:38:38 +0200 (Fri, 18 Sep 2009) Log Message: --- same as r23322 in 2.4x --- 2.4x log use functions to detect stylus and eraser from the wine project, supposed to work with non-wacom tablets too (searches for wizardpen acecad as well as 'stylus'). 2.4x did an exact check on the name, 2.5 does a case insensitive search on the type. This does a case insensitive check on both the name and type. close the devices on exit too. Modified Paths: -- trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp Modified: trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp === --- trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 02:36:23 UTC (rev 23322) +++ trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 02:38:38 UTC (rev 23323) @@ -414,6 +414,100 @@ return 0 ; } +/* These C functions are copied from Wine 1.1.13's wintab.c */ +#define BOOL int +#define TRUE 1 +#define FALSE 0 + +static bool match_token(const char *haystack, const char *needle) +{ + const char *p, *q; + for (p = haystack; *p; ) + { + while (*p isspace(*p)) + p++; + if (! *p) + break; + + for (q = needle; *q *p tolower(*p) == tolower(*q); q++) + p++; + if (! *q (isspace(*p) || !*p)) + return TRUE; + + while (*p ! isspace(*p)) + p++; + } + return FALSE; +} + +/* Determining if an X device is a Tablet style device is an imperfect science. +** We rely on common conventions around device names as well as the type reported +** by Wacom tablets. This code will likely need to be expanded for alternate tablet types +** +** Wintab refers to any device that interacts with the tablet as a cursor, +** (stylus, eraser, tablet mouse, airbrush, etc) +** this is not to be confused with wacom x11 configuration cursor device. +** Wacoms x11 config cursor refers to its device slot (which we mirror with +** our gSysCursors) for puck like devices (tablet mice essentially). +*/ + +static BOOL is_tablet_cursor(const char *name, const char *type) +{ + int i; + static const char *tablet_cursor_whitelist[] = { + wacom, + wizardpen, + acecad, + tablet, + cursor, + stylus, + eraser, + pad, + NULL + }; + + for (i=0; tablet_cursor_whitelist[i] != NULL; i++) { + if (name match_token(name, tablet_cursor_whitelist[i])) + return TRUE; + if (type match_token(type, tablet_cursor_whitelist[i])) + return TRUE; + } + return FALSE; +} + +static BOOL is_stylus(const char *name, const char *type) +{ + int i; + static const char* tablet_stylus_whitelist[] = { + stylus, + wizardpen, + acecad, + NULL + }; + + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name match_token(name, tablet_stylus_whitelist[i])) + return TRUE; + if (type match_token(type, tablet_stylus_whitelist[i])) + return TRUE; + } + + return FALSE; +} + +static BOOL is_eraser(const char *name, const char *type) +{ + if (name match_token(name, eraser)) + return TRUE; + if (type match_token(type, eraser)) + return TRUE; + return FALSE; +} +#undef BOOL +#undef TRUE +#undef FALSE +/* end code copied from wine */ + void GHOST_WindowX11::initXInputDevices() { static XErrorHandler old_handler = (XErrorHandler) 0 ; @@ -423,28 +517,21 @@ if(version-present) { int device_count; XDeviceInfo* device_info = XListInputDevices(m_display, device_count); - m_xtablet.StylusDevice = 0; - m_xtablet.EraserDevice = 0; + m_xtablet.StylusDevice = NULL; + m_xtablet.EraserDevice = NULL; m_xtablet.CommonData.Active= GHOST_kTabletModeNone; /* Install our error handler to override Xlib's termination behavior */ old_handler = XSetErrorHandler(ApplicationErrorHandler) ; for(int i=0; idevice_count; ++i) { - std::string type = ; + char *device_type = device_info[i].type ? XGetAtomName(m_display, device_info[i].type) : NULL;
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23324] trunk/blender/source/blender: * Added notifiers/redraws for brush edits in 3d view and image editor ( so using radial control updates tool pro
Revision: 23324 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23324 Author: broken Date: 2009-09-18 05:11:17 +0200 (Fri, 18 Sep 2009) Log Message: --- * Added notifiers/redraws for brush edits in 3d view and image editor (so using radial control updates tool properties) * Changed the non-projection paint code to use the brush falloff curve, rather than a predefined falloff. This makes non-projection painting in the 3d view, and image editor painting much more consistent with other brush usage. Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/brush.c trunk/blender/source/blender/editors/sculpt_paint/paint_image.c trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c trunk/blender/source/blender/editors/sculpt_paint/sculpt.c trunk/blender/source/blender/editors/space_image/space_image.c trunk/blender/source/blender/editors/space_view3d/space_view3d.c Modified: trunk/blender/source/blender/blenkernel/intern/brush.c === --- trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 02:38:38 UTC (rev 23323) +++ trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:11:17 UTC (rev 23324) @@ -446,6 +446,7 @@ ImBuf *ibuf; float xy[2], dist, rgba[4], *dstf; int x, y, rowbytes, xoff, yoff, imbflag; + int maxsize = brush-size 1; char *dst, crgb[3]; imbflag= (flt)? IB_rectfloat: IB_rect; @@ -470,7 +471,7 @@ dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]); VECCOPY(dstf, brush-rgb); - dstf[3]= brush_sample_falloff(brush, dist); + dstf[3]= brush_curve_strength(brush, dist, maxsize); } else if (texfall == 1) { brush_sample_tex(brush, xy, dstf); @@ -483,7 +484,7 @@ dstf[0] = rgba[0]*brush-rgb[0]; dstf[1] = rgba[1]*brush-rgb[1]; dstf[2] = rgba[2]*brush-rgb[2]; - dstf[3] = rgba[3]*brush_sample_falloff(brush, dist); + dstf[3] = rgba[3]*brush_curve_strength(brush, dist, maxsize); } } } @@ -506,7 +507,7 @@ dst[0]= crgb[0]; dst[1]= crgb[1]; dst[2]= crgb[2]; - dst[3]= FTOCHAR(brush_sample_falloff(brush, dist)); + dst[3]= FTOCHAR(brush_curve_strength(brush, dist, maxsize)); } else if (texfall == 1) { brush_sample_tex(brush, xy, rgba); @@ -522,7 +523,7 @@ dst[0] = FTOCHAR(rgba[0]*brush-rgb[0]); dst[1] = FTOCHAR(rgba[1]*brush-rgb[1]); dst[2] = FTOCHAR(rgba[2]*brush-rgb[2]); - dst[3] = FTOCHAR(rgba[3]*brush_sample_falloff(brush, dist)); + dst[3] = FTOCHAR(rgba[3]*brush_curve_strength(brush, dist, maxsize)); } } } Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c === --- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2009-09-18 02:38:38 UTC (rev 23323) +++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2009-09-18 03:11:17 UTC (rev 23324) @@ -4897,12 +4897,15 @@ static int paint_radial_control_exec(bContext *C, wmOperator *op) { + Brush *brush = paint_brush(CTX_data_scene(C)-toolsettings-imapaint.paint); float zoom; int ret; char str[256]; get_imapaint_zoom(C, zoom, zoom); - ret = brush_radial_control_exec(op, paint_brush(CTX_data_scene(C)-toolsettings-imapaint.paint), 2.0 / zoom); + ret = brush_radial_control_exec(op, brush, 2.0 / zoom); WM_radial_control_string(op, str, 256); + + WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); return ret; } @@ -5216,10 +5219,13 @@ static int texture_paint_radial_control_exec(bContext *C, wmOperator *op) { - int ret = brush_radial_control_exec(op, paint_brush(CTX_data_scene(C)-toolsettings-imapaint.paint), 2); + Brush *brush = paint_brush(CTX_data_scene(C)-toolsettings-imapaint.paint); + int ret =
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23325] trunk/blender/release/io/netrender : netrender: only one log file for each chunk
Revision: 23325 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23325 Author: theeth Date: 2009-09-18 05:29:50 +0200 (Fri, 18 Sep 2009) Log Message: --- netrender: only one log file for each chunk Modified Paths: -- trunk/blender/release/io/netrender/master.py trunk/blender/release/io/netrender/model.py trunk/blender/release/io/netrender/slave.py Modified: trunk/blender/release/io/netrender/master.py === --- trunk/blender/release/io/netrender/master.py2009-09-18 03:11:17 UTC (rev 23324) +++ trunk/blender/release/io/netrender/master.py2009-09-18 03:29:50 UTC (rev 23325) @@ -82,6 +82,15 @@ self.credits += (time.time() - self.last_dispatched) / 60 self.last_dispatched = time.time() + def addLog(self, frames): + log_name = _.join((%04d % f for f in frames)) + .log + log_path = self.save_path + log_name + + for number in frames: + frame = self[number] + if frame: + frame.log_path = log_path + def addFrame(self, frame_number): frame = MRenderFrame(frame_number) self.frames.append(frame) @@ -117,6 +126,7 @@ self.slave = None self.time = 0 self.status = QUEUED + self.log_path = None def reset(self, all): if all or self.status == ERROR: @@ -222,11 +232,11 @@ frame = job[job_frame] if frame: - if frame.status in (QUEUED, DISPATCHED): + if not frame.log_path or frame.status in (QUEUED, DISPATCHED): self.send_head(http.client.PROCESSING) else: self.server.stats(, Sending log back to client) - f = open(job.save_path + %04d % job_frame + .log, 'rb') + f = open(frame.log_path, 'rb') self.send_head() @@ -420,7 +430,27 @@ slave_id = self.server.addSlave(slave_info.name, self.client_address, slave_info.stats) self.send_head(headers = {slave-id: slave_id}) - + # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + elif self.path == log: + slave_id = self.headers['slave-id'] + + slave = self.server.updateSlave(slave_id) + + if slave: # only if slave id is valid + length = int(self.headers['content-length']) + + log_info = netrender.model.LogFile.materialize(eval(str(self.rfile.read(length), encoding='utf8'))) + + job = self.server.getJobByID(log_info.job_id) + + if job: + job.addLog(log_info.frames) + self.send_head(http.client.OK) + else: + # no such job id + self.send_head(http.client.NO_CONTENT) + else: # invalid slave id + self.send_head(http.client.NO_CONTENT) # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- @@ -526,19 +556,24 @@ job = self.server.getJobByID(job_id) if job: - length = int(self.headers['content-length']) job_frame = int(self.headers['job-frame']) - buf = self.rfile.read(length) - f = open(job.save_path + %04d % job_frame + .log, 'ab') - f.write(buf) - f.close() +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23326] trunk/blender: remove brush_sample_falloff, #if 0, unused function is_tablet_cursor
Revision: 23326 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23326 Author: campbellbarton Date: 2009-09-18 05:41:37 +0200 (Fri, 18 Sep 2009) Log Message: --- remove brush_sample_falloff, #if 0, unused function is_tablet_cursor Modified Paths: -- trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp trunk/blender/source/blender/blenkernel/BKE_brush.h trunk/blender/source/blender/blenkernel/intern/brush.c Modified: trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp === --- trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 03:29:50 UTC (rev 23325) +++ trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2009-09-18 03:41:37 UTC (rev 23326) @@ -450,7 +450,7 @@ ** Wacoms x11 config cursor refers to its device slot (which we mirror with ** our gSysCursors) for puck like devices (tablet mice essentially). */ - +#if 0 // unused static BOOL is_tablet_cursor(const char *name, const char *type) { int i; @@ -474,7 +474,7 @@ } return FALSE; } - +#endif static BOOL is_stylus(const char *name, const char *type) { int i; Modified: trunk/blender/source/blender/blenkernel/BKE_brush.h === --- trunk/blender/source/blender/blenkernel/BKE_brush.h 2009-09-18 03:29:50 UTC (rev 23325) +++ trunk/blender/source/blender/blenkernel/BKE_brush.h 2009-09-18 03:41:37 UTC (rev 23326) @@ -63,7 +63,6 @@ float brush_curve_strength(struct Brush *br, float p, const float len); /* sampling */ -float brush_sample_falloff(struct Brush *brush, float dist); void brush_sample_tex(struct Brush *brush, float *xy, float *rgba); void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int size, struct ImBuf **imbuf); Modified: trunk/blender/source/blender/blenkernel/intern/brush.c === --- trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:29:50 UTC (rev 23325) +++ trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:41:37 UTC (rev 23326) @@ -379,36 +379,6 @@ } /* Brush Sampling */ - -/*static float taylor_approx_cos(float f) -{ - f = f*f; - f = 1.0f - f/2.0f + f*f/24.0f; - return f; -}*/ - -float brush_sample_falloff(Brush *brush, float dist) -{ - float a, outer, inner; - - outer = brush-size 1; - inner = outer*brush-innerradius; - - if (dist = inner) { - return brush-alpha; - } - else if ((dist outer) (inner outer)) { - a = sqrt((dist - inner)/(outer - inner)); - return (1 - a)*brush-alpha; - - /* formula used by sculpt, with taylor approx - a = 0.5f*(taylor_approx_cos(3.0f*(dist - inner)/(outer - inner)) + 1.0f); - return a*brush-alpha; */ - } - else - return 0.0f; -} - void brush_sample_tex(Brush *brush, float *xy, float *rgba) { MTex *mtex= brush-mtex[brush-texact]; ___ 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 [23327] trunk/blender/source/blender/ blenkernel/intern/brush.c: * fix for previous commit, didn' t take brush strength into account
Revision: 23327 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23327 Author: broken Date: 2009-09-18 05:47:17 +0200 (Fri, 18 Sep 2009) Log Message: --- * fix for previous commit, didn't take brush strength into account Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/brush.c Modified: trunk/blender/source/blender/blenkernel/intern/brush.c === --- trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:41:37 UTC (rev 23326) +++ trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:47:17 UTC (rev 23327) @@ -441,7 +441,7 @@ dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]); VECCOPY(dstf, brush-rgb); - dstf[3]= brush_curve_strength(brush, dist, maxsize); + dstf[3]= brush-alpha*brush_curve_strength(brush, dist, maxsize); } else if (texfall == 1) { brush_sample_tex(brush, xy, dstf); @@ -454,7 +454,7 @@ dstf[0] = rgba[0]*brush-rgb[0]; dstf[1] = rgba[1]*brush-rgb[1]; dstf[2] = rgba[2]*brush-rgb[2]; - dstf[3] = rgba[3]*brush_curve_strength(brush, dist, maxsize); + dstf[3] = rgba[3]*brush-alpha*brush_curve_strength(brush, dist, maxsize); } } } @@ -477,7 +477,7 @@ dst[0]= crgb[0]; dst[1]= crgb[1]; dst[2]= crgb[2]; - dst[3]= FTOCHAR(brush_curve_strength(brush, dist, maxsize)); + dst[3]= FTOCHAR(brush-alpha*brush_curve_strength(brush, dist, maxsize)); } else if (texfall == 1) { brush_sample_tex(brush, xy, rgba); @@ -493,7 +493,7 @@ dst[0] = FTOCHAR(rgba[0]*brush-rgb[0]); dst[1] = FTOCHAR(rgba[1]*brush-rgb[1]); dst[2] = FTOCHAR(rgba[2]*brush-rgb[2]); - dst[3] = FTOCHAR(rgba[3]*brush_curve_strength(brush, dist, maxsize)); + dst[3] = FTOCHAR(rgba[3]*brush-alpha*brush_curve_strength(brush, dist, maxsize)); } } } ___ 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 [23328] trunk/blender/source/blender/ blenkernel/intern/brush.c: curve could return values lower then zero, making a brush add and subtract the color
Revision: 23328 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=23328 Author: campbellbarton Date: 2009-09-18 06:07:41 +0200 (Fri, 18 Sep 2009) Log Message: --- curve could return values lower then zero, making a brush add and subtract the color in different parts. (cool but not useful!) Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/brush.c Modified: trunk/blender/source/blender/blenkernel/intern/brush.c === --- trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 03:47:17 UTC (rev 23327) +++ trunk/blender/source/blender/blenkernel/intern/brush.c 2009-09-18 04:07:41 UTC (rev 23328) @@ -933,8 +933,10 @@ /* Uses the brush curve control to find a strength value between 0 and 1 */ float brush_curve_strength(Brush *br, float p, const float len) { + float f; if(p len) p= len; - return curvemapping_evaluateF(br-curve, 0, p/len); + f= curvemapping_evaluateF(br-curve, 0, p/len); + return (f 0.0f) ? f:0.0f; } /* TODO: should probably be unified with BrushPainter stuff? */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs