[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42416] trunk/blender/source/blender: A ( hopefully last) bunch of fixes and tweaks to UI label and messages ( found while translating in french).
Revision: 42416 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42416 Author: mont29 Date: 2011-12-04 17:36:13 + (Sun, 04 Dec 2011) Log Message: --- A (hopefully last) bunch of fixes and tweaks to UI label and messages (found while translating in french). Modified Paths: -- trunk/blender/source/blender/editors/mesh/mesh_data.c trunk/blender/source/blender/editors/space_clip/clip_ops.c trunk/blender/source/blender/makesrna/intern/rna_brush.c trunk/blender/source/blender/makesrna/intern/rna_lamp.c trunk/blender/source/blender/makesrna/intern/rna_material.c trunk/blender/source/blender/makesrna/intern/rna_particle.c trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c trunk/blender/source/blender/makesrna/intern/rna_sensor.c trunk/blender/source/blender/makesrna/intern/rna_sequencer.c Modified: trunk/blender/source/blender/editors/mesh/mesh_data.c === --- trunk/blender/source/blender/editors/mesh/mesh_data.c 2011-12-04 17:35:17 UTC (rev 42415) +++ trunk/blender/source/blender/editors/mesh/mesh_data.c 2011-12-04 17:36:13 UTC (rev 42416) @@ -418,7 +418,7 @@ { /* identifiers */ ot-name= Assign Image to UV Map; - ot-description= Assigns Image to active UV Map, or creates a UV Map; + ot-description= Assign Image to active UV Map, or create an UV Map; ot-idname= MESH_OT_drop_named_image; /* api callbacks */ Modified: trunk/blender/source/blender/editors/space_clip/clip_ops.c === --- trunk/blender/source/blender/editors/space_clip/clip_ops.c 2011-12-04 17:35:17 UTC (rev 42415) +++ trunk/blender/source/blender/editors/space_clip/clip_ops.c 2011-12-04 17:36:13 UTC (rev 42416) @@ -929,7 +929,7 @@ /* identifiers */ ot-name= Rebuild Proxy and Timecode Indices; ot-idname= CLIP_OT_rebuild_proxy; - ot-description= Rebuild all selected proxies and timecode indeces in the background; + ot-description= Rebuild all selected proxies and timecode indices in the background; /* api callbacks */ ot-exec= clip_rebuild_proxy_exec; Modified: trunk/blender/source/blender/makesrna/intern/rna_brush.c === --- trunk/blender/source/blender/makesrna/intern/rna_brush.c2011-12-04 17:35:17 UTC (rev 42415) +++ trunk/blender/source/blender/makesrna/intern/rna_brush.c2011-12-04 17:36:13 UTC (rev 42416) @@ -336,7 +336,7 @@ prop= RNA_def_property(srna, angle, PROP_FLOAT, PROP_ANGLE); RNA_def_property_float_sdna(prop, NULL, rot); RNA_def_property_range(prop, 0, M_PI*2); - RNA_def_property_ui_text(prop, Angle, Defines brush texture rotation); + RNA_def_property_ui_text(prop, Angle, Brush texture rotation); RNA_def_property_update(prop, 0, rna_TextureSlot_update); prop= RNA_def_property(srna, map_mode, PROP_ENUM, PROP_NONE); Modified: trunk/blender/source/blender/makesrna/intern/rna_lamp.c === --- trunk/blender/source/blender/makesrna/intern/rna_lamp.c 2011-12-04 17:35:17 UTC (rev 42415) +++ trunk/blender/source/blender/makesrna/intern/rna_lamp.c 2011-12-04 17:36:13 UTC (rev 42416) @@ -172,9 +172,9 @@ PropertyRNA *prop; static EnumPropertyItem prop_texture_coordinates_items[] = { - {TEXCO_GLOB, GLOBAL, 0, Global, Uses global coordinates for the texture coordinates}, - {TEXCO_VIEW, VIEW, 0, View, Uses view coordinates for the texture coordinates}, - {TEXCO_OBJECT, OBJECT, 0, Object, Uses linked object's coordinates for texture coordinates}, + {TEXCO_GLOB, GLOBAL, 0, Global, Use global coordinates for the texture coordinates}, + {TEXCO_VIEW, VIEW, 0, View, Use view coordinates for the texture coordinates}, + {TEXCO_OBJECT, OBJECT, 0, Object, Use linked object's coordinates for texture coordinates}, {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, LampTextureSlot, TextureSlot); Modified: trunk/blender/source/blender/makesrna/intern/rna_material.c === --- trunk/blender/source/blender/makesrna/intern/rna_material.c 2011-12-04 17:35:17 UTC (rev 42415) +++ trunk/blender/source/blender/makesrna/intern/rna_material.c 2011-12-04 17:36:13 UTC (rev 42416) @@ -480,12 +480,12 @@ prop= RNA_def_property(srna, use_map_diffuse, PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, mapto, MAP_REF); - RNA_def_property_ui_text(prop, Diffuse, The texture to affects the value of the materials diffuse reflectivity); + RNA_def_property_ui_text(prop,
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42491] trunk/blender/source/blender/ editors/space_view3d/view3d_snap.c: More fix for snapto in Pose mode:
Revision: 42491 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42491 Author: mont29 Date: 2011-12-07 15:55:37 + (Wed, 07 Dec 2011) Log Message: --- More fix for snapto in Pose mode: * The code for snap to grid was completely wrong (only x pos of chan was affected?\226?\128?\166 by z computed value!), and the same problem as with snap to cursor was present (using armature_loc_pose_to_bone is wrong here). Also, computing nearest grid point in world space! Else, it generally ends up completely out of grid, due to object transforms... * Small cleanup of code (uneeded vars and copying). Modified Paths: -- trunk/blender/source/blender/editors/space_view3d/view3d_snap.c Modified: trunk/blender/source/blender/editors/space_view3d/view3d_snap.c === --- trunk/blender/source/blender/editors/space_view3d/view3d_snap.c 2011-12-07 15:21:38 UTC (rev 42490) +++ trunk/blender/source/blender/editors/space_view3d/view3d_snap.c 2011-12-07 15:55:37 UTC (rev 42491) @@ -501,28 +501,36 @@ bPoseChannel *pchan; bArmature *arm= ob-data; + invert_m4_m4(ob-imat, ob-obmat); + for (pchan= ob-pose-chanbase.first; pchan; pchan= pchan-next) { if(pchan-bone-flag BONE_SELECTED) { if(pchan-bone-layer arm-layer) { if((pchan-bone-flag BONE_CONNECTED)==0) { - float vecN[3], nLoc[3]; + float nLoc[3]; + float inv_restmat[4][4]; /* get nearest grid point to snap to */ copy_v3_v3(nLoc, pchan-pose_mat[3]); + /* We must operate in world space! */ + mul_m4_v3(ob-obmat, nLoc); vec[0]= gridf * (float)(floor(0.5f+ nLoc[0]/gridf)); vec[1]= gridf * (float)(floor(0.5f+ nLoc[1]/gridf)); vec[2]= gridf * (float)(floor(0.5f+ nLoc[2]/gridf)); + /* Back in object space... */ + mul_m4_v3(ob-imat, vec); - /* get bone-space location of grid point */ - armature_loc_pose_to_bone(pchan, vec, vecN); + /* get location of cursor in *rest* bone-space */ + invert_m4_m4(inv_restmat, pchan-bone-arm_mat); + mul_m4_v3(inv_restmat, vec); /* adjust location */ if ((pchan-protectflag OB_LOCK_LOCX)==0) - pchan-loc[0]= vecN[0]; + pchan-loc[0]= vec[0]; if ((pchan-protectflag OB_LOCK_LOCY)==0) - pchan-loc[0]= vecN[1]; + pchan-loc[1]= vec[1]; if ((pchan-protectflag OB_LOCK_LOCZ)==0) - pchan-loc[0]= vecN[2]; + pchan-loc[2]= vec[2]; /* auto-keyframing */ ED_autokeyframe_pchan(C, scene, ob, pchan, ks); @@ -630,31 +638,28 @@ if(ob-mode OB_MODE_POSE) { bPoseChannel *pchan;
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42492] trunk/blender/source/blender/ editors/space_view3d/view3d_snap.c: Grumpf. Stupid usual copypaste mistake in a comment, no functional changes.
Revision: 42492 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42492 Author: mont29 Date: 2011-12-07 16:21:01 + (Wed, 07 Dec 2011) Log Message: --- Grumpf. Stupid usual copypaste mistake in a comment, no functional changes. Not that important, but let's stay consistent! And as I was at it, I also cleared some dummy trailing white spaces... Modified Paths: -- trunk/blender/source/blender/editors/space_view3d/view3d_snap.c Modified: trunk/blender/source/blender/editors/space_view3d/view3d_snap.c === --- trunk/blender/source/blender/editors/space_view3d/view3d_snap.c 2011-12-07 15:55:37 UTC (rev 42491) +++ trunk/blender/source/blender/editors/space_view3d/view3d_snap.c 2011-12-07 16:21:01 UTC (rev 42492) @@ -91,9 +91,7 @@ /* copied from editobject.c, now uses (almost) proper depgraph */ static void special_transvert_update(Object *obedit) { - if(obedit) { - DAG_id_tag_update(obedit-data, 0); if(obedit-type==OB_MESH) { @@ -177,7 +175,7 @@ } } } - if(arm-flag ARM_MIRROR_EDIT) + if(arm-flag ARM_MIRROR_EDIT) transform_armature_mirror_update(obedit); } else if(obedit-type==OB_LATTICE) { @@ -193,7 +191,7 @@ /* mode flags: */ #define TM_ALL_JOINTS 1 /* all joints (for bones only) */ #define TM_SKIP_HANDLES2 /* skip handles when control point is selected (for curves only) */ -static void make_trans_verts(Object *obedit, float *min, float *max, int mode) +static void make_trans_verts(Object *obedit, float *min, float *max, int mode) { Nurb *nu; BezTriple *bezt; @@ -278,7 +276,7 @@ if ((tipsel rootsel) || (rootsel)) { /* Don't add the tip (unless mode TM_ALL_JOINTS, for getting all joints), * otherwise we get zero-length bones as tips will snap to the same -* location as heads. +* location as heads. */ if (rootok) { copy_v3_v3(tv-oldloc, ebo-head); @@ -296,7 +294,7 @@ tv-flag= 1; tv++; tottrans++; - } + } } else if (tipsel) { copy_v3_v3(tv-oldloc, ebo-tail); @@ -306,7 +304,7 @@ tv++; tottrans++; } - } + } } } else if (ELEM(obedit-type, OB_CURVE, OB_SURF)) { @@ -465,7 +463,7 @@ if(obedit) { tottrans= 0; - if ELEM6(obedit-type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL) + if ELEM6(obedit-type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL) make_trans_verts(obedit, bmat[0], bmat[1], 0); if(tottrans==0) return OPERATOR_CANCELLED; @@ -474,7 +472,6 @@ tv= transvmain; for(a=0; atottrans; a++, tv++) { - copy_v3_v3(vec, tv-loc); mul_m3_v3(bmat, vec); add_v3_v3(vec, obedit-obmat[3]); @@ -491,7 +488,6 @@ MEM_freeN(transvmain); transvmain= NULL; - } else { struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); @@ -506,8 +502,8 @@ for (pchan= ob-pose-chanbase.first; pchan; pchan= pchan-next) { if(pchan-bone-flag BONE_SELECTED) { if(pchan-bone-layer arm-layer) { - if((pchan-bone-flag BONE_CONNECTED)==0) { - float nLoc[3]; + if((pchan-bone-flag BONE_CONNECTED)==0) { + float nLoc[3];
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42515] trunk/blender/source/blender/ modifiers/intern/MOD_hook.c: Fix [#29543] Hook modifier: falloff + vgroup influence broken
Revision: 42515 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42515 Author: mont29 Date: 2011-12-08 15:50:28 + (Thu, 08 Dec 2011) Log Message: --- Fix [#29543] Hook modifier: falloff + vgroup influence broken A valid derivedmesh is needed for modifier_get_vgroup to work, and it wasn?\226?\128?\153t take care of when not in edit mode... Checked quickly the other deform modifiers, they all seem to handle this correctly. Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_hook.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_hook.c === --- trunk/blender/source/blender/modifiers/intern/MOD_hook.c2011-12-08 14:26:46 UTC (rev 42514) +++ trunk/blender/source/blender/modifiers/intern/MOD_hook.c2011-12-08 15:50:28 UTC (rev 42515) @@ -143,14 +143,9 @@ return fac; } -static void deformVerts(ModifierData *md, Object *ob, - DerivedMesh *dm, - float (*vertexCos)[3], - int numVerts, - int UNUSED(useRenderParams), - int UNUSED(isFinalCalc)) +static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm, + float (*vertexCos)[3], int numVerts) { - HookModifierData *hmd = (HookModifierData*) md; bPoseChannel *pchan= get_pose_channel(hmd-object-pose, hmd-subtarget); float vec[3], mat[4][4], dmat[4][4]; int i, *index_pt; @@ -251,17 +246,29 @@ } } -static void deformVertsEM( - ModifierData *md, Object *ob, struct EditMesh *editData, - DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) +static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, +float (*vertexCos)[3], int numVerts, +int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) { - DerivedMesh *dm = derivedData; + HookModifierData *hmd = (HookModifierData*) md; + DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, 0); - if(!derivedData) dm = CDDM_from_editmesh(editData, ob-data); + deformVerts_do(hmd, ob, dm, vertexCos, numVerts); - deformVerts(md, ob, dm, vertexCos, numVerts, 0, 0); + if(derivedData != dm) + dm-release(dm); +} - if(!derivedData) dm-release(dm); +static void deformVertsEM(ModifierData *md, Object *ob, struct EditMesh *editData, + DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) +{ + HookModifierData *hmd = (HookModifierData*) md; + DerivedMesh *dm = get_dm(ob, editData, derivedData, NULL, 0); + + deformVerts_do(hmd, ob, dm, vertexCos, numVerts); + + if(derivedData != dm) + dm-release(dm); } ___ 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 [42606] branches/vgroup_modifiers/source/ blender/modifiers/intern: Merged 39990:42605 from trunk (arf!)
Revision: 42606 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42606 Author: mont29 Date: 2011-12-13 16:36:13 + (Tue, 13 Dec 2011) Log Message: --- Merged 39990:42605 from trunk (arf!) Modified Paths: -- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_armature.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_array.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_bevel.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_boolean.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_boolean_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_boolean_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_build.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_cast.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_cloth.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_collision.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_curve.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_decimate.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_displace.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_edgesplit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_explode.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_fluidsim.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_fluidsim_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_fluidsim_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_hook.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_lattice.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_mask.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_meshdeform.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_mirror.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_multires.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_none.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_particleinstance.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_particlesystem.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_screw.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_shapekey.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_shrinkwrap.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_simpledeform.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_smoke.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_smooth.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_softbody.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_solidify.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_subsurf.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_surface.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_uvproject.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_warp.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_wave.c Added Paths: --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_dynamicpaint.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_ocean.c Property Changed: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_armature.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_array.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_bevel.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_boolean.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_boolean_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_boolean_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_build.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_cast.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_cloth.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_collision.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_curve.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_decimate.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_displace.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_edgesplit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_explode.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_fluidsim.c
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42631] branches/vgroup_modifiers: Adding optionnal weight preview in Weight Paint mode ( code inspired by Dynapaint one).
Revision: 42631 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42631 Author: mont29 Date: 2011-12-14 15:56:42 + (Wed, 14 Dec 2011) Log Message: --- Adding optionnal weight preview in Weight Paint mode (code inspired by Dynapaint one). Also re-enabled the eModifierTypeFlag_SupportsMapping flag, as it seems to not crash anymore (???). And finally, done some minor style editing... Modified Paths: -- branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py branches/vgroup_modifiers/source/blender/makesdna/DNA_modifier_types.h branches/vgroup_modifiers/source/blender/makesrna/intern/rna_modifier.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py === --- branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py 2011-12-14 14:53:22 UTC (rev 42630) +++ branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py 2011-12-14 15:56:42 UTC (rev 42631) @@ -814,7 +814,9 @@ col.prop(md, narrowness, slider=True) @staticmethod -def vertex_weight_mask(layout, ob, md): +def vertex_weight_common(layout, ob, md): +layout.prop(md, use_weight_preview) + layout.label(text=Influence/Mask Options:) split = layout.split(percentage=0.4) @@ -875,7 +877,7 @@ # Common mask options layout.separator() -self.vertex_weight_mask(layout, ob, md) +self.vertex_weight_common(layout, ob, md) def VERTEX_WEIGHT_MIX(self, layout, ob, md): split = layout.split() @@ -900,7 +902,7 @@ # Common mask options layout.separator() -self.vertex_weight_mask(layout, ob, md) +self.vertex_weight_common(layout, ob, md) def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md): split = layout.split() @@ -925,7 +927,7 @@ # Common mask options layout.separator() -self.vertex_weight_mask(layout, ob, md) +self.vertex_weight_common(layout, ob, md) if __name__ == __main__: # only for live edit. bpy.utils.register_module(__name__) Modified: branches/vgroup_modifiers/source/blender/makesdna/DNA_modifier_types.h === --- branches/vgroup_modifiers/source/blender/makesdna/DNA_modifier_types.h 2011-12-14 14:53:22 UTC (rev 42630) +++ branches/vgroup_modifiers/source/blender/makesdna/DNA_modifier_types.h 2011-12-14 15:56:42 UTC (rev 42631) @@ -863,11 +863,13 @@ float default_weight; /* Weight for vertices not in vgroup. */ /* Mapping stuff. */ - struct CurveMapping *cmap_curve; /* The custom mapping curve! */ + struct CurveMapping *cmap_curve; /* The custom mapping curve! */ /* The add/remove vertices weight thresholds. */ float add_threshold, rem_threshold; + /* -Common Options- */ + /* XXX This part must be in sync between all WeightVG modifiers! */ /* Masking options. */ float mask_constant; /* The global influence, if no vgroup nor tex is used as mask. */ /* Name of mask vertex group from which to get weight factors. */ @@ -875,14 +877,14 @@ /* Texture masking. */ int mask_tex_use_channel; /* Which channel to use as weightf. */ - struct Tex *mask_texture; /* The texture. */ - struct Object *mask_tex_map_obj; /* Name of the map object. */ + struct Tex *mask_texture; /* The texture. */ + struct Object *mask_tex_map_obj; /* Name of the map object. */ /* How to map the texture (using MOD_DISP_MAP_* constants). */ int mask_tex_mapping; charmask_tex_uvlayer_name[32]; /* Name of the UV map. */ - /* Padding... */ - int pad_i1; + /* Misc flags (for now, only Weight Preview in Weight Paint mode...). */ + int common_flags; } WeightVGEditModifierData; /* WeightVGEdit flags. */ @@ -905,15 +907,17 @@ /* XXX Note: I tried to keep everything logically ordered – provided the * alignment constraints... */ - chardefgrp_name_a[32]; /* Name of vertex group to modify/weight. */ + chardefgrp_name_a[32]; /* Name of vertex group to modify/weight. */ chardefgrp_name_b[32]; /* Name of other vertex group to mix in. */ -
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42639] trunk/blender/source/blender/ modifiers/intern/MOD_hook.c: New fix for [#29543] Hook modifier: falloff + vgroup influence broken
Revision: 42639 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42639 Author: mont29 Date: 2011-12-15 08:57:48 + (Thu, 15 Dec 2011) Log Message: --- New fix for [#29543] Hook modifier: falloff + vgroup influence broken Don't know why, but creating a dm when there was none broke multi hooks on curves (see #29567)... So as a valid dm is only mandatory for meshes when a vgroup is set, only create it in those cases! Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_hook.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_hook.c === --- trunk/blender/source/blender/modifiers/intern/MOD_hook.c2011-12-15 08:01:49 UTC (rev 42638) +++ trunk/blender/source/blender/modifiers/intern/MOD_hook.c2011-12-15 08:57:48 UTC (rev 42639) @@ -249,15 +249,25 @@ int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) { HookModifierData *hmd = (HookModifierData*) md; - - deformVerts_do(hmd, ob, derivedData, vertexCos, numVerts); + DerivedMesh *dm = derivedData; + /* We need a valid dm for meshes when a vgroup is set... */ + if(!dm ob-type == OB_MESH hmd-name[0] != '\0') + dm = get_dm(ob, NULL, dm, NULL, 0); + + deformVerts_do(hmd, ob, dm, vertexCos, numVerts); + + if(derivedData != dm) + dm-release(dm); } static void deformVertsEM(ModifierData *md, Object *ob, struct EditMesh *editData, DerivedMesh *derivedData, float (*vertexCos)[3], int numVerts) { HookModifierData *hmd = (HookModifierData*) md; - DerivedMesh *dm = get_dm(ob, editData, derivedData, NULL, 0); + DerivedMesh *dm = derivedData; + /* We need a valid dm for meshes when a vgroup is set... */ + if(!dm ob-type == OB_MESH hmd-name[0] != '\0') + dm = get_dm(ob, editData, dm, NULL, 0); deformVerts_do(hmd, ob, dm, vertexCos, numVerts); ___ 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 [42684] branches/vgroup_modifiers/source/ blender/modifiers/intern: Minor fixes for weight preview.
Revision: 42684 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42684 Author: mont29 Date: 2011-12-17 12:09:28 + (Sat, 17 Dec 2011) Log Message: --- Minor fixes for weight preview. Modified Paths: -- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c === --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c 2011-12-17 03:49:39 UTC (rev 42683) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c 2011-12-17 12:09:28 UTC (rev 42684) @@ -265,7 +265,7 @@ * If indices is not NULL, it must be a table of same length as weights, mapping to the real * vertex index (in case the weight table does not cover the whole vertices...). */ -void weightvg_set_weightcol(DerivedMesh *dm, int num, const int *indices, const float *weights) +void weightvg_set_weightcol(DerivedMesh *dm, int num, const int *indices, float *weights) { MFace *mface = dm-getFaceArray(dm); int nfaces = dm-getNumFaces(dm); @@ -292,6 +292,7 @@ while(j--) { int idx = (j==0)?mface[i].v1: (j==1)?mface[i].v2: (j==2)?mface[i].v3: mface[i].v4; + CLAMP(w[idx], 0.0f, 1.0f); weight_to_rgb(temp_color, w[idx]); col[i*4+j].r = FTOCHAR(temp_color[2]); col[i*4+j].g = FTOCHAR(temp_color[1]); Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.h === --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.h 2011-12-17 03:49:39 UTC (rev 42683) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.h 2011-12-17 12:09:28 UTC (rev 42684) @@ -89,6 +89,6 @@ * If indices is not NULL, it must be a table of same length as weights, mapping to the real * vertex index (in case the weight table does not cover the whole vertices...). */ -void weightvg_set_weightcol(DerivedMesh *dm, int num, const int *indices, const float *weights); +void weightvg_set_weightcol(DerivedMesh *dm, int num, const int *indices, float *weights); #endif /* MOD_WEIGHTVG_UTIL_H */ Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c === --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-12-17 03:49:39 UTC (rev 42683) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-12-17 12:09:28 UTC (rev 42684) @@ -114,6 +114,10 @@ if(wmd-mask_tex_mapping == MOD_DISP_MAP_UV) dataMask |= CD_MASK_MTFACE; + /* Ask for weight MCOL if needed. */ + if(wmd-common_flags MOD_WVG_CFLAG_WEIGHT_PREVIEW) + dataMask |= CD_MASK_WEIGHT_MCOL; + return dataMask; } Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c === --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c 2011-12-17 03:49:39 UTC (rev 42683) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c 2011-12-17 12:09:28 UTC (rev 42684) @@ -156,6 +156,10 @@ if(wmd-mask_tex_mapping == MOD_DISP_MAP_UV) dataMask |= CD_MASK_MTFACE; + /* Ask for weight MCOL if needed. */ + if(wmd-common_flags MOD_WVG_CFLAG_WEIGHT_PREVIEW) + dataMask |= CD_MASK_WEIGHT_MCOL; + return dataMask; } Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c === --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-12-17 03:49:39 UTC (rev 42683) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-12-17 12:09:28 UTC (rev 42684) @@ -262,6 +262,10 @@ if(wmd-mask_tex_mapping == MOD_DISP_MAP_UV) dataMask |= CD_MASK_MTFACE; + /* Ask for weight MCOL if needed. */ + if(wmd-common_flags MOD_WVG_CFLAG_WEIGHT_PREVIEW) + dataMask |= CD_MASK_WEIGHT_MCOL; + return dataMask; }
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42685] branches/vgroup_modifiers: Merged with trunk (42606:42684).
Revision: 42685 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42685 Author: mont29 Date: 2011-12-17 12:29:51 + (Sat, 17 Dec 2011) Log Message: --- Merged with trunk (42606:42684). Modified Paths: -- branches/vgroup_modifiers/extern/eltopo/CMakeLists.txt branches/vgroup_modifiers/extern/eltopo/common/gluvi.h branches/vgroup_modifiers/extern/eltopo/common/predicates.cpp branches/vgroup_modifiers/extern/eltopo/common/tunicate/orientation.cpp branches/vgroup_modifiers/extern/eltopo/common/tunicate/sos_orientation.cpp branches/vgroup_modifiers/extern/eltopo/eltopo3d/dynamicsurface.cpp branches/vgroup_modifiers/extern/eltopo/eltopo3d/surftrack.cpp branches/vgroup_modifiers/extern/libmv/CMakeLists.txt branches/vgroup_modifiers/extern/libmv/SConscript branches/vgroup_modifiers/extern/libmv/bundle.sh branches/vgroup_modifiers/extern/libmv/files.txt branches/vgroup_modifiers/extern/libmv/mkfiles.sh branches/vgroup_modifiers/intern/audaspace/intern/AUD_C-API.cpp branches/vgroup_modifiers/intern/cycles/app/cycles_xml.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_shader.cpp branches/vgroup_modifiers/intern/cycles/kernel/CMakeLists.txt branches/vgroup_modifiers/intern/cycles/kernel/osl/nodes/CMakeLists.txt branches/vgroup_modifiers/intern/cycles/kernel/svm/svm.h branches/vgroup_modifiers/intern/cycles/kernel/svm/svm_types.h branches/vgroup_modifiers/intern/cycles/render/nodes.cpp branches/vgroup_modifiers/intern/cycles/render/nodes.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemWin32.cpp branches/vgroup_modifiers/release/datafiles/splash.png branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_texture.py branches/vgroup_modifiers/source/blender/avi/intern/avi.c branches/vgroup_modifiers/source/blender/avi/intern/codecs.c branches/vgroup_modifiers/source/blender/avi/intern/endian.c branches/vgroup_modifiers/source/blender/avi/intern/mjpeg.c branches/vgroup_modifiers/source/blender/avi/intern/options.c branches/vgroup_modifiers/source/blender/avi/intern/rgb32.c branches/vgroup_modifiers/source/blender/blenkernel/BKE_blender.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_deform.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_node.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_object.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_tracking.h branches/vgroup_modifiers/source/blender/blenkernel/intern/CCGSubSurf.c branches/vgroup_modifiers/source/blender/blenkernel/intern/CCGSubSurf.h branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/anim.c branches/vgroup_modifiers/source/blender/blenkernel/intern/armature.c branches/vgroup_modifiers/source/blender/blenkernel/intern/boids.c branches/vgroup_modifiers/source/blender/blenkernel/intern/camera.c branches/vgroup_modifiers/source/blender/blenkernel/intern/constraint.c branches/vgroup_modifiers/source/blender/blenkernel/intern/customdata.c branches/vgroup_modifiers/source/blender/blenkernel/intern/deform.c branches/vgroup_modifiers/source/blender/blenkernel/intern/fcurve.c branches/vgroup_modifiers/source/blender/blenkernel/intern/image.c branches/vgroup_modifiers/source/blender/blenkernel/intern/image_gen.c branches/vgroup_modifiers/source/blender/blenkernel/intern/lattice.c branches/vgroup_modifiers/source/blender/blenkernel/intern/material.c branches/vgroup_modifiers/source/blender/blenkernel/intern/mball.c branches/vgroup_modifiers/source/blender/blenkernel/intern/node.c branches/vgroup_modifiers/source/blender/blenkernel/intern/object.c branches/vgroup_modifiers/source/blender/blenkernel/intern/ocean.c branches/vgroup_modifiers/source/blender/blenkernel/intern/particle.c branches/vgroup_modifiers/source/blender/blenkernel/intern/pointcache.c branches/vgroup_modifiers/source/blender/blenkernel/intern/subsurf_ccg.c branches/vgroup_modifiers/source/blender/blenkernel/intern/suggestions.c branches/vgroup_modifiers/source/blender/blenkernel/intern/text.c branches/vgroup_modifiers/source/blender/blenkernel/intern/tracking.c branches/vgroup_modifiers/source/blender/blenlib/BLI_ghash.h branches/vgroup_modifiers/source/blender/blenlib/BLI_math_base.h branches/vgroup_modifiers/source/blender/blenlib/BLI_math_geom.h branches/vgroup_modifiers/source/blender/blenlib/BLI_math_matrix.h branches/vgroup_modifiers/source/blender/blenlib/intern/BLI_dynstr.c branches/vgroup_modifiers/source/blender/blenlib/intern/BLI_ghash.c branches/vgroup_modifiers/source/blender/blenlib/intern/BLI_linklist.c branches/vgroup_modifiers/source/blender/blenlib/intern/BLI_memarena.c
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42692] trunk/blender/source/blender: Quite some compiler warnings...
Revision: 42692 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42692 Author: mont29 Date: 2011-12-17 16:22:08 + (Sat, 17 Dec 2011) Log Message: --- Quite some compiler warnings... Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c trunk/blender/source/blender/blenkernel/intern/deform.c trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c trunk/blender/source/blender/blenkernel/intern/tracking.c trunk/blender/source/blender/editors/object/object_vgroup.c Modified: trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c === --- trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c 2011-12-17 15:05:35 UTC (rev 42691) +++ trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c 2011-12-17 16:22:08 UTC (rev 42692) @@ -657,7 +657,7 @@ float *nors= dm-getFaceDataArray(dm, CD_NORMAL); MTFace *tf = DM_get_face_data_layer(dm, CD_MTFACE); int i, j, orig, *index = DM_get_face_data_layer(dm, CD_ORIGINDEX); - int startFace = 0, lastFlag = 0xdeadbeef; + int startFace = 0 /*, lastFlag = 0xdeadbeef */ /* UNUSED */; MCol *mcol = dm-getFaceDataArray(dm, CD_WEIGHT_MCOL); if(!mcol) mcol = dm-getFaceDataArray(dm, CD_MCOL); @@ -776,7 +776,7 @@ int next_actualFace= dm-drawObject-triangle_to_mface[0]; glShadeModel( GL_SMOOTH ); - lastFlag = 0; + /* lastFlag = 0; */ /* UNUSED */ for(i = 0; i tottri; i++) { int actualFace = next_actualFace; int flag = 1; Modified: trunk/blender/source/blender/blenkernel/intern/deform.c === --- trunk/blender/source/blender/blenkernel/intern/deform.c 2011-12-17 15:05:35 UTC (rev 42691) +++ trunk/blender/source/blender/blenkernel/intern/deform.c 2011-12-17 16:22:08 UTC (rev 42692) @@ -213,7 +213,7 @@ dvert-dw[0].weight= 1.0f; } else { - MDeformWeight *dw_lock; + MDeformWeight *dw_lock = NULL; MDeformWeight *dw; unsigned int i; float tot_weight= 0.0f; Modified: trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c === --- trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c 2011-12-17 15:05:35 UTC (rev 42691) +++ trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c 2011-12-17 16:22:08 UTC (rev 42692) @@ -3220,7 +3220,7 @@ /* hit data */ float hitCoord[3]; int hitFace = -1; - short hitQuad; + short hitQuad = 0; /* Supersampling factor */ if (samples 1 surface-format == MOD_DPAINT_SURFACE_F_IMAGESEQ) @@ -4647,7 +4647,7 @@ #pragma omp parallel for schedule(static) for (index=0; indexsData-total_points; index++) { - float prev_point[3]; + float prev_point[3] = {0.0f, 0.0f, 0.0f}; if (do_velocity_data !new_bdata) { copy_v3_v3(prev_point, bData-realCoord[bData-s_pos[index]].v); } Modified: trunk/blender/source/blender/blenkernel/intern/tracking.c === --- trunk/blender/source/blender/blenkernel/intern/tracking.c 2011-12-17 15:05:35 UTC (rev 42691) +++ trunk/blender/source/blender/blenkernel/intern/tracking.c 2011-12-17 16:22:08 UTC (rev 42692) @@ -1154,7 +1154,7 @@ #pragma omp parallel for private(a) shared(ibuf_new, ok) if(map_size1) for(a= 0; amap_size; a++) { - TrackContext *track_context; + TrackContext *track_context = NULL; MovieTrackingTrack *track; MovieTrackingMarker *marker; Modified: trunk/blender/source/blender/editors/object/object_vgroup.c === --- trunk/blender/source/blender/editors/object/object_vgroup.c 2011-12-17 15:05:35 UTC (rev 42691) +++ trunk/blender/source/blender/editors/object/object_vgroup.c 2011-12-17 16:22:08 UTC (rev 42692) @@ -892,7 +892,7 @@ int totweight = dvert-totweight; float oldw = 0; float oldPos[3] = {0}; - float vc, hc, dist; + float vc, hc, dist = 0.0f; int i, k; float (*changes)[2] =
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42722] trunk/blender/source/blender: Fix a bug in CustomData_duplicate_referenced_layer(_named) functions: MEM_dupallocN does not work with complex l
Revision: 42722 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42722 Author: mont29 Date: 2011-12-19 08:26:53 + (Mon, 19 Dec 2011) Log Message: --- Fix a bug in CustomData_duplicate_referenced_layer(_named) functions: MEM_dupallocN does not work with complex layers like CD_MDEFORMVERT ones, so rather use copy func when available. Modified Paths: -- trunk/blender/source/blender/blenkernel/BKE_customdata.h trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c trunk/blender/source/blender/blenkernel/intern/customdata.c trunk/blender/source/blender/modifiers/intern/MOD_solidify.c trunk/blender/source/blender/modifiers/intern/MOD_uvproject.c Modified: trunk/blender/source/blender/blenkernel/BKE_customdata.h === --- trunk/blender/source/blender/blenkernel/BKE_customdata.h2011-12-19 05:23:52 UTC (rev 42721) +++ trunk/blender/source/blender/blenkernel/BKE_customdata.h2011-12-19 08:26:53 UTC (rev 42722) @@ -121,9 +121,9 @@ /* duplicate data of a layer with flag NOFREE, and remove that flag. * returns the layer data */ -void *CustomData_duplicate_referenced_layer(struct CustomData *data, int type); +void *CustomData_duplicate_referenced_layer(struct CustomData *data, const int type, const int totelem); void *CustomData_duplicate_referenced_layer_named(struct CustomData *data, - int type, const char *name); + const int type, const char *name, const int totelem); /* set the CD_FLAG_NOCOPY flag in custom data layers where the mask is * zero for the layer type, so only layer types specified by the mask Modified: trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c === --- trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c 2011-12-19 05:23:52 UTC (rev 42721) +++ trunk/blender/source/blender/blenkernel/intern/cdderivedmesh.c 2011-12-19 08:26:53 UTC (rev 42722) @@ -1870,7 +1870,7 @@ int i; /* this will just return the pointer if it wasn't a referenced layer */ - vert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MVERT); + vert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MVERT, dm-numVertData); cddm-mvert = vert; for(i = 0; i dm-numVertData; ++i, ++vert) @@ -1884,7 +1884,7 @@ int i; /* this will just return the pointer if it wasn't a referenced layer */ - vert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MVERT); + vert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MVERT, dm-numVertData); cddm-mvert = vert; for(i = 0; i dm-numVertData; ++i, ++vert) @@ -1899,7 +1899,7 @@ if(dm-numVertData == 0) return; /* we don't want to overwrite any referenced layers */ - cddm-mvert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MVERT); + cddm-mvert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MVERT, dm-numVertData); /* make a face normal layer if not present */ face_nors = CustomData_get_layer(dm-faceData, CD_NORMAL); Modified: trunk/blender/source/blender/blenkernel/intern/customdata.c === --- trunk/blender/source/blender/blenkernel/intern/customdata.c 2011-12-19 05:23:52 UTC (rev 42721) +++ trunk/blender/source/blender/blenkernel/intern/customdata.c 2011-12-19 08:26:53 UTC (rev 42722) @@ -1404,7 +1404,7 @@ return number; } -void *CustomData_duplicate_referenced_layer(struct CustomData *data, int type) +void *CustomData_duplicate_referenced_layer(struct CustomData *data, const int type, const int totelem) { CustomDataLayer *layer; int layer_index; @@ -1416,7 +1416,20 @@ layer = data-layers[layer_index]; if (layer-flag CD_FLAG_NOFREE) { - layer-data = MEM_dupallocN(layer-data); + /* MEM_dupallocN won’t work in case of complex layers, like e.g. +* CD_MDEFORMVERT, which has pointers to allocated data... +* So in case a custom copy function is defined, use it! +*/ + const LayerTypeInfo *typeInfo = layerType_getInfo(layer-type); + + if(typeInfo-copy) { + char *dest_data = MEM_mallocN(typeInfo-size * totelem, CD duplicate ref layer); + typeInfo-copy(layer-data, dest_data, totelem); + layer-data = dest_data; + } + else + layer-data = MEM_dupallocN(layer-data); + layer-flag = ~CD_FLAG_NOFREE; } @@ -1424,7
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42728] trunk/blender/source/blender/ modifiers/intern: Much cleaner and satisfying code in weightvg modifiers' init: copy only the CD_DEFORMVERT d
Revision: 42728 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42728 Author: mont29 Date: 2011-12-19 14:09:36 + (Mon, 19 Dec 2011) Log Message: --- Much cleaner and satisfying code in weightvg modifiers' init: copy only the CD_DEFORMVERT data layer (if it's the org one), and not the whole DerivedMesh! Quite oddly, for Proximity mod, this increases the performances of the apply func (about 20-25%, e.g. from 0.04 to 0.03 sec), but decreases the global framerate (e.g. in TEST_5 scene of testing file, I lose about 7%, from 4.6 to 4.3fps (open ATI driver)...). Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c === --- trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-12-19 12:54:06 UTC (rev 42727) +++ trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-12-19 14:09:36 UTC (rev 42728) @@ -177,10 +177,7 @@ int UNUSED(useRenderParams), int UNUSED(isFinalCalc)) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md; - DerivedMesh *dm = derivedData, *ret = NULL; -#if 0 - Mesh *ob_m = NULL; -#endif + DerivedMesh *dm = derivedData; MDeformVert *dvert = NULL; MDeformWeight **dw = NULL; float *org_w; /* Array original weights. */ @@ -188,7 +185,6 @@ int numVerts; int defgrp_idx; int i; - char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */ /* Flags. */ int do_add = (wmd-edit_flags MOD_WVG_EDIT_ADD2VG) != 0; int do_rem = (wmd-edit_flags MOD_WVG_EDIT_REMFVG) != 0; @@ -207,50 +203,8 @@ if (defgrp_idx 0) return dm; - /* XXX All this to avoid copying dm when not needed... However, it nearly doubles compute -* time! See scene 5 of the WeighVG test file... -*/ -#if 0 - /* Get actual dverts (ie vertex group data). */ - dvert = dm-getVertDataArray(dm, CD_MDEFORMVERT); - /* If no dverts, return unmodified data... */ - if (dvert == NULL) - return dm; + dvert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MDEFORMVERT, numVerts); - /* Get org mesh, only to test whether affected cdata layer has already been copied -* somewhere up in the modifiers stack. -*/ - ob_m = get_mesh(ob); - if (ob_m == NULL) - return dm; - - /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */ - if (dvert == CustomData_get_layer(ob_m-vdata, CD_MDEFORMVERT)) { - /* XXX Seems to create problems with weightpaint mode??? -* I'm missing something here, I guess... -*/ -// DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */ - ret = CDDM_copy(dm); - dvert = ret-getVertDataArray(ret, CD_MDEFORMVERT); - if (dvert == NULL) { - ret-release(ret); - return dm; - } - rel_ret = 1; - } - else - ret = dm; -#else - ret = CDDM_copy(dm); - rel_ret = 1; - dvert = ret-getVertDataArray(ret, CD_MDEFORMVERT); - if (dvert == NULL) { - if (rel_ret) - ret-release(ret); - return dm; - } -#endif - /* Get org weights, assuming 0.0 for vertices not in given vgroup. */ org_w = MEM_mallocN(sizeof(float) * numVerts, WeightVGEdit Modifier, org_w); new_w = MEM_mallocN(sizeof(float) * numVerts, WeightVGEdit Modifier, new_w); @@ -271,7 +225,7 @@ } /* Do masking. */ - weightvg_do_mask(numVerts, NULL, org_w, new_w, ob, ret, wmd-mask_constant, + weightvg_do_mask(numVerts, NULL, org_w, new_w, ob, dm, wmd-mask_constant, wmd-mask_defgrp_name, wmd-mask_texture, wmd-mask_tex_use_channel, wmd-mask_tex_mapping, wmd-mask_tex_map_obj, wmd-mask_tex_uvlayer_name); @@ -285,7 +239,7 @@ MEM_freeN(dw); /* Return the vgroup-modified mesh. */ - return ret; + return dm; } static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, Modified: trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c === --- trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c 2011-12-19 12:54:06 UTC (rev 42727) +++
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42760] trunk/blender/source/blender/ modifiers/intern/MOD_uvproject.c: Fix a small typo-bug in UVProject modifier ( using v3 instead of v4 to detect
Revision: 42760 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42760 Author: mont29 Date: 2011-12-20 09:57:01 + (Tue, 20 Dec 2011) Log Message: --- Fix a small typo-bug in UVProject modifier (using v3 instead of v4 to detect tri/quad faces). Seems it was harmless, though... Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_uvproject.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_uvproject.c === --- trunk/blender/source/blender/modifiers/intern/MOD_uvproject.c 2011-12-20 08:47:36 UTC (rev 42759) +++ trunk/blender/source/blender/modifiers/intern/MOD_uvproject.c 2011-12-20 09:57:01 UTC (rev 42760) @@ -290,7 +290,7 @@ project_from_camera(tface-uv[0], coords[mf-v1], projectors[0].uci); project_from_camera(tface-uv[1], coords[mf-v2], projectors[0].uci); project_from_camera(tface-uv[2], coords[mf-v3], projectors[0].uci); - if(mf-v3) + if(mf-v4) project_from_camera(tface-uv[3], coords[mf-v4], projectors[0].uci); } else { @@ -343,7 +343,7 @@ project_from_camera(tface-uv[0], coords[mf-v1], best_projector-uci); project_from_camera(tface-uv[1], coords[mf-v2], best_projector-uci); project_from_camera(tface-uv[2], coords[mf-v3], best_projector-uci); - if(mf-v3) + if(mf-v4) project_from_camera(tface-uv[3], coords[mf-v4], best_projector-uci); } else { ___ 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 [42769] trunk/blender/source/blender: New modifier type: eModifierTypeType_NonGeometrical, for modifiers affecting CustomData layers only (e.g.
Revision: 42769 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42769 Author: mont29 Date: 2011-12-20 14:15:59 + (Tue, 20 Dec 2011) Log Message: --- New modifier type: eModifierTypeType_NonGeometrical, for modifiers affecting CustomData layers only (e.g. UVProject and WeightVG ones). Also, allow applying to obdata those modifiers, even with shapekeys, but do not allow applying them *as* shapekey (as shapekeys do not have CD layers). Fix [#29636] Vertex Weight Mix modifier apply button don't work. Note: applying whit shape keys currently always uses base shape, not current one (for apply to obdata as well as apply to shapekey), but this is another topic... Modified Paths: -- trunk/blender/source/blender/blenkernel/BKE_modifier.h trunk/blender/source/blender/blenkernel/intern/modifier.c trunk/blender/source/blender/editors/interface/interface_templates.c trunk/blender/source/blender/editors/object/object_modifier.c trunk/blender/source/blender/modifiers/intern/MOD_uvproject.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: trunk/blender/source/blender/blenkernel/BKE_modifier.h === --- trunk/blender/source/blender/blenkernel/BKE_modifier.h 2011-12-20 13:51:16 UTC (rev 42768) +++ trunk/blender/source/blender/blenkernel/BKE_modifier.h 2011-12-20 14:15:59 UTC (rev 42769) @@ -65,6 +65,11 @@ * unless it's a mesh and can be exploded - curve can also emit particles */ eModifierTypeType_DeformOrConstruct, + + /* Like eModifierTypeType_Nonconstructive, but does not affect the geometry +* of the object, rather some of its CustomData layers. +* E.g. UVProject and WeightVG modifiers. */ + eModifierTypeType_NonGeometrical, } ModifierTypeType; typedef enum { @@ -311,6 +316,7 @@ int modifier_couldBeCage(struct Scene *scene, struct ModifierData *md); int modifier_isCorrectableDeformed(struct ModifierData *md); int modifier_sameTopology(ModifierData *md); +int modifier_nonGeometrical(ModifierData *md); int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode); void modifier_setError(struct ModifierData *md, const char *format, ...) #ifdef __GNUC__ Modified: trunk/blender/source/blender/blenkernel/intern/modifier.c === --- trunk/blender/source/blender/blenkernel/intern/modifier.c 2011-12-20 13:51:16 UTC (rev 42768) +++ trunk/blender/source/blender/blenkernel/intern/modifier.c 2011-12-20 14:15:59 UTC (rev 42769) @@ -239,9 +239,16 @@ int modifier_sameTopology(ModifierData *md) { ModifierTypeInfo *mti = modifierType_getInfo(md-type); - return ( mti-type == eModifierTypeType_OnlyDeform || mti-type == eModifierTypeType_Nonconstructive); + return ELEM3(mti-type, eModifierTypeType_OnlyDeform, eModifierTypeType_Nonconstructive, +eModifierTypeType_NonGeometrical); } +int modifier_nonGeometrical(ModifierData *md) +{ + ModifierTypeInfo *mti = modifierType_getInfo(md-type); + return (mti-type == eModifierTypeType_NonGeometrical); +} + void modifier_setError(ModifierData *md, const char *format, ...) { char buffer[512]; Modified: trunk/blender/source/blender/editors/interface/interface_templates.c === --- trunk/blender/source/blender/editors/interface/interface_templates.c 2011-12-20 13:51:16 UTC (rev 42768) +++ trunk/blender/source/blender/editors/interface/interface_templates.c 2011-12-20 14:15:59 UTC (rev 42769) @@ -845,7 +845,7 @@ uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT); uiItemEnumO(row, OBJECT_OT_modifier_apply, IFACE_(Apply), 0, apply_as, MODIFIER_APPLY_DATA); - if (modifier_sameTopology(md)) + if (modifier_sameTopology(md) !modifier_nonGeometrical(md)) uiItemEnumO(row, OBJECT_OT_modifier_apply, IFACE_(Apply as Shape), 0, apply_as, MODIFIER_APPLY_SHAPE); } @@ -853,7 +853,7 @@ uiBlockSetButLock(block, ob ob-id.lib, ERROR_LIBDATA_MESSAGE); if (!ELEM5(md-type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth, eModifierType_Smoke)) - uiItemO(row, TIP_(Copy), ICON_NONE, OBJECT_OT_modifier_copy); +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42794] trunk/blender/source/blender: Small i18n edits:
Revision: 42794 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42794 Author: mont29 Date: 2011-12-21 11:56:42 + (Wed, 21 Dec 2011) Log Message: --- Small i18n edits: * Added serbian_latin locale (sr@latin). * Changed serbian UI to Serbian (?\208?\161?\209?\128?\208?\191?\209?\129?\208?\186?\208?\184) (as requested by Nikola Radovanovic, serbian translator). * Reordered languages in menu in alphabetical order! Modified Paths: -- trunk/blender/source/blender/blenfont/intern/blf_lang.c trunk/blender/source/blender/makesrna/intern/rna_userdef.c Modified: trunk/blender/source/blender/blenfont/intern/blf_lang.c === --- trunk/blender/source/blender/blenfont/intern/blf_lang.c 2011-12-21 11:36:28 UTC (rev 42793) +++ trunk/blender/source/blender/blenfont/intern/blf_lang.c 2011-12-21 11:56:42 UTC (rev 42794) @@ -86,7 +86,7 @@ Chinese (Traditional)_China.1252, zh_TW, russian, ru_RU, croatian, hr_HR, - serbian, sr_RS, + serbian, sr, ukrainian, uk_UA, polish, pl_PL, romanian, ro_RO, @@ -96,7 +96,8 @@ korean, ko_KR, nepali, ne_NP, persian, fa_PE, - indonesian, id_ID + indonesian, id_ID, + serbian (latin), sr@latin, }; void BLF_lang_init(void) Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c === --- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2011-12-21 11:36:28 UTC (rev 42793) +++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2011-12-21 11:56:42 UTC (rev 42794) @@ -2607,40 +2607,43 @@ /* hardcoded here, could become dynamic somehow */ /* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */ /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */ + /* Note: As this list is in alphabetical order, and not defined order, +* here is the highest define currently in use: 28 (serbian latin). */ static EnumPropertyItem language_items[] = { - {0, , 0, Nearly done, }, - {0, DEFAULT, 0, Default (Default), }, - {1, ENGLISH, 0, English (English), en_US}, - {8, FRENCH, 0, French (Français), fr_FR}, - {4, ITALIAN, 0, Italian (Italiano), it_IT}, + { 0, , 0, Nearly done, }, + { 0, DEFAULT, 0, Default (Default), }, + { 1, ENGLISH, 0, English (English), en_US}, + { 8, FRENCH, 0, French (Français), fr_FR}, + { 4, ITALIAN, 0, Italian (Italiano), it_IT}, {15, RUSSIAN, 0, Russian (Русский), ru_RU}, {13, SIMPLIFIED_CHINESE, 0, Simplified Chinese (简体中文), zh_CN}, - {9, SPANISH, 0, Spanish (Español), es}, + { 9, SPANISH, 0, Spanish (Español), es}, {14, TRADITIONAL_CHINESE, 0, Traditional Chinese (繁體中文), zh_TW}, - {0, , 0, In progress, }, - {2, JAPANESE, 0, Japanese (日本語), ja_JP}, - {3, DUTCH, 0, Dutch (Nederlandse taal), nl_NL}, - {5, GERMAN, 0, German (Deutsch), de_DE}, - {6, FINNISH, 0, Finnish (Suomi), fi_FI}, - {7, SWEDISH, 0, Swedish (Svenska), sv_SE}, - {10, CATALAN, 0, Catalan (Català), ca_AD}, - {11, CZECH, 0, Czech (Český), cs_CZ}, - {12, BRAZILIAN_PORTUGUESE, 0, Brazilian Portuguese (Português do Brasil), pt_BR}, - {16, CROATIAN, 0, Croatian (Hrvatski), hr_HR}, - {17, SERBIAN, 0, Serbian (Српском језику), sr_RS}, - {18, UKRAINIAN, 0, Ukrainian (Український), uk_UA}, - {19, POLISH, 0, Polish (Polski), pl_PL}, - {20, ROMANIAN, 0, Romanian (Român), ro_RO}, + { 0, , 0, In progress, }, /* using the utf8 flipped form of Arabic (العربية) */ {21, ARABIC, 0, Arabic (ﺔﻴﺑﺮﻌﻟﺍ), ar_EG}, + {12, BRAZILIAN_PORTUGUESE, 0, Brazilian Portuguese (Português do Brasil), pt_BR}, {22, BULGARIAN, 0, Bulgarian (Български), bg_BG}, + {10, CATALAN, 0, Catalan (Català), ca_AD}, + {16, CROATIAN, 0, Croatian (Hrvatski), hr_HR}, + {11, CZECH, 0, Czech (Český), cs_CZ}, + { 3, DUTCH, 0, Dutch (Nederlandse taal), nl_NL}, + { 6, FINNISH, 0, Finnish (Suomi), fi_FI}, + { 5, GERMAN, 0, German (Deutsch), de_DE}, {23, GREEK, 0, Greek (Ελληνικά), el_GR}, + {27, INDONESIAN, 0, Indonesian (Bahasa indonesia), id_ID}, + { 2, JAPANESE, 0, Japanese (日本語), ja_JP}, {24, KOREAN, 0, Korean (한국 언어), ko_KR}, {25, NEPALI, 0, Nepali (नेपाली), ne_NP},
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42804] trunk/blender: A few small fixes to new UI messages...
Revision: 42804 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42804 Author: mont29 Date: 2011-12-21 18:18:36 + (Wed, 21 Dec 2011) Log Message: --- A few small fixes to new UI messages... Modified Paths: -- trunk/blender/release/scripts/startup/bl_operators/wm.py trunk/blender/source/blender/makesrna/intern/rna_material.c trunk/blender/source/blender/makesrna/intern/rna_scene.c Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py === --- trunk/blender/release/scripts/startup/bl_operators/wm.py2011-12-21 16:43:01 UTC (rev 42803) +++ trunk/blender/release/scripts/startup/bl_operators/wm.py2011-12-21 18:18:36 UTC (rev 42804) @@ -1178,7 +1178,7 @@ return {'CANCELLED'} class WM_OT_blenderplayer_start(bpy.types.Operator): -'''Launches the Blenderplayer with the current blendfile''' +'''Launch the Blenderplayer with the current blendfile''' bl_idname = wm.blenderplayer_start bl_label = Start Modified: trunk/blender/source/blender/makesrna/intern/rna_material.c === --- trunk/blender/source/blender/makesrna/intern/rna_material.c 2011-12-21 16:43:01 UTC (rev 42803) +++ trunk/blender/source/blender/makesrna/intern/rna_material.c 2011-12-21 18:18:36 UTC (rev 42804) @@ -415,8 +415,8 @@ {MTEX_COMPAT_BUMP, BUMP_COMPATIBLE, 0, Compatible, }, {MTEX_3TAP_BUMP, BUMP_LOW_QUALITY, 0, Low Quality, Use 3 tap filtering}, {MTEX_5TAP_BUMP, BUMP_MEDIUM_QUALITY, 0, Medium Quality, Use 5 tap filtering}, - {MTEX_BICUBIC_BUMP, BUMP_BEST_QUALITY, 0, Best Quality, Use bicubic filtering. Requires OpenGL 3.0+. - It will fall back on medium setting for other systems}, + {MTEX_BICUBIC_BUMP, BUMP_BEST_QUALITY, 0, Best Quality, Use bicubic filtering (requires OpenGL 3.0+, + it will fall back on medium setting for other systems)}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_bump_space_items[] = { Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c === --- trunk/blender/source/blender/makesrna/intern/rna_scene.c2011-12-21 16:43:01 UTC (rev 42803) +++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2011-12-21 18:18:36 UTC (rev 42804) @@ -2115,7 +2115,7 @@ RNA_def_property_enum_sdna(prop, NULL, exitkey); RNA_def_property_enum_items(prop, event_type_items); RNA_def_property_enum_funcs(prop, NULL, rna_GameSettings_exit_key_set, NULL); - RNA_def_property_ui_text(prop, Exit Key, Sets the key that exits the Game Engine); + RNA_def_property_ui_text(prop, Exit Key, The key that exits the Game Engine); RNA_def_property_update(prop, NC_SCENE, NULL); // Do we need it here ? (since we already have it in World ___ 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 [42823] branches/vgroup_modifiers: Merged from trunk -r42685:42821.
Revision: 42823 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42823 Author: mont29 Date: 2011-12-22 13:26:51 + (Thu, 22 Dec 2011) Log Message: --- Merged from trunk -r42685:42821. Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42685 Modified Paths: -- branches/vgroup_modifiers/CMakeLists.txt branches/vgroup_modifiers/SConstruct branches/vgroup_modifiers/build_files/scons/config/win32-mingw-config.py branches/vgroup_modifiers/build_files/scons/config/win32-vc-config.py branches/vgroup_modifiers/intern/audaspace/intern/AUD_SoftwareDevice.cpp branches/vgroup_modifiers/intern/cycles/app/cycles_test.cpp branches/vgroup_modifiers/intern/cycles/app/cycles_xml.cpp branches/vgroup_modifiers/intern/cycles/blender/addon/engine.py branches/vgroup_modifiers/intern/cycles/blender/addon/ui.py branches/vgroup_modifiers/intern/cycles/blender/blender_camera.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_mesh.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_object.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_session.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_session.h branches/vgroup_modifiers/intern/cycles/blender/blender_shader.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_sync.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_sync.h branches/vgroup_modifiers/intern/cycles/device/device.cpp branches/vgroup_modifiers/intern/cycles/device/device.h branches/vgroup_modifiers/intern/cycles/device/device_cpu.cpp branches/vgroup_modifiers/intern/cycles/device/device_cuda.cpp branches/vgroup_modifiers/intern/cycles/device/device_opencl.cpp branches/vgroup_modifiers/intern/cycles/kernel/CMakeLists.txt branches/vgroup_modifiers/intern/cycles/kernel/kernel.cl branches/vgroup_modifiers/intern/cycles/kernel/kernel.cpp branches/vgroup_modifiers/intern/cycles/kernel/kernel.cu branches/vgroup_modifiers/intern/cycles/kernel/kernel.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_camera.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_compat_opencl.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_film.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_optimized.cpp branches/vgroup_modifiers/intern/cycles/kernel/kernel_path.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_random.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_types.h branches/vgroup_modifiers/intern/cycles/render/buffers.cpp branches/vgroup_modifiers/intern/cycles/render/buffers.h branches/vgroup_modifiers/intern/cycles/render/camera.cpp branches/vgroup_modifiers/intern/cycles/render/graph.cpp branches/vgroup_modifiers/intern/cycles/render/graph.h branches/vgroup_modifiers/intern/cycles/render/integrator.cpp branches/vgroup_modifiers/intern/cycles/render/integrator.h branches/vgroup_modifiers/intern/cycles/render/nodes.cpp branches/vgroup_modifiers/intern/cycles/render/nodes.h branches/vgroup_modifiers/intern/cycles/render/session.cpp branches/vgroup_modifiers/intern/cycles/render/session.h branches/vgroup_modifiers/intern/cycles/render/tile.cpp branches/vgroup_modifiers/intern/cycles/render/tile.h branches/vgroup_modifiers/intern/cycles/util/util_math.h branches/vgroup_modifiers/intern/cycles/util/util_transform.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowCocoa.mm branches/vgroup_modifiers/release/scripts/startup/bl_operators/clip.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/sequencer.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/uvcalc_smart_project.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/wm.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_game.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_particle.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_render.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_scene.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_logic.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_node.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_text.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_view3d.py branches/vgroup_modifiers/source/blender/blenfont/intern/blf_lang.c branches/vgroup_modifiers/source/blender/blenkernel/BKE_customdata.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_modifier.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_node.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_texture.h
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42824] trunk/blender/source/blender/ modifiers/intern/MOD_weightvgproximity.c: Some small perf tweaks to weightvg proximity: do not use indices in ca
Revision: 42824 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42824 Author: mont29 Date: 2011-12-22 14:04:25 + (Thu, 22 Dec 2011) Log Message: --- Some small perf tweaks to weightvg proximity: do not use indices in case all vertices are affected... Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c === --- trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-12-22 13:26:51 UTC (rev 42823) +++ trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c 2011-12-22 14:04:25 UTC (rev 42824) @@ -399,29 +399,37 @@ MEM_freeN(tdw); return dm; } - indices = MEM_mallocN(sizeof(int) * numIdx, WeightVGProximity Modifier, indices); - memcpy(indices, tidx, sizeof(int) * numIdx); - org_w = MEM_mallocN(sizeof(float) * numIdx, WeightVGProximity Modifier, org_w); + if(numIdx != numVerts) { + indices = MEM_mallocN(sizeof(int) * numIdx, WeightVGProximity Modifier, indices); + memcpy(indices, tidx, sizeof(int) * numIdx); + org_w = MEM_mallocN(sizeof(float) * numIdx, WeightVGProximity Modifier, org_w); + memcpy(org_w, tw, sizeof(float) * numIdx); + dw = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, WeightVGProximity Modifier, dw); + memcpy(dw, tdw, sizeof(MDeformWeight*) * numIdx); + MEM_freeN(tw); + MEM_freeN(tdw); + } + else { + org_w = tw; + dw = tdw; + } new_w = MEM_mallocN(sizeof(float) * numIdx, WeightVGProximity Modifier, new_w); - memcpy(org_w, tw, sizeof(float) * numIdx); - dw = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, WeightVGProximity Modifier, dw); - memcpy(dw, tdw, sizeof(MDeformWeight*) * numIdx); MEM_freeN(tidx); - MEM_freeN(tw); - MEM_freeN(tdw); /* Get our vertex coordinates. */ - { + v_cos = MEM_mallocN(sizeof(float[3]) * numIdx, WeightVGProximity Modifier, v_cos); + if(numIdx != numVerts) { /* XXX In some situations, this code can be up to about 50 times more performant * than simply using getVertCo for each affected vertex... */ float (*tv_cos)[3] = MEM_mallocN(sizeof(float[3]) * numVerts, WeightVGProximity Modifier, tv_cos); - v_cos = MEM_mallocN(sizeof(float[3]) * numIdx, WeightVGProximity Modifier, v_cos); dm-getVertCos(dm, tv_cos); for (i = 0; i numIdx; i++) copy_v3_v3(v_cos[i], tv_cos[indices[i]]); MEM_freeN(tv_cos); } + else + dm-getVertCos(dm, v_cos); /* Compute wanted distances. */ if (wmd-proximity_mode == MOD_WVG_PROXIMITY_OBJECT) { @@ -497,7 +505,8 @@ MEM_freeN(org_w); MEM_freeN(new_w); MEM_freeN(dw); - MEM_freeN(indices); + if(indices) + MEM_freeN(indices); MEM_freeN(v_cos); #if DO_PROFILE ___ 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 [42826] branches/vgroup_modifiers/source/ blender: On second thought, also enable weight preview in object mode, like for DynamicPaint.
Revision: 42826 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42826 Author: mont29 Date: 2011-12-22 16:37:14 + (Thu, 22 Dec 2011) Log Message: --- On second thought, also enable weight preview in object mode, like for DynamicPaint. This commit also generalizes/factorizes the way that feature (CD_WEIGHT_MCOL preview in object mode) is handled: * Adding in BKE_modifier.h int modifiers_isWMColPreview(struct Object *ob);, which checks whether there is a modifier in the object's stack that needs WEIGHT_MCOL preview. This higly simplifies the code in draw_mesh_fancy() (drawobject.c). * Adding in BKE_modifier.h int modifier_usesWMColPreview(struct ModifierData *md);, which checks whether that modifier needs WEIGHT_MCOL preview. Used among other places in mesh_calc_modifiers() (DerivedMesh.c) to make sure preview mask remains for following modifiers. * Adding the new flag eModifierTypeFlag_UsesWMColPreview for those modifiers, used by above functions to make a first, quick check. Modified Paths: -- branches/vgroup_modifiers/source/blender/blenkernel/BKE_modifier.h branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/modifier.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawobject.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_dynamicpaint.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: branches/vgroup_modifiers/source/blender/blenkernel/BKE_modifier.h === --- branches/vgroup_modifiers/source/blender/blenkernel/BKE_modifier.h 2011-12-22 16:00:34 UTC (rev 42825) +++ branches/vgroup_modifiers/source/blender/blenkernel/BKE_modifier.h 2011-12-22 16:37:14 UTC (rev 42826) @@ -99,7 +99,10 @@ eModifierTypeFlag_Single = (17), /* Some modifier can't be added manually by user */ - eModifierTypeFlag_NoUserAdd = (18) + eModifierTypeFlag_NoUserAdd = (18), + + /* For modifiers that use CD_WEIGHT_MCOL for preview. */ + eModifierTypeFlag_UsesWMColPreview = (19) } ModifierTypeFlag; typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin); @@ -308,14 +311,14 @@ struct ModifierData *modifier_new(int type); void modifier_free(struct ModifierData *md); -void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md); +void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md); void modifier_copyData(struct ModifierData *md, struct ModifierData *target); int modifier_dependsOnTime(struct ModifierData *md); int modifier_supportsMapping(struct ModifierData *md); int modifier_couldBeCage(struct Scene *scene, struct ModifierData *md); int modifier_isCorrectableDeformed(struct ModifierData *md); -int modifier_sameTopology(ModifierData *md); +int modifier_sameTopology(ModifierData *md); int modifier_nonGeometrical(ModifierData *md); int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode); void modifier_setError(struct ModifierData *md, const char *format, ...) @@ -323,6 +326,7 @@ __attribute__ ((format (printf, 2, 3))) #endif ; +int modifier_usesWMColPreview(struct ModifierData *md); void modifiers_foreachObjectLink(struct Object *ob, ObjectWalkFunc walk, @@ -349,6 +353,7 @@ int modifiers_usesArmature(struct Object *ob, struct bArmature *arm); int modifiers_isCorrectableDeformed(struct Object *ob); void modifier_freeTemporaryData(struct ModifierData *md); +int modifiers_isWMColPreview(struct Object *ob); int modifiers_indexInObject(struct Object *ob, struct ModifierData *md); Modified: branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c === --- branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c 2011-12-22 16:00:34 UTC (rev 42825) +++ branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c 2011-12-22 16:37:14 UTC (rev 42826) @@ -1070,8 +1070,9 @@ } } - /* in case of dynamic paint, make sure preview mask remains for following modifiers */ - if (md-type ==
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42827] branches/vgroup_modifiers: Merged from trunk -r42822:42826.
Revision: 42827 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42827 Author: mont29 Date: 2011-12-22 16:39:57 + (Thu, 22 Dec 2011) Log Message: --- Merged from trunk -r42822:42826. Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42822 Modified Paths: -- branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Property Changed: branches/vgroup_modifiers/ branches/vgroup_modifiers/source/blender/editors/space_outliner/ Property changes on: branches/vgroup_modifiers ___ Modified: svn:mergeinfo - /branches/soc-2011-cucumber:37517 /branches/soc-2011-tomato:42376,42378-42379,42397,42400 /trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-42821 + /branches/soc-2011-cucumber:37517 /branches/soc-2011-tomato:42376,42378-42379,42397,42400 /trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-42826 Modified: branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py === --- branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py 2011-12-22 16:37:14 UTC (rev 42826) +++ branches/vgroup_modifiers/release/scripts/modules/bpy_extras/io_utils.py 2011-12-22 16:39:57 UTC (rev 42827) @@ -121,24 +121,24 @@ ((-1.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, 1.0, 0.0)), ((-1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, -1.0)), ((0.0, -1.0, 0.0), (-1.0, 0.0, 0.0), (0.0, 0.0, -1.0)), -((0.0, -1.0, 0.0), (0.0, 0.0, -1.0), (1.0, 0.0, 0.0)), +((0.0, 0.0, 1.0), (-1.0, 0.0, 0.0), (0.0, -1.0, 0.0)), +((0.0, 0.0, -1.0), (-1.0, 0.0, 0.0), (0.0, 1.0, 0.0)), +((0.0, 1.0, 0.0), (-1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), ((0.0, -1.0, 0.0), (0.0, 0.0, 1.0), (-1.0, 0.0, 0.0)), -((0.0, -1.0, 0.0), (1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), -((0.0, 0.0, -1.0), (-1.0, 0.0, 0.0), (0.0, 1.0, 0.0)), ((0.0, 0.0, -1.0), (0.0, -1.0, 0.0), (-1.0, 0.0, 0.0)), +((0.0, 0.0, 1.0), (0.0, 1.0, 0.0), (-1.0, 0.0, 0.0)), +((0.0, 1.0, 0.0), (0.0, 0.0, -1.0), (-1.0, 0.0, 0.0)), +((0.0, -1.0, 0.0), (0.0, 0.0, -1.0), (1.0, 0.0, 0.0)), +((0.0, 0.0, 1.0), (0.0, -1.0, 0.0), (1.0, 0.0, 0.0)), ((0.0, 0.0, -1.0), (0.0, 1.0, 0.0), (1.0, 0.0, 0.0)), +((0.0, 1.0, 0.0), (0.0, 0.0, 1.0), (1.0, 0.0, 0.0)), +((0.0, -1.0, 0.0), (1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), ((0.0, 0.0, -1.0), (1.0, 0.0, 0.0), (0.0, -1.0, 0.0)), -((0.0, 0.0, 1.0), (-1.0, 0.0, 0.0), (0.0, -1.0, 0.0)), -((0.0, 0.0, 1.0), (0.0, -1.0, 0.0), (1.0, 0.0, 0.0)), -((0.0, 0.0, 1.0), (0.0, 1.0, 0.0), (-1.0, 0.0, 0.0)), ((0.0, 0.0, 1.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0)), -((0.0, 1.0, 0.0), (-1.0, 0.0, 0.0), (0.0, 0.0, 1.0)), -((0.0, 1.0, 0.0), (0.0, 0.0, -1.0), (-1.0, 0.0, 0.0)), -((0.0, 1.0, 0.0), (0.0, 0.0, 1.0), (1.0, 0.0, 0.0)), ((0.0, 1.0, 0.0), (1.0, 0.0, 0.0), (0.0, 0.0, -1.0)), ((1.0, 0.0, 0.0), (0.0, -1.0, 0.0), (0.0, 0.0, -1.0)), +((1.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, -1.0, 0.0)), ((1.0, 0.0, 0.0), (0.0, 0.0, -1.0), (0.0, 1.0, 0.0)), -((1.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, -1.0, 0.0)), ) # store args as a single int Property changes on: branches/vgroup_modifiers/source/blender/editors/space_outliner ___ Modified: svn:mergeinfo - /branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987 /branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42397,42400 /trunk/blender/source/blender/editors/space_outliner:38694-38739,38741-39198,39200-39651,39653-39988,39990-42821 + /branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987 /branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42397,42400 /trunk/blender/source/blender/editors/space_outliner:38694-38739,38741-39198,39200-39651,39653-39988,39990-42826 Modified: branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c === --- branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c 2011-12-22 16:37:14 UTC (rev 42826) +++ branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c 2011-12-22 16:39:57 UTC (rev 42827) @@ -276,7 +276,7 @@ static char *view3d_modeselect_pup(Scene *scene) { Object *ob= OBACT; - static char string[256]; + static char string[512]; const char *title= IFACE_(Mode: %t); char *str = string; Modified:
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42842] branches/vgroup_modifiers: Why in hell rename of blenderbuttons in blender_icons.png wasn?\226?\128? \153t catch by merge???
Revision: 42842 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42842 Author: mont29 Date: 2011-12-23 09:04:21 + (Fri, 23 Dec 2011) Log Message: --- Why in hell rename of blenderbuttons in blender_icons.png wasn?\226?\128?\153t catch by merge??? Removed Paths: - branches/vgroup_modifiers/release/datafiles/blenderbuttons branches/vgroup_modifiers/source/blender/editors/datafiles/blenderbuttons.c Deleted: branches/vgroup_modifiers/release/datafiles/blenderbuttons === (Binary files differ) Deleted: branches/vgroup_modifiers/source/blender/editors/datafiles/blenderbuttons.c === --- branches/vgroup_modifiers/source/blender/editors/datafiles/blenderbuttons.c 2011-12-23 08:41:53 UTC (rev 42841) +++ branches/vgroup_modifiers/source/blender/editors/datafiles/blenderbuttons.c 2011-12-23 09:04:21 UTC (rev 42842) @@ -1,6723 +0,0 @@ -/* DataToC output of file blenderbuttons */ - -int datatoc_blenderbuttons_size= 214916; -char datatoc_blenderbuttons[]= { -137, 80, 78, 71, - 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 90, 0, 0, 2,128, 8, 6, 0, 0, 0, 68,254,214,163, 0, 0, 10, - 79,105, 67, 67, 80, 80,104,111,116,111,115,104,111,112, 32, 73, 67, 67, 32,112,114,111,102,105,108,101, 0, 0,120,218,157, 83, -103, 84, 83,233, 22, 61,247,222,244, 66, 75,136,128,148, 75,111, 82, 21, 8, 32, 82, 66,139,128, 20,145, 38, 42, 33, 9, 16, 74, -136, 33,161,217, 21, 81,193, 17, 69, 69, 4, 27,200,160,136, 3,142,142,128,140, 21, 81, 44, 12,138, 10,216, 7,228, 33,162,142, -131,163,136,138,202,251,225,123,163,107,214,188,247,230,205,254,181,215, 62,231,172,243,157,179,207, 7,192, 8, 12,150, 72, 51, - 81, 53,128, 12,169, 66, 30, 17,224,131,199,196,198,225,228, 46, 64,129, 10, 36,112, 0, 16, 8,179,100, 33,115,253, 35, 1, 0, -248,126, 60, 60, 43, 34,192, 7,190, 0, 1,120,211, 11, 8, 0,192, 77,155,192, 48, 28,135,255, 15,234, 66,153, 92, 1,128,132, - 1,192,116,145, 56, 75, 8,128, 20, 0, 64,122,142, 66,166, 0, 64, 70, 1,128,157,152, 38, 83, 0,160, 4, 0, 96,203, 99, 98, -227, 0, 80, 45, 0, 96, 39,127,230,211, 0,128,157,248,153,123, 1, 0, 91,148, 33, 21, 1,160,145, 0, 32, 19,101,136, 68, 0, -104, 59, 0,172,207, 86,138, 69, 0, 88, 48, 0, 20,102, 75,196, 57, 0,216, 45, 0, 48, 73, 87,102, 72, 0,176,183, 0,192,206, - 16, 11,178, 0, 8, 12, 0, 48, 81,136,133, 41, 0, 4,123, 0, 96,200, 35, 35,120, 0,132,153, 0, 20, 70,242, 87, 60,241, 43, -174, 16,231, 42, 0, 0,120,153,178, 60,185, 36, 57, 69,129, 91, 8, 45,113, 7, 87, 87, 46, 30, 40,206, 73, 23, 43, 20, 54, 97, - 2, 97,154, 64, 46,194,121,153, 25, 50,129, 52, 15,224,243,204, 0, 0,160,145, 21, 17,224,131,243,253,120,206, 14,174,206,206, - 54,142,182, 14, 95, 45,234,191, 6,255, 34, 98, 98,227,254,229,207,171,112, 64, 0, 0,225,116,126,209,254, 44, 47,179, 26,128, - 59, 6,128,109,254,162, 37,238, 4,104, 94, 11,160,117,247,139,102,178, 15, 64,181, 0,160,233,218, 87,243,112,248,126, 60, 60, - 69,161,144,185,217,217,229,228,228,216, 74,196, 66, 91, 97,202, 87,125,254,103,194, 95,192, 87,253,108,249,126, 60,252,247,245, -224,190,226, 36,129, 50, 93,129, 71, 4,248,224,194,204,244, 76,165, 28,207,146, 9,132, 98,220,230,143, 71,252,183, 11,255,252, - 29,211, 34,196, 73, 98,185, 88, 42, 20,227, 81, 18,113,142, 68,154,140,243, 50,165, 34,137, 66,146, 41,197, 37,210,255,100,226, -223, 44,251, 3, 62,223, 53, 0,176,106, 62, 1,123,145, 45,168, 93, 99, 3,246, 75, 39, 16, 88,116,192,226,247, 0, 0,242,187, -111,193,212, 40, 8, 3,128,104,131,225,207,119,255,239, 63,253, 71,160, 37, 0,128,102, 73,146,113, 0, 0, 94, 68, 36, 46, 84, -202,179, 63,199, 8, 0, 0, 68,160,129, 42,176, 65, 27,244,193, 24, 44,192, 6, 28,193, 5,220,193, 11,252, 96, 54,132, 66, 36, -196,194, 66, 16, 66, 10,100,128, 28,114, 96, 41,172,130, 66, 40,134,205,176, 29, 42, 96, 47,212, 64, 29, 52,192, 81,104,134,147, -112, 14, 46,194, 85,184, 14, 61,112, 15,250, 97, 8,158,193, 40,188,129, 9, 4, 65,200, 8, 19, 97, 33,218,136, 1, 98,138, 88, - 35,142, 8, 23,153,133,248, 33,193, 72, 4, 18,139, 36, 32,201,136, 20, 81, 34, 75,145, 53, 72, 49, 82,138, 84, 32, 85, 72, 29, -242, 61,114, 2, 57,135, 92, 70,186,145, 59,200, 0, 50,130,252,134,188, 71, 49,148,129,178, 81, 61,212, 12,181, 67,185,168, 55, - 26,132, 70,162, 11,208,100,116, 49,154,143, 22,160,155,208,114,180, 26, 61,140, 54,161,231,208,171,104, 15,218,143, 62, 67,199, - 48,192,232, 24, 7, 51,196,108, 48, 46,198,195, 66,177, 56, 44, 9,147, 99,203,177, 34,172, 12,171,198, 26,176, 86,172, 3,187, -137,245, 99,207,177,119, 4, 18,129, 69,192, 9, 54, 4,119, 66, 32, 97, 30, 65, 72, 88, 76, 88, 78,216, 72,168, 32, 28, 36, 52, - 17,218, 9, 55, 9, 3,132, 81,194, 39, 34,147,168, 75,180, 38,186, 17,249,196, 24, 98, 50, 49,135, 88, 72, 44, 35,214, 18,143, - 19, 47,
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42844] trunk/blender/source/blender: Moving back sr locales to sr_RS (else, with recent changes (42830), loading sr was no more working).
Revision: 42844 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42844 Author: mont29 Date: 2011-12-23 13:36:07 + (Fri, 23 Dec 2011) Log Message: --- Moving back sr locales to sr_RS (else, with recent changes (42830), loading sr was no more working). My mistake, using only sr wasn't useful here (unlike spanish, we only have one version of serbian, in cyrilic and latin forms...)! Modified Paths: -- trunk/blender/source/blender/blenfont/intern/blf_lang.c trunk/blender/source/blender/makesrna/intern/rna_userdef.c Modified: trunk/blender/source/blender/blenfont/intern/blf_lang.c === --- trunk/blender/source/blender/blenfont/intern/blf_lang.c 2011-12-23 12:56:48 UTC (rev 42843) +++ trunk/blender/source/blender/blenfont/intern/blf_lang.c 2011-12-23 13:36:07 UTC (rev 42844) @@ -85,7 +85,7 @@ Chinese (Traditional)_China.1252, zh_TW, russian, ru_RU, croatian, hr_HR, - serbian, sr, + serbian, sr_RS, ukrainian, uk_UA, polish, pl_PL, romanian, ro_RO, @@ -96,7 +96,7 @@ nepali, ne_NP, persian, fa_PE, indonesian, id_ID, - serbian (latin), sr@latin, + serbian (latin), sr_RS@latin, }; void BLF_lang_init(void) Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c === --- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2011-12-23 12:56:48 UTC (rev 42843) +++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2011-12-23 13:36:07 UTC (rev 42844) @@ -2639,8 +2639,8 @@ {26, PERSIAN, 0, Persian (ﯽﺳﺭﺎﻓ), fa_PE}, {19, POLISH, 0, Polish (Polski), pl_PL}, {20, ROMANIAN, 0, Romanian (Român), ro_RO}, - {17, SERBIAN, 0, Serbian (Српски), sr}, - {28, SERBIAN_LATIN, 0, Serbian latin (Srpski latinica), sr@latin}, + {17, SERBIAN, 0, Serbian (Српски), sr_RS}, + {28, SERBIAN_LATIN, 0, Serbian latin (Srpski latinica), sr_RS@latin}, { 7, SWEDISH, 0, Swedish (Svenska), sv_SE}, {18, UKRAINIAN, 0, Ukrainian (Український), uk_UA}, { 0, NULL, 0, NULL, NULL}}; ___ 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 [42847] branches/vgroup_modifiers/source/ blender: Now using weightpaint instead of weight_to_rgb for modifier weight preview .
Revision: 42847 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42847 Author: mont29 Date: 2011-12-23 18:53:20 + (Fri, 23 Dec 2011) Log Message: --- Now using weightpaint instead of weight_to_rgb for modifier weight preview. This allows custom weight colorband to be used. Not sure we can go higher in weightcol compute here (i.e. imho, handling multipaint and co is not good idea here, and would add many complexity...). Maybe we should also move other uses of weight_to_rgb to weight_paint (particles, some drawing code), and thus remove weight_to_rgb from header? Thinking about Campbell's remark about DynamicPaint and WeightVG modifiers' weight preview not using advanced weights preview generation from DerivedMesh.c, I mumbled and tried to design a proper way to manage those weight-editing modifiers in WP mode. Previously (in this branch), DynaPaint had no effect (as it did not have eModifierTypeFlag_SupportsMapping flag, I wonder why???), and WeightVG were always drawn. Not nice. So I coded a three-states weight preview mode: original weights and final modified weights (both using full weight preview, included multipaint), and modifier weights, same result as in 3D view (or same as original if no weight preview generated by modifiers). All this obviously will need discussion approval! Also restored eol-style prop of weightvg modifier files (g, merge...). Modified Paths: -- branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/dynamicpaint.c branches/vgroup_modifiers/source/blender/blenkernel/intern/modifier.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawobject.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c branches/vgroup_modifiers/source/blender/makesdna/DNA_scene_types.h branches/vgroup_modifiers/source/blender/makesrna/intern/rna_scene.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_dynamicpaint.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Property Changed: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h === --- branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h 2011-12-23 13:53:21 UTC (rev 42846) +++ branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h 2011-12-23 18:53:20 UTC (rev 42847) @@ -538,6 +538,7 @@ float (**deformmats)[3][3], float (**deformcos)[3]); void weight_to_rgb(float r_rgb[3], const float weight); +void weightpaint_color(unsigned char r_col[4], struct ColorBand *coba, const float input, const int use_stored_cb); /* convert layers requested by a GLSL material to actually available layers in * the DerivedMesh, with both a pointer for arrays and an offset for editmesh */ Modified: branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c === --- branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c 2011-12-23 13:53:21 UTC (rev 42846) +++ branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c 2011-12-23 18:53:20 UTC (rev 42847) @@ -638,20 +638,34 @@ /* draw_flag's for calc_weightpaint_vert_color */ enum { - CALC_WP_MULTIPAINT= (10), - CALC_WP_AUTO_NORMALIZE= (11) + CALC_WP_MULTIPAINT = (1 0), + CALC_WP_AUTO_NORMALIZE = (1 1), + CALC_WP_USE_MODIFIER_PREVIEW = (1 2), + CALC_WP_MODIFIED_WEIGHTS = (1 3) }; -static void weightpaint_color(unsigned char r_col[4], ColorBand *coba, const float input) +static ColorBand *stored_cb= NULL; + +void vDM_ColorBand_store(ColorBand *coba) { + stored_cb= coba; +} + +void weightpaint_color(unsigned char r_col[4], ColorBand *coba, const float input, const int use_stored_cb) +{ float colf[4]; - if(coba) do_colorband(coba, input, colf); - else weight_to_rgb(colf, input); +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42863] branches/vgroup_modifiers: Merged from trunk (-r 42826:42849).
Revision: 42863 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42863 Author: mont29 Date: 2011-12-24 14:09:43 + (Sat, 24 Dec 2011) Log Message: --- Merged from trunk (-r 42826:42849). Modified Paths: -- branches/vgroup_modifiers/CMakeLists.txt branches/vgroup_modifiers/doc/python_api/rst/change_log.rst branches/vgroup_modifiers/intern/cycles/blender/addon/ui.py branches/vgroup_modifiers/intern/iksolver/intern/IK_Solver.cpp branches/vgroup_modifiers/intern/mikktspace/mikktspace.c branches/vgroup_modifiers/intern/opennl/intern/opennl.c branches/vgroup_modifiers/intern/opennl/superlu/get_perm_c.c branches/vgroup_modifiers/intern/opennl/superlu/scolumn_bmod.c branches/vgroup_modifiers/intern/opennl/superlu/strsv.c branches/vgroup_modifiers/intern/opennl/superlu/sutil.c branches/vgroup_modifiers/intern/opennl/superlu/util.h branches/vgroup_modifiers/release/scripts/modules/bpy_extras/keyconfig_utils.py branches/vgroup_modifiers/source/blender/blenfont/BLF_translation.h branches/vgroup_modifiers/source/blender/blenfont/intern/blf_lang.c branches/vgroup_modifiers/source/blender/blenfont/intern/blf_translation.c branches/vgroup_modifiers/source/blender/blenkernel/BKE_customdata.h branches/vgroup_modifiers/source/blender/blenkernel/depsgraph_private.h branches/vgroup_modifiers/source/blender/blenkernel/intern/customdata.c branches/vgroup_modifiers/source/blender/blenkernel/intern/depsgraph.c branches/vgroup_modifiers/source/blender/blenkernel/intern/fcurve.c branches/vgroup_modifiers/source/blender/blenkernel/intern/image.c branches/vgroup_modifiers/source/blender/blenkernel/intern/mesh_validate.c branches/vgroup_modifiers/source/blender/blenkernel/intern/movieclip.c branches/vgroup_modifiers/source/blender/blenkernel/intern/object.c branches/vgroup_modifiers/source/blender/blenkernel/intern/subsurf_ccg.c branches/vgroup_modifiers/source/blender/blenkernel/intern/tracking.c branches/vgroup_modifiers/source/blender/editors/animation/anim_channels_edit.c branches/vgroup_modifiers/source/blender/editors/animation/anim_filter.c branches/vgroup_modifiers/source/blender/editors/include/ED_view3d.h branches/vgroup_modifiers/source/blender/editors/screen/screen_ops.c branches/vgroup_modifiers/source/blender/gpu/intern/gpu_codegen.c branches/vgroup_modifiers/source/blender/gpu/intern/gpu_codegen.h branches/vgroup_modifiers/source/blender/gpu/intern/gpu_draw.c branches/vgroup_modifiers/source/blender/gpu/intern/gpu_extensions.c branches/vgroup_modifiers/source/blender/gpu/intern/gpu_material.c branches/vgroup_modifiers/source/blender/makesdna/DNA_defs.h branches/vgroup_modifiers/source/blender/makesdna/DNA_genfile.h branches/vgroup_modifiers/source/blender/makesdna/DNA_object_types.h branches/vgroup_modifiers/source/blender/makesdna/DNA_scene_types.h branches/vgroup_modifiers/source/blender/makesdna/intern/dna_genfile.c branches/vgroup_modifiers/source/blender/makesdna/intern/makesdna.c branches/vgroup_modifiers/source/blender/makesrna/RNA_define.h branches/vgroup_modifiers/source/blender/makesrna/intern/makesrna.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_access.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_define.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_internal_types.h branches/vgroup_modifiers/source/blender/makesrna/intern/rna_rna.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_userdef.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_multires.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_shrinkwrap.c branches/vgroup_modifiers/source/blender/python/generic/bgl.c branches/vgroup_modifiers/source/blender/render/intern/raytrace/rayobject_octree.cpp branches/vgroup_modifiers/source/blender/render/intern/source/convertblender.c branches/vgroup_modifiers/source/blender/render/intern/source/pixelshading.c branches/vgroup_modifiers/source/blender/render/intern/source/rayshade.c branches/vgroup_modifiers/source/blender/render/intern/source/renderdatabase.c branches/vgroup_modifiers/source/blender/render/intern/source/shadeoutput.c branches/vgroup_modifiers/source/blender/render/intern/source/strand.c branches/vgroup_modifiers/source/blender/render/intern/source/volumetric.c branches/vgroup_modifiers/source/blender/windowmanager/intern/wm_event_system.c branches/vgroup_modifiers/source/gameengine/GamePlayer/ghost/GPG_Application.cpp branches/vgroup_modifiers/source/gameengine/Ketsji/KX_PyMath.h Property Changed: branches/vgroup_modifiers/ branches/vgroup_modifiers/source/blender/editors/space_outliner/ Property changes on: branches/vgroup_modifiers
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42864] branches/vgroup_modifiers/source/ blender: Previous commit was not working as expected, except in some specific cases.
Revision: 42864 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42864 Author: mont29 Date: 2011-12-24 14:22:16 + (Sat, 24 Dec 2011) Log Message: --- Previous commit was not working as expected, except in some specific cases. So I had to change things a bit, and add a new flags memeber to DerivedMesh struct. For now, it only holds a DM_MOD_DO_WMCOL flag indicating to DynaPaint and WeightVG modifiers whether they should do weight preview or not (specifically, only in Object mode, or WP mode when modifier preview is enabled)! As far as I can tell, it now works fine (and I?\226?\128?\153m quite happy with the viewing possibilities in WP mode), but not sure it is OK to edit such core struct for this? Will have to poke main devs?\226?\128?\166 :) Modified Paths: -- branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/dynamicpaint.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h === --- branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h 2011-12-24 14:09:43 UTC (rev 42863) +++ branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h 2011-12-24 14:22:16 UTC (rev 42864) @@ -68,6 +68,9 @@ #define SUB_ELEMS_EDGE 2 #define SUB_ELEMS_FACE 4 +/* DM flags. */ +#define DM_MOD_DO_WMCOL (1 0) + typedef struct DMGridData { float co[3]; float no[3]; @@ -95,6 +98,7 @@ struct GPUDrawObject *drawObject; DerivedMeshType type; float auto_bump_scale; + int flags; /* Various flags, currently only DM_MOD_DO_WMCOL. */ /* Misc. Queries */ @@ -372,6 +376,11 @@ */ int DM_release(DerivedMesh *dm); +/* Utility functions to set, clear, and get a DM flag. */ +void DM_set_flag(DerivedMesh *dm, const int flag); +void DM_clear_flag(DerivedMesh *dm, const int flag); +int DM_get_flag(DerivedMesh *dm, const int flag); + /* utility function to convert a DerivedMesh to a Mesh */ void DM_to_mesh(DerivedMesh *dm, struct Mesh *me); Modified: branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c === --- branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c 2011-12-24 14:09:43 UTC (rev 42863) +++ branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c 2011-12-24 14:22:16 UTC (rev 42864) @@ -185,6 +185,7 @@ dm-needsFree = 1; dm-auto_bump_scale = -1.0f; + dm-flags = 0; } void DM_from_template(DerivedMesh *dm, DerivedMesh *source, DerivedMeshType type, @@ -205,6 +206,7 @@ DM_init_funcs(dm); dm-needsFree = 1; + dm-flags = source-flags; } int DM_release(DerivedMesh *dm) @@ -227,6 +229,21 @@ } } +void DM_set_flag(DerivedMesh *dm, const int flag) +{ + dm-flags |= flag; +} + +void DM_clear_flag(DerivedMesh *dm, const int flag) +{ + dm-flags = ~flag; +} + +int DM_get_flag(DerivedMesh *dm, const int flag) +{ + return (dm-flags flag); +} + void DM_to_mesh(DerivedMesh *dm, Mesh *me) { /* dm might depend on me, so we need to do everything with a local copy */ @@ -640,8 +657,6 @@ enum { CALC_WP_MULTIPAINT = (1 0), CALC_WP_AUTO_NORMALIZE = (1 1), - CALC_WP_USE_MODIFIER_PREVIEW = (1 2), - CALC_WP_MODIFIED_WEIGHTS = (1 3) }; static ColorBand *stored_cb= NULL; @@ -731,23 +746,10 @@ * so leave this as is - campbell */ static unsigned char *calc_weightpaint_vert_array(Object *ob, DerivedMesh *dm, int const draw_flag, ColorBand *coba) { - Mesh *me = ob-data; - unsigned char *wtcol_v; - MDeformVert *dv= NULL; - int numVerts; + MDeformVert *dv = DM_get_vert_data_layer(dm, CD_MDEFORMVERT); + int numVerts = dm-getNumVerts(dm); + unsigned char *wtcol_v = MEM_mallocN (sizeof(unsigned char) * numVerts * 4, weightmap_v); - if(draw_flag CALC_WP_MODIFIED_WEIGHTS) { - numVerts = dm-getNumVerts(dm); - dv = DM_get_vert_data_layer(dm, CD_MDEFORMVERT); - } - else { - numVerts = me-totvert; - if(me-dvert) - dv = me-dvert; - } - - wtcol_v = MEM_mallocN (sizeof(unsigned char) * numVerts * 4, weightmap_v); - if (dv) { unsigned char *wc = wtcol_v; unsigned int i; @@ -777,40 +779,27 @@ { ColorBand *coba= stored_cb; /* warning, not a local var */ - Mesh *me = ob-data; - MFace *mf = NULL; - int numFaces; + MFace *mf = dm-getFaceArray(dm); +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42865] branches/vgroup_modifiers: Merged from trunk (-r42849:42864)
Revision: 42865 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42865 Author: mont29 Date: 2011-12-24 14:35:14 + (Sat, 24 Dec 2011) Log Message: --- Merged from trunk (-r42849:42864) Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42849 Modified Paths: -- branches/vgroup_modifiers/CMakeLists.txt branches/vgroup_modifiers/intern/cycles/blender/addon/engine.py branches/vgroup_modifiers/intern/cycles/blender/blender_python.cpp branches/vgroup_modifiers/intern/ghost/GHOST_C-api.h branches/vgroup_modifiers/intern/ghost/GHOST_ISystem.h branches/vgroup_modifiers/intern/ghost/GHOST_IWindow.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_C-api.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_CallbackEventConsumer.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_Debug.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_DisplayManager.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventDragnDrop.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventKey.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventNDOF.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventTrackpad.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_System.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_System.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemCocoa.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_TimerTask.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_Window.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_Window.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowWin32.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowWin32.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowX11.cpp branches/vgroup_modifiers/intern/guardedalloc/MEM_sys_types.h branches/vgroup_modifiers/release/scripts/modules/bpy_extras/view3d_utils.py branches/vgroup_modifiers/source/blender/blenkernel/BKE_customdata.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_writeffmpeg.h branches/vgroup_modifiers/source/blender/blenkernel/depsgraph_private.h branches/vgroup_modifiers/source/blender/blenkernel/intern/object.c branches/vgroup_modifiers/source/blender/blenkernel/intern/writeavi.c branches/vgroup_modifiers/source/blender/blenkernel/intern/writeffmpeg.c branches/vgroup_modifiers/source/blender/blenloader/BLO_sys_types.h branches/vgroup_modifiers/source/blender/editors/include/ED_view3d.h branches/vgroup_modifiers/source/blender/editors/interface/view2d.c branches/vgroup_modifiers/source/blender/editors/sculpt_paint/paint_stroke.c branches/vgroup_modifiers/source/blender/makesdna/DNA_object_types.h branches/vgroup_modifiers/source/blender/makesdna/DNA_scene_types.h branches/vgroup_modifiers/source/blender/makesdna/intern/dna_genfile.c branches/vgroup_modifiers/source/blender/makesdna/intern/makesdna.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_scene.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_decimate.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_edgesplit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_smooth.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_solidify.c branches/vgroup_modifiers/source/blender/python/generic/bpy_internal_import.c branches/vgroup_modifiers/source/blender/python/intern/bpy_interface.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils.h branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Color.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Euler.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Euler.h branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Matrix.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Matrix.h branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Quaternion.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Vector.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_geometry.c branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_noise.c branches/vgroup_modifiers/source/blender/quicktime/apple/qtkit_export.m branches/vgroup_modifiers/source/blender/quicktime/apple/quicktime_export.c branches/vgroup_modifiers/source/blender/quicktime/quicktime_export.h branches/vgroup_modifiers/source/blender/windowmanager/intern/wm_event_system.c Property Changed: branches/vgroup_modifiers/
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42866] branches/vgroup_modifiers/source/ blender/modifiers/intern: Ooops! Forgot to add md control on weight preview in WeightVG Edit and Mix modif
Revision: 42866 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42866 Author: mont29 Date: 2011-12-24 14:37:14 + (Sat, 24 Dec 2011) Log Message: --- Ooops! Forgot to add md control on weight preview in WeightVG Edit and Mix modifiers... Modified Paths: -- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c === --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-12-24 14:35:14 UTC (rev 42865) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c 2011-12-24 14:37:14 UTC (rev 42866) @@ -191,7 +191,7 @@ int do_add = (wmd-edit_flags MOD_WVG_EDIT_ADD2VG) != 0; int do_rem = (wmd-edit_flags MOD_WVG_EDIT_REMFVG) != 0; /* Only do weight-preview in Object, Sculpt and Pose modes! */ - int do_prev = (wmd-common_flags MOD_WVG_CFLAG_WEIGHT_PREVIEW); + int do_prev = ((wmd-common_flags MOD_WVG_CFLAG_WEIGHT_PREVIEW) DM_get_flag(dm, DM_MOD_DO_WMCOL)); /* Get number of verts. */ numVerts = dm-getNumVerts(dm); Modified: branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c === --- branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c 2011-12-24 14:35:14 UTC (rev 42865) +++ branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c 2011-12-24 14:37:14 UTC (rev 42866) @@ -233,7 +233,7 @@ int i; /* Flags. */ /* Only do weight-preview in Object, Sculpt and Pose modes! */ - int do_prev = (wmd-common_flags MOD_WVG_CFLAG_WEIGHT_PREVIEW); + int do_prev = ((wmd-common_flags MOD_WVG_CFLAG_WEIGHT_PREVIEW) DM_get_flag(dm, DM_MOD_DO_WMCOL)); /* Get number of verts. */ numVerts = dm-getNumVerts(dm); ___ 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 [43031] branches/vgroup_modifiers: Merged from trunk (-r42864:43015)
Revision: 43031 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43031 Author: mont29 Date: 2011-12-31 10:46:30 + (Sat, 31 Dec 2011) Log Message: --- Merged from trunk (-r42864:43015) Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=42864 Modified Paths: -- branches/vgroup_modifiers/CMakeLists.txt branches/vgroup_modifiers/SConstruct branches/vgroup_modifiers/build_files/cmake/macros.cmake branches/vgroup_modifiers/build_files/scons/config/linuxcross-config.py branches/vgroup_modifiers/build_files/scons/config/win32-mingw-config.py branches/vgroup_modifiers/build_files/scons/config/win32-vc-config.py branches/vgroup_modifiers/build_files/scons/config/win64-vc-config.py branches/vgroup_modifiers/build_files/scons/tools/btools.py branches/vgroup_modifiers/extern/CMakeLists.txt branches/vgroup_modifiers/intern/CMakeLists.txt branches/vgroup_modifiers/intern/SConscript branches/vgroup_modifiers/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp branches/vgroup_modifiers/intern/cycles/CMakeLists.txt branches/vgroup_modifiers/intern/cycles/app/cycles_test.cpp branches/vgroup_modifiers/intern/cycles/app/cycles_xml.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_camera.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_shader.cpp branches/vgroup_modifiers/intern/cycles/kernel/osl/nodes/node_hsv.osl branches/vgroup_modifiers/intern/cycles/kernel/svm/svm_hsv.h branches/vgroup_modifiers/intern/cycles/kernel/svm/svm_normal.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemCarbon.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemCocoa.mm branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowCarbon.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowWin32.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowX11.cpp branches/vgroup_modifiers/intern/smoke/intern/smoke_API.cpp branches/vgroup_modifiers/release/datafiles/blender_icons.png branches/vgroup_modifiers/release/plugins/sequence/color-correction-hsv.c branches/vgroup_modifiers/release/plugins/sequence/color-correction-yuv.c branches/vgroup_modifiers/release/plugins/sequence/dnr.c branches/vgroup_modifiers/release/plugins/sequence/gamma.c branches/vgroup_modifiers/release/scripts/modules/bpy/utils.py branches/vgroup_modifiers/release/scripts/modules/sys_info.py branches/vgroup_modifiers/release/scripts/presets/ffmpeg/DV.py branches/vgroup_modifiers/release/scripts/presets/ffmpeg/DVD.py branches/vgroup_modifiers/release/scripts/presets/ffmpeg/SVCD.py branches/vgroup_modifiers/release/scripts/presets/ffmpeg/VCD.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/presets.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_game.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_object_constraint.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_render.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_clip.py branches/vgroup_modifiers/source/blender/blenfont/intern/blf_lang.c branches/vgroup_modifiers/source/blender/blenkernel/BKE_array_mallocn.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_colortools.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_customdata.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_global.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_mesh.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_movieclip.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_tracking.h branches/vgroup_modifiers/source/blender/blenkernel/intern/brush.c branches/vgroup_modifiers/source/blender/blenkernel/intern/cdderivedmesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/colortools.c branches/vgroup_modifiers/source/blender/blenkernel/intern/constraint.c branches/vgroup_modifiers/source/blender/blenkernel/intern/customdata.c branches/vgroup_modifiers/source/blender/blenkernel/intern/depsgraph.c branches/vgroup_modifiers/source/blender/blenkernel/intern/image.c branches/vgroup_modifiers/source/blender/blenkernel/intern/mesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/mesh_validate.c branches/vgroup_modifiers/source/blender/blenkernel/intern/movieclip.c branches/vgroup_modifiers/source/blender/blenkernel/intern/particle.c branches/vgroup_modifiers/source/blender/blenkernel/intern/particle_system.c branches/vgroup_modifiers/source/blender/blenkernel/intern/sequencer.c
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43034] branches/vgroup_modifiers: Merged from trunk (-r43015:43033)
Revision: 43034 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43034 Author: mont29 Date: 2011-12-31 11:37:54 + (Sat, 31 Dec 2011) Log Message: --- Merged from trunk (-r43015:43033) Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43015 Modified Paths: -- branches/vgroup_modifiers/CMakeLists.txt branches/vgroup_modifiers/SConstruct branches/vgroup_modifiers/build_files/scons/tools/btools.py branches/vgroup_modifiers/intern/CMakeLists.txt branches/vgroup_modifiers/intern/SConscript branches/vgroup_modifiers/intern/dualcon/intern/Projections.h branches/vgroup_modifiers/intern/guardedalloc/MEM_sys_types.h branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_clip.py branches/vgroup_modifiers/source/blender/blenkernel/intern/depsgraph.c branches/vgroup_modifiers/source/blender/blenkernel/intern/dynamicpaint.c branches/vgroup_modifiers/source/blender/blenkernel/intern/tracking.c branches/vgroup_modifiers/source/blender/blenloader/BLO_sys_types.h branches/vgroup_modifiers/source/blender/editors/space_clip/tracking_ops.c branches/vgroup_modifiers/source/blender/editors/space_file/filesel.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_draw.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_snap.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_dynamicpaint.c branches/vgroup_modifiers/source/blender/modifiers/CMakeLists.txt branches/vgroup_modifiers/source/blender/modifiers/SConscript branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_remesh.c branches/vgroup_modifiers/source/blender/render/intern/source/shadeoutput.c branches/vgroup_modifiers/source/gameengine/Ketsji/KX_FontObject.cpp Property Changed: branches/vgroup_modifiers/ branches/vgroup_modifiers/source/blender/editors/space_outliner/ Property changes on: branches/vgroup_modifiers ___ Modified: svn:mergeinfo - /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998 /branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801 /trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-43015 + /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998 /branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801 /trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-43033 Modified: branches/vgroup_modifiers/CMakeLists.txt === --- branches/vgroup_modifiers/CMakeLists.txt2011-12-31 11:08:04 UTC (rev 43033) +++ branches/vgroup_modifiers/CMakeLists.txt2011-12-31 11:37:54 UTC (rev 43034) @@ -169,6 +169,7 @@ option(WITH_MOD_SMOKE Enable Smoke Modifier (Smoke Simulation) ON) option(WITH_MOD_DECIMATE Enable Decimate Modifier ON) option(WITH_MOD_BOOLEANEnable Boolean Modifier ON) +option(WITH_MOD_REMESH Enable Remesh Modifier ON) option(WITH_MOD_CLOTH_ELTOPO Enable Experemental cloth solver OFF) mark_as_advanced(WITH_MOD_CLOTH_ELTOPO) option(WITH_MOD_OCEANSIMEnable Ocean Modifier OFF) @@ -1570,6 +1571,7 @@ info_cfg_text(Modifiers:) info_cfg_option(WITH_MOD_BOOLEAN) + info_cfg_option(WITH_MOD_REMESH) info_cfg_option(WITH_MOD_DECIMATE) info_cfg_option(WITH_MOD_FLUID) info_cfg_option(WITH_MOD_OCEANSIM) Modified: branches/vgroup_modifiers/SConstruct === --- branches/vgroup_modifiers/SConstruct2011-12-31 11:08:04 UTC (rev 43033) +++ branches/vgroup_modifiers/SConstruct2011-12-31 11:37:54 UTC (rev 43034) @@ -264,6 +264,7 @@ target_env_defs['WITH_BF_OCEANSIM'] = False target_env_defs['WITH_BF_DECIMATE'] = False target_env_defs['WITH_BF_BOOLEAN'] = False +target_env_defs['WITH_BF_REMESH'] = False target_env_defs['WITH_BF_PYTHON'] = False target_env_defs['WITH_BF_3DMOUSE'] = False Modified: branches/vgroup_modifiers/build_files/scons/tools/btools.py === --- branches/vgroup_modifiers/build_files/scons/tools/btools.py 2011-12-31 11:08:04 UTC (rev 43033) +++ branches/vgroup_modifiers/build_files/scons/tools/btools.py 2011-12-31 11:37:54 UTC (rev 43034) @@ -152,6 +152,7 @@ 'WITH_BF_FLUID', 'WITH_BF_DECIMATE', 'WITH_BF_BOOLEAN', +'WITH_BF_REMESH',
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43037] trunk/blender/source/blender: Fix [#29728] Explode Modifier Causes Crash.
Revision: 43037 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43037 Author: mont29 Date: 2011-12-31 15:10:38 + (Sat, 31 Dec 2011) Log Message: --- Fix [#29728] Explode Modifier Causes Crash. The problem was in fact in recent BLI_edgehash changes: a typo in the new macro EDGE_ORD made v0 v1, instead of v0 v1. This caused the bug in explode modifier, which (ab)uses that ordering feature a bit?\226?\128?\166 Modified Paths: -- trunk/blender/source/blender/blenlib/intern/edgehash.c trunk/blender/source/blender/modifiers/intern/MOD_explode.c Modified: trunk/blender/source/blender/blenlib/intern/edgehash.c === --- trunk/blender/source/blender/blenlib/intern/edgehash.c 2011-12-31 12:58:03 UTC (rev 43036) +++ trunk/blender/source/blender/blenlib/intern/edgehash.c 2011-12-31 15:10:38 UTC (rev 43037) @@ -52,7 +52,7 @@ /* ensure v0 is smaller */ #define EDGE_ORD(v0, v1) \ - if (v0 v1) { \ + if (v0 v1) { \ v0 ^= v1;\ v1 ^= v0;\ v0 ^= v1;\ Modified: trunk/blender/source/blender/modifiers/intern/MOD_explode.c === --- trunk/blender/source/blender/modifiers/intern/MOD_explode.c 2011-12-31 12:58:03 UTC (rev 43036) +++ trunk/blender/source/blender/modifiers/intern/MOD_explode.c 2011-12-31 15:10:38 UTC (rev 43037) @@ -790,8 +790,8 @@ /* float timestep; */ int *facepa=emd-facepa; int totdup=0,totvert=0,totface=0,totpart=0; - int i, v, mindex=0; - unsigned int ed_v1, ed_v2; + int i, v; + unsigned int ed_v1, ed_v2, mindex=0; MTFace *mtface = NULL, *mtf; totface= dm-getNumFaces(dm); ___ 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 [43055] trunk/blender/source/blender: Fixed names of VertexWeight modifiers RNA structs, in RNA_access.h ( probably forgotten when they were renamed,
Revision: 43055 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43055 Author: mont29 Date: 2012-01-01 16:09:32 + (Sun, 01 Jan 2012) Log Message: --- Fixed names of VertexWeight modifiers RNA structs, in RNA_access.h (probably forgotten when they were renamed, before the merge in trunk, and was never noticed as they are not used...). Also removed the $ID$ from remesh modifier header, and quited a gcc warning. Modified Paths: -- trunk/blender/source/blender/makesrna/RNA_access.h trunk/blender/source/blender/modifiers/intern/MOD_remesh.c Modified: trunk/blender/source/blender/makesrna/RNA_access.h === --- trunk/blender/source/blender/makesrna/RNA_access.h 2012-01-01 13:09:58 UTC (rev 43054) +++ trunk/blender/source/blender/makesrna/RNA_access.h 2012-01-01 16:09:32 UTC (rev 43055) @@ -580,9 +580,9 @@ extern StructRNA RNA_VoxelDataTexture; extern StructRNA RNA_WarpModifier; extern StructRNA RNA_WaveModifier; -extern StructRNA RNA_WeightVGEditModifier; -extern StructRNA RNA_WeightVGMixModifier; -extern StructRNA RNA_WeightVGProximityModifier; +extern StructRNA RNA_VertexWeightEditModifier; +extern StructRNA RNA_VertexWeightMixModifier; +extern StructRNA RNA_VertexWeightProximityModifier; extern StructRNA RNA_Window; extern StructRNA RNA_WindowManager; extern StructRNA RNA_WipeSequence; Modified: trunk/blender/source/blender/modifiers/intern/MOD_remesh.c === --- trunk/blender/source/blender/modifiers/intern/MOD_remesh.c 2012-01-01 13:09:58 UTC (rev 43054) +++ trunk/blender/source/blender/modifiers/intern/MOD_remesh.c 2012-01-01 16:09:32 UTC (rev 43055) @@ -1,27 +1,24 @@ /* -* $Id$ -* -* * BEGIN GPL LICENSE BLOCK * -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* The Original Code is Copyright (C) 2011 by Nicholas Bishop. -* -* * END GPL LICENSE BLOCK * -* -*/ + * * BEGIN GPL LICENSE BLOCK * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2011 by Nicholas Bishop. + * + * * END GPL LICENSE BLOCK * + */ /** \file blender/modifiers/intern/MOD_remesh.c * \ingroup modifiers @@ -152,7 +149,7 @@ DualConInput input; DerivedMesh *result; DualConFlags flags = 0; - DualConMode mode; + DualConMode mode = 0; rmd = (RemeshModifierData*)md; ___ 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 [43056] trunk/blender/source/blender/ blenkernel/intern/bvhutils.c: Fix [#29556] shrinkwrap generates spikes if vertices fall exactly on the edge
Revision: 43056 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43056 Author: mont29 Date: 2012-01-01 16:37:01 + (Sun, 01 Jan 2012) Log Message: --- Fix [#29556] shrinkwrap generates spikes if vertices fall exactly on the edge bvhtree_ray_tri_intersection now using isect_ray_tri_epsilon_v3 with FLT_EPSILON. All devs I asked (incuding ones in physics/painting areas) were rather OK with this change, and better to do it now, with more than one month to detect regressions, if any! Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/bvhutils.c Modified: trunk/blender/source/blender/blenkernel/intern/bvhutils.c === --- trunk/blender/source/blender/blenkernel/intern/bvhutils.c 2012-01-01 16:09:32 UTC (rev 43055) +++ trunk/blender/source/blender/blenkernel/intern/bvhutils.c 2012-01-01 16:37:01 UTC (rev 43056) @@ -52,7 +52,7 @@ { float dist; - if(isect_ray_tri_v3(ray-origin, ray-direction, v0, v1, v2, dist, NULL)) + if(isect_ray_tri_epsilon_v3(ray-origin, ray-direction, v0, v1, v2, dist, NULL, FLT_EPSILON)) return dist; return FLT_MAX; ___ 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 [43211] branches/vgroup_modifiers: merged from trunk (-r43033:43210)
Revision: 43211 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43211 Author: mont29 Date: 2012-01-07 15:56:33 + (Sat, 07 Jan 2012) Log Message: --- merged from trunk (-r43033:43210) Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43033 Modified Paths: -- branches/vgroup_modifiers/CMakeLists.txt branches/vgroup_modifiers/build_files/scons/config/win32-mingw-config.py branches/vgroup_modifiers/build_files/scons/config/win32-vc-config.py branches/vgroup_modifiers/build_files/scons/config/win64-vc-config.py branches/vgroup_modifiers/doc/python_api/examples/bpy.types.Operator.4.py branches/vgroup_modifiers/doc/python_api/examples/bpy.types.Operator.5.py branches/vgroup_modifiers/doc/python_api/rst/info_best_practice.rst branches/vgroup_modifiers/doc/python_api/rst/info_quickstart.rst branches/vgroup_modifiers/doc/python_api/rst/info_tips_and_tricks.rst branches/vgroup_modifiers/intern/cycles/app/cycles_server.cpp branches/vgroup_modifiers/intern/cycles/app/cycles_test.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_mesh.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_object.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_session.cpp branches/vgroup_modifiers/intern/cycles/blender/blender_sync.cpp branches/vgroup_modifiers/intern/cycles/device/device.cpp branches/vgroup_modifiers/intern/cycles/device/device.h branches/vgroup_modifiers/intern/cycles/device/device_cpu.cpp branches/vgroup_modifiers/intern/cycles/device/device_cuda.cpp branches/vgroup_modifiers/intern/cycles/device/device_intern.h branches/vgroup_modifiers/intern/cycles/device/device_memory.h branches/vgroup_modifiers/intern/cycles/device/device_multi.cpp branches/vgroup_modifiers/intern/cycles/device/device_network.cpp branches/vgroup_modifiers/intern/cycles/device/device_opencl.cpp branches/vgroup_modifiers/intern/cycles/kernel/kernel.cl branches/vgroup_modifiers/intern/cycles/kernel/kernel.cpp branches/vgroup_modifiers/intern/cycles/kernel/kernel.cu branches/vgroup_modifiers/intern/cycles/kernel/kernel.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_displace.h branches/vgroup_modifiers/intern/cycles/kernel/kernel_optimized.cpp branches/vgroup_modifiers/intern/cycles/kernel/kernel_types.h branches/vgroup_modifiers/intern/cycles/render/buffers.cpp branches/vgroup_modifiers/intern/cycles/render/mesh_displace.cpp branches/vgroup_modifiers/intern/cycles/render/session.cpp branches/vgroup_modifiers/intern/cycles/render/session.h branches/vgroup_modifiers/intern/cycles/render/tile.cpp branches/vgroup_modifiers/intern/ghost/CMakeLists.txt branches/vgroup_modifiers/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_DisplayManagerSDL.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_DisplayManagerX11.cpp branches/vgroup_modifiers/intern/tools/dump_rna2xml.py branches/vgroup_modifiers/release/scripts/modules/animsys_refactor.py branches/vgroup_modifiers/release/scripts/modules/rna_prop_ui.py branches/vgroup_modifiers/release/scripts/modules/sys_info.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/anim.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/clip.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/object_randomize_transform.py branches/vgroup_modifiers/release/scripts/startup/bl_operators/wm.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_curve.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_mesh.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_game.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_object.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_object_constraint.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_particle.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_render.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_clip.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_image.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_logic.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_node.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_userpref.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_userpref_keymap.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_view3d.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_view3d_toolbar.py branches/vgroup_modifiers/source/blender/blenfont/intern/blf.c
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43256] trunk/blender/source/blender: Adding the kyrgyz language.
Revision: 43256 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43256 Author: mont29 Date: 2012-01-10 14:02:27 + (Tue, 10 Jan 2012) Log Message: --- Adding the kyrgyz language. Modified Paths: -- trunk/blender/source/blender/blenfont/intern/blf_lang.c trunk/blender/source/blender/makesrna/intern/rna_userdef.c Modified: trunk/blender/source/blender/blenfont/intern/blf_lang.c === --- trunk/blender/source/blender/blenfont/intern/blf_lang.c 2012-01-10 13:33:53 UTC (rev 43255) +++ trunk/blender/source/blender/blenfont/intern/blf_lang.c 2012-01-10 14:02:27 UTC (rev 43256) @@ -104,6 +104,7 @@ persian, fa_PE, indonesian, id_ID, serbian (latin), sr_RS@latin, + kyrgyz, ky, }; void BLF_lang_init(void) Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c === --- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2012-01-10 13:33:53 UTC (rev 43255) +++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2012-01-10 14:02:27 UTC (rev 43256) @@ -2680,7 +2680,7 @@ /* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */ /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */ /* Note: As this list is in alphabetical order, and not defined order, -* here is the highest define currently in use: 28 (serbian latin). */ +* here is the highest define currently in use: 29 (kyrgyz). */ static EnumPropertyItem language_items[] = { { 0, , 0, Nearly done, }, { 0, DEFAULT, 0, Default (Default), }, @@ -2705,6 +2705,7 @@ {23, GREEK, 0, Greek (Ελληνικά), el_GR}, {27, INDONESIAN, 0, Indonesian (Bahasa indonesia), id_ID}, { 2, JAPANESE, 0, Japanese (日本語), ja_JP}, + {29, KYRGYZ, 0, Kyrgyz (Kyrgyz tili), ki}, {24, KOREAN, 0, Korean (한국 언어), ko_KR}, {25, NEPALI, 0, Nepali (नेपाली), ne_NP}, /* using the utf8 flipped form of Persian (فارسی) */ ___ 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 [43386] trunk/blender/source/blender/ editors: Fix [#29894] Selection in sequence editor does not de-select other strips
Revision: 43386 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43386 Author: mont29 Date: 2012-01-14 22:59:51 + (Sat, 14 Jan 2012) Log Message: --- Fix [#29894] Selection in sequence editor does not de-select other strips Another bunch of fixes for select keymaps (sequencer, node, nla, graph, action). Modified Paths: -- trunk/blender/source/blender/editors/space_action/action_ops.c trunk/blender/source/blender/editors/space_graph/graph_ops.c trunk/blender/source/blender/editors/space_nla/nla_ops.c trunk/blender/source/blender/editors/space_node/node_ops.c trunk/blender/source/blender/editors/space_sequencer/sequencer_ops.c Modified: trunk/blender/source/blender/editors/space_action/action_ops.c === --- trunk/blender/source/blender/editors/space_action/action_ops.c 2012-01-14 21:41:13 UTC (rev 43385) +++ trunk/blender/source/blender/editors/space_action/action_ops.c 2012-01-14 22:59:51 UTC (rev 43386) @@ -36,6 +36,7 @@ #include DNA_space_types.h #include BLI_blenlib.h +#include BLI_utildefines.h #include ED_anim_api.h #include ED_markers.h @@ -110,32 +111,45 @@ /* action_select.c - selection tools */ /* click-select */ - WM_keymap_add_item(keymap, ACTION_OT_clickselect, SELECTMOUSE, KM_PRESS, 0, 0); + kmi = WM_keymap_add_item(keymap, ACTION_OT_clickselect, SELECTMOUSE, KM_PRESS, 0, 0); + RNA_boolean_set(kmi-ptr, extend, FALSE); + RNA_boolean_set(kmi-ptr, column, FALSE); kmi= WM_keymap_add_item(keymap, ACTION_OT_clickselect, SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi-ptr, column, 1); + RNA_boolean_set(kmi-ptr, extend, FALSE); + RNA_boolean_set(kmi-ptr, column, TRUE); kmi= WM_keymap_add_item(keymap, ACTION_OT_clickselect, SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi-ptr, extend, 1); + RNA_boolean_set(kmi-ptr, extend, TRUE); + RNA_boolean_set(kmi-ptr, column, FALSE); kmi= WM_keymap_add_item(keymap, ACTION_OT_clickselect, SELECTMOUSE, KM_PRESS, KM_ALT|KM_SHIFT, 0); - RNA_boolean_set(kmi-ptr, extend, 1); - RNA_boolean_set(kmi-ptr, column, 1); + RNA_boolean_set(kmi-ptr, extend, TRUE); + RNA_boolean_set(kmi-ptr, column, TRUE); /* select left/right */ - WM_keymap_add_item(keymap, ACTION_OT_select_leftright, SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, ACTION_OT_select_leftright, SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi-ptr, extend, FALSE); + RNA_enum_set(kmi-ptr, mode, ACTKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, ACTION_OT_select_leftright, SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0); - RNA_boolean_set(kmi-ptr, extend, 1); + RNA_boolean_set(kmi-ptr, extend, TRUE); + RNA_enum_set(kmi-ptr, mode, ACTKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, ACTION_OT_select_leftright, LEFTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi-ptr, extend, FALSE); RNA_enum_set(kmi-ptr, mode, ACTKEYS_LRSEL_LEFT); kmi= WM_keymap_add_item(keymap, ACTION_OT_select_leftright, RIGHTBRACKETKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi-ptr, extend, FALSE); RNA_enum_set(kmi-ptr, mode, ACTKEYS_LRSEL_RIGHT); /* deselect all */ - WM_keymap_add_item(keymap, ACTION_OT_select_all_toggle, AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, ACTION_OT_select_all_toggle, IKEY, KM_PRESS, KM_CTRL, 0)-ptr, invert, 1); + kmi = WM_keymap_add_item(keymap, ACTION_OT_select_all_toggle, AKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi-ptr, invert, FALSE); + kmi = WM_keymap_add_item(keymap, ACTION_OT_select_all_toggle, IKEY, KM_PRESS, KM_CTRL, 0); + RNA_boolean_set(kmi-ptr, invert, TRUE); /* borderselect */ - WM_keymap_add_item(keymap, ACTION_OT_select_border, BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, ACTION_OT_select_border, BKEY, KM_PRESS, KM_ALT, 0)-ptr, axis_range, 1); + kmi = WM_keymap_add_item(keymap, ACTION_OT_select_border, BKEY, KM_PRESS, 0, 0); + RNA_boolean_set(kmi-ptr, axis_range, FALSE); + kmi = WM_keymap_add_item(keymap, ACTION_OT_select_border, BKEY, KM_PRESS, KM_ALT, 0); + RNA_boolean_set(kmi-ptr, axis_range, TRUE); /* column select */ RNA_enum_set(WM_keymap_add_item(keymap, ACTION_OT_select_column, KKEY, KM_PRESS, 0, 0)-ptr, mode, ACTKEYS_COLUMNSEL_KEYS); Modified:
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43402] trunk/blender/source/blender/ editors/space_graph/graph_ops.c: Another fix for previous own fix...
Revision: 43402 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43402 Author: mont29 Date: 2012-01-15 13:51:32 + (Sun, 15 Jan 2012) Log Message: --- Another fix for previous own fix... Modified Paths: -- trunk/blender/source/blender/editors/space_graph/graph_ops.c Modified: trunk/blender/source/blender/editors/space_graph/graph_ops.c === --- trunk/blender/source/blender/editors/space_graph/graph_ops.c 2012-01-15 13:32:07 UTC (rev 43401) +++ trunk/blender/source/blender/editors/space_graph/graph_ops.c 2012-01-15 13:51:32 UTC (rev 43402) @@ -295,7 +295,7 @@ RNA_boolean_set(kmi-ptr, column, FALSE); /* select left/right */ - WM_keymap_add_item(keymap, GRAPH_OT_select_leftright, SELECTMOUSE, KM_PRESS, KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, GRAPH_OT_select_leftright, SELECTMOUSE, KM_PRESS, KM_CTRL, 0); RNA_boolean_set(kmi-ptr, extend, FALSE); RNA_enum_set(kmi-ptr, mode, GRAPHKEYS_LRSEL_TEST); kmi= WM_keymap_add_item(keymap, GRAPH_OT_select_leftright, SELECTMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0); ___ 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 [43450] trunk/blender/source/blender: New pchan to pose matrices computes.
Revision: 43450 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43450 Author: mont29 Date: 2012-01-17 13:30:20 + (Tue, 17 Jan 2012) Log Message: --- New pchan to pose matrices computes. Fixes [#27898] Bone snap to cursor fails and [#29461] Selection-to-Cursor works strange with bones with TrackTo constraint. Also fixes some inconsistant behavior of no Inherit Rotation/Scale options. WARNING: This commits modifies how translated unconnected child bones with *no Inherit Rotation option* are positionned. This means that if you open a posed/animated armature using such (corner-case) setup, you'll have to adjust manually the locations of such bones: now, disabling Inherit Rotation/Scale will no more move the bone, only affecting its rotation/scale. Many thanks to Bassam Kurdali (slikdigit) for his advices and tests of the patch! - Dev notes?\194?\160: the pchan_to_pose_mat() func was added to BKE_armature.h, which computes two matrices to get the pose transformations (pchan) of the bone directly in pose (i.e. armature object) space. The first matrix is the rotation/scaling parts, the second one is for location. That new function is used by (hence deduplicating and simplifying their code): * The pose evaluation code (where_is_pose_bone()). * The interactive transformation code (add_pose_transdata(), in transform_conversion.c). * The snap to cursor/grid code (through armature_loc_pose_to_bone()/armature_mat_pose_to_bone()). Modified Paths: -- trunk/blender/source/blender/blenkernel/BKE_armature.h trunk/blender/source/blender/blenkernel/intern/armature.c trunk/blender/source/blender/editors/space_view3d/view3d_snap.c trunk/blender/source/blender/editors/transform/transform_conversions.c Modified: trunk/blender/source/blender/blenkernel/BKE_armature.h === --- trunk/blender/source/blender/blenkernel/BKE_armature.h 2012-01-17 13:26:59 UTC (rev 43449) +++ trunk/blender/source/blender/blenkernel/BKE_armature.h 2012-01-17 13:30:20 UTC (rev 43450) @@ -114,6 +114,10 @@ void pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]); void pchan_calc_mat(struct bPoseChannel *pchan); +/* Get the pchan to pose transform matrix. These matrices apply the effects of + * HINGE/NO_SCALE/NO_LOCAL_LOCATION options over the pchan loc/rot/scale transformations. */ +void pchan_to_pose_mat(struct bPoseChannel *pchan, float rotscale_mat[][4], float loc_mat[][4]); + /* Rotation Mode Conversions - Used for PoseChannels + Objects... */ void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode); Modified: trunk/blender/source/blender/blenkernel/intern/armature.c === --- trunk/blender/source/blender/blenkernel/intern/armature.c 2012-01-17 13:26:59 UTC (rev 43449) +++ trunk/blender/source/blender/blenkernel/intern/armature.c 2012-01-17 13:30:20 UTC (rev 43450) @@ -590,7 +590,7 @@ /* Armature Deform *** */ typedef struct bPoseChanDeform { - Mat4*b_bone_mats; + Mat4*b_bone_mats; DualQuat*dual_quat; DualQuat*b_bone_dual_quats; } bPoseChanDeform; @@ -1123,66 +1123,183 @@ copy_v3_v3(outloc, nLocMat[3]); } -/* Convert Pose-Space Matrix to Bone-Space Matrix - * NOTE: this cannot be used to convert to pose-space transforms of the supplied - * pose-channel into its local space (i.e. 'visual'-keyframing) +/* Construct the matrices (rot/scale and loc) to apply the PoseChannels into the armature (object) space. + * I.e. (roughly) the pose_mat(b-1) * yoffs(b-1) * d_root(b) * bone_mat(b) in the + * pose_mat(b)= pose_mat(b-1) * yoffs(b-1) * d_root(b) * bone_mat(b) * chan_mat(b) + * ...function. + * + * This allows to get the transformations of a bone in its object space, *before* constraints (and IK) + * get applied (used by pose evaluation code). + * And reverse: to find pchan transformations needed to place a bone at a given loc/rot/scale + * in object space (used by interactive transform, and snapping code). + * + * Note that, with the HINGE/NO_SCALE/NO_LOCAL_LOCATION options, the location matrix + * will differ from the rotation/scale matrix... + * + * NOTE: This cannot be used to convert to pose-space transforms of the supplied + * pose-channel into its local space (i.e. 'visual'-keyframing). + * (note: I don't understand that, so I keep it :p --mont29). */ -void armature_mat_pose_to_bone(bPoseChannel *pchan, float inmat[][4], float outmat[][4]) +void pchan_to_pose_mat(bPoseChannel *pchan, float rotscale_mat[][4], float loc_mat[][4]) { - float pc_trans[4][4], inv_trans[4][4]; - float pc_posemat[4][4], inv_posemat[4][4]; - float pose_mat[4][4]; +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43458] trunk/blender/source/blender/ makesrna/intern/rna_ui.c: Poor menu labels were not translated!
Revision: 43458 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43458 Author: mont29 Date: 2012-01-17 16:13:39 + (Tue, 17 Jan 2012) Log Message: --- Poor menu labels were not translated! Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_ui.c Modified: trunk/blender/source/blender/makesrna/intern/rna_ui.c === --- trunk/blender/source/blender/makesrna/intern/rna_ui.c 2012-01-17 16:06:24 UTC (rev 43457) +++ trunk/blender/source/blender/makesrna/intern/rna_ui.c 2012-01-17 16:13:39 UTC (rev 43458) @@ -823,7 +823,7 @@ class name is \OBJECT_MT_hello\, and bl_idname is not set by the script, then bl_idname = \OBJECT_MT_hello\)); - prop= RNA_def_property(srna, bl_label, PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, bl_label, PROP_STRING, PROP_TRANSLATE); RNA_def_property_string_sdna(prop, NULL, type-label); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_property_ui_text(prop, Label, The menu label); ___ 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 [43538] trunk/blender/source/blender/ blenkernel/intern/dynamicpaint.c: Minor code enhancement ( replace for loops with while's, and avoid multiple ch
Revision: 43538 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43538 Author: mont29 Date: 2012-01-19 19:09:59 + (Thu, 19 Jan 2012) Log Message: --- Minor code enhancement (replace for loops with while's, and avoid multiple checks to get good face vertex index). No functional changes. Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c Modified: trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c === --- trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c 2012-01-19 19:01:37 UTC (rev 43537) +++ trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c 2012-01-19 19:09:59 UTC (rev 43538) @@ -1613,11 +1613,11 @@ if (col) { #pragma omp parallel for schedule(static) for (i=0; inumOfFaces; i++) { - int j=0; + int j = (mface[i].v4) ? 4 : 3; Material *material = give_current_material(ob, mface[i].mat_nr+1); - for (; j((mface[i].v4)?4:3); j++) { - int index = (j==0)?mface[i].v1: (j==1)?mface[i].v2: (j==2)?mface[i].v3: mface[i].v4; + while (j--) { + int index = *((mface[i].v1)+j); if (surface-preview_id == MOD_DPAINT_SURFACE_PREV_PAINT) { float c[3]; @@ -1666,9 +1666,9 @@ if (col) { #pragma omp parallel for schedule(static) for (i=0; inumOfFaces; i++) { - int j=0; - for (; j((mface[i].v4)?4:3); j++) { - int index = (j==0)?mface[i].v1: (j==1)?mface[i].v2: (j==2)?mface[i].v3: mface[i].v4; + int j = (mface[i].v4) ? 4 : 3; + while (j--) { + int index = *((mface[i].v1)+j); index *= 4; col[i*4+j].a = FTOCHAR(fcolor[index+3]); @@ -1690,10 +1690,9 @@ if (col) { #pragma omp parallel for schedule(static) for (i=0; inumOfFaces; i++) { - int j=0; - - for (; j((mface[i].v4)?4:3); j++) { - int index = (j==0)?mface[i].v1: (j==1)?mface[i].v2: (j==2)?mface[i].v3: mface[i].v4; + int j = (mface[i].v4) ? 4 : 3; + while (j--) { + int index = *((mface[i].v1)+j); col[i*4+j].a = 255; col[i*4+j].r = col[i*4+j].g = @@ -1721,9 +1720,9 @@ #pragma omp parallel for schedule(static) for (i=0; inumOfFaces; i++) { float temp_color[3]; - int j=0; - for (; j((mface[i].v4)?4:3); j++) { - int index = (j==0)?mface[i].v1:
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43541] branches/vgroup_modifiers: Heavily refactored the weight preview code:
Revision: 43541 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43541 Author: mont29 Date: 2012-01-19 21:02:17 + (Thu, 19 Jan 2012) Log Message: --- Heavily refactored the weight preview code: * Removed preview modes from 3DView in WPaint mode. * Made preview even more generic code. Note however current solution to control whether a given modifier is authorized to compute preview or not is most probably wrong currently, will need another solution (prob. affecting all modifiers' code). - Here is a new version of the patch. I addressed most of your advices, with one exception: imho, setting CD_WEIGHT_MCOL from the main modifier evaluation code (in DerivedMesh.c) is not a good idea, and is not even doable, at least for DPaint VCol preview. There would also be the problem of determining which vgroup?\226?\128?\153s weights to preview (modifier one might be different from current active one). Not to mention that a modifier might want to output something else than just a single group?\226?\128?\153s weights (I already have on my hdd a new weight modifier that uses a more complex preview option?\226?\128?\166). So, I think the modifier should keep the responsibility of preview compute, and hence be aware whether it is authorized to compute a given type of preview (in WPaint mode, we want weight preview, but not VCol preview!). In current code, I added two more temporary flags to md-mode, but I?\226?\128?\153m quite aware this is not a good solution. Which leads me to that proposition: I?\226?\128?\153d like to replace the useRenderParam, useCache, useDeform, etc. params passed to the exec modifier functions by a single flag one, which would allow much more flexibility to main code to control each modifier?\226?\128?\153s behavior. Obviously, this would be a huge change in modifiers code, to be done on its own (and before applying that patch!). Not sure whether we want to do that kind of things with bmesh narrowing to merge point? As a side note, as suggested by miikha, we should also rename CD_WEIGHT_MCOL to something like CD_PREVIEW_MCOL... another big patch, but that can wait later. Modified Paths: -- branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_modifier.h branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/dynamicpaint.c branches/vgroup_modifiers/source/blender/blenkernel/intern/modifier.c branches/vgroup_modifiers/source/blender/editors/interface/interface_templates.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawmesh.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawobject.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_header.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_intern.h branches/vgroup_modifiers/source/blender/makesdna/DNA_modifier_types.h branches/vgroup_modifiers/source/blender/makesdna/DNA_scene_types.h branches/vgroup_modifiers/source/blender/makesrna/intern/rna_modifier.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_scene.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_dynamicpaint.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvg_util.h branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgedit.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgmix.c branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py === --- branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py 2012-01-19 20:52:51 UTC (rev 43540) +++ branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py 2012-01-19 21:02:17 UTC (rev 43541) @@ -828,8 +828,6 @@ @staticmethod def vertex_weight_common(layout, ob, md): -layout.prop(md, use_weight_preview) - layout.label(text=Influence/Mask Options:) split = layout.split(percentage=0.4) Modified: branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h === --- branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h 2012-01-19 20:52:51 UTC (rev 43540) +++ branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h 2012-01-19 21:02:17 UTC (rev 43541) @@ -68,9 +68,6 @@ #define SUB_ELEMS_EDGE 2 #define SUB_ELEMS_FACE
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43542] branches/vgroup_modifiers: Merged with trunk (-r43491:43541).
Revision: 43542 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43542 Author: mont29 Date: 2012-01-19 21:25:14 + (Thu, 19 Jan 2012) Log Message: --- Merged with trunk (-r43491:43541). Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43491 Modified Paths: -- branches/vgroup_modifiers/intern/cycles/kernel/kernel_shader.h branches/vgroup_modifiers/intern/cycles/render/light.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.cpp branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.h branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_image.py branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_view3d_toolbar.py branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h branches/vgroup_modifiers/source/blender/blenkernel/BKE_image.h branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c branches/vgroup_modifiers/source/blender/blenkernel/intern/brush.c branches/vgroup_modifiers/source/blender/blenkernel/intern/dynamicpaint.c branches/vgroup_modifiers/source/blender/blenkernel/intern/image_gen.c branches/vgroup_modifiers/source/blender/blenkernel/intern/node.c branches/vgroup_modifiers/source/blender/blenkernel/intern/sequencer.c branches/vgroup_modifiers/source/blender/blenlib/BLI_math_color.h branches/vgroup_modifiers/source/blender/blenlib/intern/math_color.c branches/vgroup_modifiers/source/blender/blenlib/intern/math_color_inline.c branches/vgroup_modifiers/source/blender/editors/animation/anim_channels_defines.c branches/vgroup_modifiers/source/blender/editors/include/UI_resources.h branches/vgroup_modifiers/source/blender/editors/interface/interface_intern.h branches/vgroup_modifiers/source/blender/editors/interface/interface_templates.c branches/vgroup_modifiers/source/blender/editors/interface/interface_widgets.c branches/vgroup_modifiers/source/blender/editors/object/object_bake.c branches/vgroup_modifiers/source/blender/editors/sculpt_paint/CMakeLists.txt branches/vgroup_modifiers/source/blender/editors/sculpt_paint/paint_intern.h branches/vgroup_modifiers/source/blender/editors/sculpt_paint/paint_stroke.c branches/vgroup_modifiers/source/blender/editors/sculpt_paint/sculpt.c branches/vgroup_modifiers/source/blender/editors/sculpt_paint/sculpt_intern.h branches/vgroup_modifiers/source/blender/editors/space_clip/clip_graph_draw.c branches/vgroup_modifiers/source/blender/editors/space_clip/clip_graph_ops.c branches/vgroup_modifiers/source/blender/editors/space_clip/clip_utils.c branches/vgroup_modifiers/source/blender/editors/space_clip/space_clip.c branches/vgroup_modifiers/source/blender/editors/space_outliner/outliner_intern.h branches/vgroup_modifiers/source/blender/editors/space_outliner/outliner_ops.c branches/vgroup_modifiers/source/blender/editors/space_outliner/outliner_select.c branches/vgroup_modifiers/source/blender/editors/space_sequencer/sequencer_draw.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawarmature.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawmesh.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawobject.c branches/vgroup_modifiers/source/blender/editors/space_view3d/drawvolume.c branches/vgroup_modifiers/source/blender/editors/space_view3d/space_view3d.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_draw.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_edit.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_fly.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_intern.h branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_select.c branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_view.c branches/vgroup_modifiers/source/blender/editors/transform/transform_conversions.c branches/vgroup_modifiers/source/blender/editors/transform/transform_generics.c branches/vgroup_modifiers/source/blender/editors/uvedit/uvedit_ops.c branches/vgroup_modifiers/source/blender/imbuf/intern/divers.c branches/vgroup_modifiers/source/blender/makesdna/DNA_tracking_types.h branches/vgroup_modifiers/source/blender/makesrna/intern/SConscript branches/vgroup_modifiers/source/blender/makesrna/intern/rna_controller.c branches/vgroup_modifiers/source/blender/makesrna/intern/rna_object_api.c
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43600] trunk/blender/source/blender/ modifiers/intern: Fix a crasher in WeightVG modifiers.
Revision: 43600 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43600 Author: mont29 Date: 2012-01-22 10:14:01 + (Sun, 22 Jan 2012) Log Message: --- Fix a crasher in WeightVG modifiers. Problem was, if no vertices were ever added to one of the obect's vgroups, there is no CD_DEFORMVERT layer, even though there might be several valid vgroup indices... Odd no one noticed that earlier. Many thanks to miikah for finding that bug! Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c === --- trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c 2012-01-22 06:10:21 UTC (rev 43599) +++ trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c 2012-01-22 10:14:01 UTC (rev 43600) @@ -204,6 +204,17 @@ return dm; dvert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MDEFORMVERT, numVerts); + /* If no vertices were ever added to an object's vgroup, dvert might be NULL. */ + if(!dvert) + /* If this modifier is not allowed to add vertices, just return. */ + if(!do_add) + return dm; + /* Else, add a valid data layer! */ + dvert = CustomData_add_layer_named(dm-vertData, CD_MDEFORMVERT, CD_CALLOC, + NULL, numVerts, wmd-defgrp_name); + /* Ultimate security check. */ + if(!dvert) + return dm; /* Get org weights, assuming 0.0 for vertices not in given vgroup. */ org_w = MEM_mallocN(sizeof(float) * numVerts, WeightVGEdit Modifier, org_w); Modified: trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c === --- trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c 2012-01-22 06:10:21 UTC (rev 43599) +++ trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c 2012-01-22 10:14:01 UTC (rev 43600) @@ -251,6 +251,17 @@ } dvert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MDEFORMVERT, numVerts); + /* If no vertices were ever added to an object's vgroup, dvert might be NULL. */ + if(!dvert) + /* If not affecting all vertices, just return. */ + if(wmd-mix_set != MOD_WVG_SET_ALL) + return dm; + /* Else, add a valid data layer! */ + dvert = CustomData_add_layer_named(dm-vertData, CD_MDEFORMVERT, CD_CALLOC, + NULL, numVerts, wmd-defgrp_name_a); + /* Ultimate security check. */ + if(!dvert) + return dm; /* Find out which vertices to work on. */ tidx = MEM_mallocN(sizeof(int) * numVerts, WeightVGMix Modifier, tidx); Modified: trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c === --- trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c 2012-01-22 06:10:21 UTC (rev 43599) +++ trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c 2012-01-22 10:14:01 UTC (rev 43600) @@ -378,6 +378,10 @@ return dm; dvert = CustomData_duplicate_referenced_layer(dm-vertData, CD_MDEFORMVERT, numVerts); + /* If no vertices were ever added to an object's vgroup, dvert might be NULL. +* As this modifier never add vertices to vgroup, just return. */ + if(!dvert) + return dm; /* Find out which vertices to work on (all vertices in vgroup), and get their relevant weight. */ ___ 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 [43610] trunk/blender/source/blender: Add weight preview to WeightVG modifiers, and first, simple/ basic refactor of how modifiers can generate previe
Revision: 43610 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43610 Author: mont29 Date: 2012-01-22 17:54:23 + (Sun, 22 Jan 2012) Log Message: --- Add weight preview to WeightVG modifiers, and first, simple/basic refactor of how modifiers can generate preview. User side: * Preview for DynamicPaint should keep the same behavior (for now). Weight preview should be somawhat quicker, though. * Preview for WeightVG modifiers is only active in WeightPaint mode, and if the affected vgroup is the active one. * Last active preview modifier in stack wins! Note: that modifier preview topic is yet to be further refined, quite raw/incomplete for now. Dev side: * In draw code, renamed DRAW_DYNAMIC_PAINT_PREVIEW flag to DRAW_MODIFIERS_PREVIEW * Removed use of MOD_DPAINT_PREVIEW_READY in DynamicPaint code (seems unecessary, and if it was, should be of more general scope). * Added eModifierTypeFlag_UsesPreview to ModifierTypeFlag, for modifiers that can generate some preview data. * Added three new modifier funcs, to handle preview modifiers in draw code / mod stack. * For weights preview: added the generic DM_update_weight_mcol func, which can update WEIGHT_MCOL layer with either a given array of weights (currently used by DynamicPaint only), or from current active vgroup(s). So now, draw code is fully generic (i.e. no more modifier-type checking in it). Mod stack code is generic to some extent, but will need more work. Modified Paths: -- trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h trunk/blender/source/blender/blenkernel/BKE_modifier.h trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c trunk/blender/source/blender/blenkernel/intern/modifier.c trunk/blender/source/blender/editors/space_view3d/drawmesh.c trunk/blender/source/blender/editors/space_view3d/drawobject.c trunk/blender/source/blender/editors/space_view3d/view3d_intern.h trunk/blender/source/blender/makesdna/DNA_dynamicpaint_types.h trunk/blender/source/blender/modifiers/intern/MOD_dynamicpaint.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgedit.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgmix.c trunk/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c Modified: trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h === --- trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h 2012-01-22 17:26:56 UTC (rev 43609) +++ trunk/blender/source/blender/blenkernel/BKE_DerivedMesh.h 2012-01-22 17:54:23 UTC (rev 43610) @@ -538,6 +538,15 @@ float (**deformmats)[3][3], float (**deformcos)[3]); void weight_to_rgb(float r_rgb[3], const float weight); +/* Update the weight MCOL preview layer. + * If weights are NULL, use object's active vgroup(s). + * Else, weights must be an array of weight float values. + * If indices is NULL, it must be of numVerts length. + * Else, it must be of num length, as indices, which contains vertices' idx to apply weights to. + * (other vertices are assumed zero weight). + */ +void DM_update_weight_mcol(struct Object *ob, struct DerivedMesh *dm, int const draw_flag, + float *weights, int num, const int *indices); /* convert layers requested by a GLSL material to actually available layers in * the DerivedMesh, with both a pointer for arrays and an offset for editmesh */ Modified: trunk/blender/source/blender/blenkernel/BKE_modifier.h === --- trunk/blender/source/blender/blenkernel/BKE_modifier.h 2012-01-22 17:26:56 UTC (rev 43609) +++ trunk/blender/source/blender/blenkernel/BKE_modifier.h 2012-01-22 17:54:23 UTC (rev 43610) @@ -99,7 +99,10 @@ eModifierTypeFlag_Single = (17), /* Some modifier can't be added manually by user */ - eModifierTypeFlag_NoUserAdd = (18) + eModifierTypeFlag_NoUserAdd = (18), + + /* For modifiers that use CD_WEIGHT_MCOL for preview. */ + eModifierTypeFlag_UsesPreview = (19) } ModifierTypeFlag; typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin); @@ -323,6 +326,7 @@ __attribute__ ((format (printf, 2, 3))) #endif ; +int modifier_isPreview(struct ModifierData *md); void modifiers_foreachObjectLink(struct Object *ob, ObjectWalkFunc walk, @@ -349,6 +353,7 @@ int modifiers_usesArmature(struct Object *ob, struct bArmature *arm); int modifiers_isCorrectableDeformed(struct Object *ob); void modifier_freeTemporaryData(struct ModifierData *md); +int modifiers_isPreview(struct
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43616] branches/bmesh/blender: Merged with trunk (-r43609:43611): updated modifier preview.
Revision: 43616 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43616 Author: mont29 Date: 2012-01-22 20:05:26 + (Sun, 22 Jan 2012) Log Message: --- Merged with trunk (-r43609:43611): updated modifier preview. Noted preview code for DynamicPaint is currently disabled, will see if I can re-enable it?\226?\128?\166 Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43609 Modified Paths: -- branches/bmesh/blender/source/blender/blenkernel/BKE_DerivedMesh.h branches/bmesh/blender/source/blender/blenkernel/BKE_modifier.h branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c branches/bmesh/blender/source/blender/blenkernel/intern/modifier.c branches/bmesh/blender/source/blender/editors/space_view3d/drawmesh.c branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c branches/bmesh/blender/source/blender/editors/space_view3d/view3d_intern.h branches/bmesh/blender/source/blender/makesdna/DNA_dynamicpaint_types.h branches/bmesh/blender/source/blender/modifiers/intern/MOD_dynamicpaint.c branches/bmesh/blender/source/blender/modifiers/intern/MOD_weightvgedit.c branches/bmesh/blender/source/blender/modifiers/intern/MOD_weightvgmix.c branches/bmesh/blender/source/blender/modifiers/intern/MOD_weightvgproximity.c Property Changed: branches/bmesh/blender/ branches/bmesh/blender/release/ branches/bmesh/blender/source/blender/editors/space_outliner/ Property changes on: branches/bmesh/blender ___ Modified: svn:mergeinfo - /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439 /branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801 /trunk/blender:39992-43609 + /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439 /branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801 /trunk/blender:39992-43611 Property changes on: branches/bmesh/blender/release ___ Modified: svn:mergeinfo - /trunk/blender/release:31524-42516,42522-42548,42551-42585,42587-42655,42681-42757,42779-42870,42921-42927,42954-42957,42974-43085,43093-43278,43295-43435,43462-43554,43565-43609 + /trunk/blender/release:31524-42516,42522-42548,42551-42585,42587-42655,42681-42757,42779-42870,42921-42927,42954-42957,42974-43085,43093-43278,43295-43435,43462-43554,43565-43611 Modified: branches/bmesh/blender/source/blender/blenkernel/BKE_DerivedMesh.h === --- branches/bmesh/blender/source/blender/blenkernel/BKE_DerivedMesh.h 2012-01-22 20:01:33 UTC (rev 43615) +++ branches/bmesh/blender/source/blender/blenkernel/BKE_DerivedMesh.h 2012-01-22 20:05:26 UTC (rev 43616) @@ -627,6 +627,15 @@ float (**deformmats)[3][3], float (**deformcos)[3]); void weight_to_rgb(float r_rgb[3], const float weight); +/* Update the weight MCOL preview layer. + * If weights are NULL, use object's active vgroup(s). + * Else, weights must be an array of weight float values. + * If indices is NULL, it must be of numVerts length. + * Else, it must be of num length, as indices, which contains vertices' idx to apply weights to. + * (other vertices are assumed zero weight). + */ +void DM_update_weight_mcol(struct Object *ob, struct DerivedMesh *dm, int const draw_flag, + float *weights, int num, const int *indices); /* convert layers requested by a GLSL material to actually available layers in * the DerivedMesh, with both a pointer for arrays and an offset for editmesh */ Modified: branches/bmesh/blender/source/blender/blenkernel/BKE_modifier.h === --- branches/bmesh/blender/source/blender/blenkernel/BKE_modifier.h 2012-01-22 20:01:33 UTC (rev 43615) +++ branches/bmesh/blender/source/blender/blenkernel/BKE_modifier.h 2012-01-22 20:05:26 UTC (rev 43616) @@ -100,7 +100,10 @@ eModifierTypeFlag_Single = (17), /* Some modifier can't be added manually by user */ - eModifierTypeFlag_NoUserAdd = (18) + eModifierTypeFlag_NoUserAdd = (18), + + /* For modifiers that use CD_WEIGHT_MCOL for preview. */ +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43639] branches/bmesh/blender/source/ blender: BMesh: Fix (re-enable) DynamicPaint previews in Object mode.
Revision: 43639 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43639 Author: mont29 Date: 2012-01-23 16:32:11 + (Mon, 23 Jan 2012) Log Message: --- BMesh: Fix (re-enable) DynamicPaint previews in Object mode. Also simplifies DM_update_weight_mcol: no need to update CD_WEIGHT_MCOL here, as it is anyway recreated from CD_WEIGHT_MLOOPCOL at tesselation time. Only commented out code for now. Modified Paths: -- branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c Modified: branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c === --- branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c 2012-01-23 14:03:09 UTC (rev 43638) +++ branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c 2012-01-23 16:32:11 UTC (rev 43639) @@ -1040,9 +1040,13 @@ ColorBand *coba= stored_cb; /* warning, not a local var */ unsigned char *wtcol_v; +#if 0 /* See coment below. */ unsigned char *wtcol_f = dm-getTessFaceDataArray(dm, CD_WEIGHT_MCOL); +#endif unsigned char(*wtcol_l)[4] = CustomData_get_layer(dm-getLoopDataLayout(dm), CD_WEIGHT_MLOOPCOL); +#if 0 /* See coment below. */ MFace *mf = dm-getTessFaceArray(dm); +#endif MLoop *mloop = dm-getLoopArray(dm), *ml; MPoly *mp = dm-getPolyArray(dm); int numFaces = dm-getNumTessFaces(dm); @@ -1050,13 +1054,22 @@ int totloop; int i, j; +#if 0 /* See comment below */ /* If no CD_WEIGHT_MCOL existed yet, add a new one! */ if (!wtcol_f) wtcol_f = CustomData_add_layer(dm-faceData, CD_WEIGHT_MCOL, CD_CALLOC, NULL, numFaces); if (wtcol_f) { unsigned char *wtcol_f_step = wtcol_f; +# else + /* XXX Seems we still need to create a CD_WEIGHT_MCOL, else it sigsev... +* Strange that we do not have that problem with DPaint VCol preview? */ + if(!dm-getTessFaceDataArray(dm, CD_WEIGHT_MCOL)) + CustomData_add_layer(dm-faceData, CD_WEIGHT_MCOL, CD_CALLOC, NULL, numFaces); + { +#endif + /* Weights are given by caller. */ if (weights) { float *w = weights; @@ -1082,6 +1095,10 @@ /* Now copy colors in all face verts. */ /*first add colors to the tesselation faces*/ + /* XXX Why update that layer? We have to update WEIGHT_MLOOPCOL anyway, +* and tesselation recreates mface layers from mloop/mpoly ones, so no +* need to fill WEIGHT_MCOL here. */ +#if 0 for (i = 0; i numFaces; i++, mf++, wtcol_f_step += (4 * 4)) { /*origindex being NULL means we're operating on original mesh data*/ #if 0 @@ -1103,7 +1120,7 @@ (char *)wtcol_v[4 * (*(mf-v1 + fidx))]); } while (fidx--); } - +#endif /*now add to loops, so the data can be passed through the modifier stack*/ /* If no CD_WEIGHT_MLOOPCOL existed yet, we have to add a new one! */ if (!wtcol_l) { @@ -1470,10 +1487,6 @@ range_vn_i(DM_get_edge_data_layer(dm, CD_ORIGINDEX), dm-numEdgeData, 0); range_vn_i(DM_get_poly_data_layer(dm, CD_ORIGINDEX), dm-numPolyData, 0); } - -/* if((dataMask CD_MASK_WEIGHT_MCOL) (ob-mode OB_MODE_WEIGHT_PAINT))*/ -/* add_weight_mcol_dm(ob, dm, draw_flag);*/ - } Modified: branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c === --- branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c 2012-01-23 14:03:09 UTC (rev 43638) +++ branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c 2012-01-23 16:32:11 UTC (rev 43639) @@ -1604,14 +1604,14 @@ } /* viewport preview */ - if (0 surface-flags MOD_DPAINT_PREVIEW) { + if (surface-flags MOD_DPAINT_PREVIEW) { MPoly *mp = CDDM_get_polys(result); int totpoly = result-numPolyData; /* Save preview results to weight layer to be
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43641] branches/bmesh/blender/source/ blender/blenkernel/intern: BMesh: Fix for previous own fix ( re-enable DynamicPaint previews in Object mode).
Revision: 43641 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43641 Author: mont29 Date: 2012-01-23 17:17:08 + (Mon, 23 Jan 2012) Log Message: --- BMesh: Fix for previous own fix (re-enable DynamicPaint previews in Object mode). In fact, we have to add a CD_WEIGHT_MCOL layer (if not yet present) when updating CD_WEIGHT_MLOOPCOL, else with modifiers modifying the topology (like subsurf), it will sigsev. That step should probably be done at tesselation time, though?\226?\128?\166 Modified Paths: -- branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c Modified: branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c === --- branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c 2012-01-23 16:46:35 UTC (rev 43640) +++ branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c 2012-01-23 17:17:08 UTC (rev 43641) @@ -1062,8 +1062,7 @@ if (wtcol_f) { unsigned char *wtcol_f_step = wtcol_f; # else - /* XXX Seems we still need to create a CD_WEIGHT_MCOL, else it sigsev... -* Strange that we do not have that problem with DPaint VCol preview? */ + /* XXX We have to create a CD_WEIGHT_MCOL, else it might sigsev (after a SubSurf mod, eg)... */ if(!dm-getTessFaceDataArray(dm, CD_WEIGHT_MCOL)) CustomData_add_layer(dm-faceData, CD_WEIGHT_MCOL, CD_CALLOC, NULL, numFaces); Modified: branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c === --- branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c 2012-01-23 16:46:35 UTC (rev 43640) +++ branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c 2012-01-23 17:17:08 UTC (rev 43641) @@ -1608,6 +1608,13 @@ MPoly *mp = CDDM_get_polys(result); int totpoly = result-numPolyData; + /* XXX We have to create a CD_WEIGHT_MCOL, else it might sigsev +* (after a SubSurf mod, eg)... */ + if(!result-getTessFaceDataArray(result, CD_WEIGHT_MCOL)) { + int numFaces = result-getNumTessFaces(result); + CustomData_add_layer(result-faceData, CD_WEIGHT_MCOL, CD_CALLOC, NULL, numFaces); + } + /* Save preview results to weight layer to be * able to share same drawing methods */ col = CustomData_get_layer(result-loopData, CD_WEIGHT_MLOOPCOL); ___ 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 [43651] trunk/blender: Misc picky edits to UI messages.
Revision: 43651 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43651 Author: mont29 Date: 2012-01-23 22:57:46 + (Mon, 23 Jan 2012) Log Message: --- Misc picky edits to UI messages. Modified Paths: -- trunk/blender/release/scripts/startup/bl_ui/properties_particle.py trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c trunk/blender/source/blender/editors/space_outliner/outliner_edit.c trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c trunk/blender/source/blender/editors/uvedit/uvedit_unwrap_ops.c trunk/blender/source/blender/makesrna/intern/rna_cloth.c trunk/blender/source/blender/makesrna/intern/rna_scene.c Modified: trunk/blender/release/scripts/startup/bl_ui/properties_particle.py === --- trunk/blender/release/scripts/startup/bl_ui/properties_particle.py 2012-01-23 21:04:56 UTC (rev 43650) +++ trunk/blender/release/scripts/startup/bl_ui/properties_particle.py 2012-01-23 22:57:46 UTC (rev 43651) @@ -911,7 +911,7 @@ col.prop_search(psys, billboard_time_index_uv, ob.data, uv_textures) split = layout.split(percentage=0.33) -split.label(text=Split uv's:) +split.label(text=Split UVs:) split.prop(part, billboard_uv_split, text=Number of splits) if psys: Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c === --- trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c 2012-01-23 21:04:56 UTC (rev 43650) +++ trunk/blender/source/blender/editors/sculpt_paint/paint_ops.c 2012-01-23 22:57:46 UTC (rev 43651) @@ -359,7 +359,7 @@ extern EnumPropertyItem uv_sculpt_tool_items[]; /* identifiers */ ot-name = UV Sculpt Tool Set; - ot-description = Set the uv sculpt tool; + ot-description = Set the UV sculpt tool; ot-idname = BRUSH_OT_uv_sculpt_tool_set; /* api callbacks */ Modified: trunk/blender/source/blender/editors/space_outliner/outliner_edit.c === --- trunk/blender/source/blender/editors/space_outliner/outliner_edit.c 2012-01-23 21:04:56 UTC (rev 43650) +++ trunk/blender/source/blender/editors/space_outliner/outliner_edit.c 2012-01-23 22:57:46 UTC (rev 43651) @@ -1689,7 +1689,7 @@ { /* identifiers */ ot-name= Drop to Clear Parent; - ot-description = Drag to clear parent in outliner; + ot-description = Drag to clear parent in Outliner; ot-idname= OUTLINER_OT_parent_clear; /* api callbacks */ Modified: trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c === --- trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c 2012-01-23 21:04:56 UTC (rev 43650) +++ trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c 2012-01-23 22:57:46 UTC (rev 43651) @@ -1454,11 +1454,15 @@ /* properties */ RNA_def_boolean(ot-srna, use_limit, 0, Use Limit, Stitch UVs within a specified limit distance); - RNA_def_boolean(ot-srna, snap_islands, 1, Snap Islands, Snap islands together. On edge stitch mode, rotates the islands too); + RNA_def_boolean(ot-srna, snap_islands, 1, Snap Islands, + Snap islands together (on edge stitch mode, rotates the islands too)); - RNA_def_float(ot-srna, limit, 0.01f, 0.0f, FLT_MAX, Limit, Limit distance in normalized coordinates, 0.0, FLT_MAX); - RNA_def_int(ot-srna, static_island, 0, 0, INT_MAX, Static Island, Island that stays in place when stitching islands, 0, INT_MAX); - RNA_def_boolean(ot-srna, midpoint_snap, 0, Snap At Midpoint, Uv's are stitched at midpoint instead of at static island); + RNA_def_float(ot-srna, limit, 0.01f, 0.0f, FLT_MAX, Limit, + Limit distance in normalized coordinates, 0.0, FLT_MAX); + RNA_def_int(ot-srna, static_island, 0, 0, INT_MAX, Static Island, + Island that stays in place when stitching islands, 0, INT_MAX); + RNA_def_boolean(ot-srna, midpoint_snap, 0, Snap At Midpoint, + UVs are stitched at midpoint instead of at static island); prop = RNA_def_collection_runtime(ot-srna, selection, RNA_SelectedUvElement, Selection, ); /* Selection should not be editable or viewed in toolbar */ RNA_def_property_flag(prop, PROP_HIDDEN); Modified: trunk/blender/source/blender/editors/uvedit/uvedit_unwrap_ops.c === --- trunk/blender/source/blender/editors/uvedit/uvedit_unwrap_ops.c 2012-01-23 21:04:56 UTC (rev 43650) +++
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43662] trunk/blender/source/blender: New fix for [#29940] Stretch To constraint breaks scaling in Transform constraint, previous one caused bug [#299
Revision: 43662 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43662 Author: mont29 Date: 2012-01-24 13:17:32 + (Tue, 24 Jan 2012) Log Message: --- New fix for [#29940] Stretch To constraint breaks scaling in Transform constraint, previous one caused bug [#29962] linked objects not correct on r4361, should be fixed now. Org code was working with isotropic scaling, but when scaling only one axis, it was broken. First fix just disabled completly scale handling. This version only takes into account scaling along local Y axis, as this is the only one affecting that constraint! Sorry for the mistake, hope this time it will be ok. Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=4361 Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/constraint.c trunk/blender/source/blender/makesrna/intern/rna_scene.c Modified: trunk/blender/source/blender/blenkernel/intern/constraint.c === --- trunk/blender/source/blender/blenkernel/intern/constraint.c 2012-01-24 12:25:03 UTC (rev 43661) +++ trunk/blender/source/blender/blenkernel/intern/constraint.c 2012-01-24 13:17:32 UTC (rev 43662) @@ -2775,8 +2775,7 @@ /* store Z orientation before destroying obmat */ normalize_v3_v3(zz, cob-matrix[2]); - dist = len_v3v3(cob-matrix[3], ct-matrix[3]); - /* XXX What was all that for??? Makes the constraint buggy with scaled objects, see #29940. */ + /* XXX That makes the constraint buggy with asymmetrically scaled objects, see #29940. */ /* sub_v3_v3v3(vec, cob-matrix[3], ct-matrix[3]);*/ /* vec[0] /= size[0];*/ /* vec[1] /= size[1];*/ @@ -2784,10 +2783,14 @@ /* dist = normalize_v3(vec);*/ + dist = len_v3v3(cob-matrix[3], ct-matrix[3]); + /* Only Y constrained object axis scale should be used, to keep same length when scaling it. */ + dist /= size[1]; + /* data-orglength==0 occurs on first run, and after 'R' button is clicked */ - if (data-orglength == 0) + if (data-orglength == 0) data-orglength = dist; - if (data-bulge == 0) + if (data-bulge == 0) data-bulge = 1.0; scale[1] = dist/data-orglength; Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c === --- trunk/blender/source/blender/makesrna/intern/rna_scene.c2012-01-24 12:25:03 UTC (rev 43661) +++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2012-01-24 13:17:32 UTC (rev 43662) @@ -3722,7 +3722,7 @@ prop= RNA_def_property(srna, use_simplify_triangulate, PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, simplify_flag, R_SIMPLE_NO_TRIANGULATE); - RNA_def_property_ui_text(prop, Skip Quad to Triangles, Disable non-planer quads being triangulated); + RNA_def_property_ui_text(prop, Skip Quad to Triangles, Disable non-planar quads being triangulated); /* Scene API */ RNA_api_scene_render(srna); ___ 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 [43781] trunk/blender/release/scripts/ startup/bl_operators/clip.py: Fixing a typo in Clip ui...
Revision: 43781 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43781 Author: mont29 Date: 2012-01-30 20:41:36 + (Mon, 30 Jan 2012) Log Message: --- Fixing a typo in Clip ui... Modified Paths: -- trunk/blender/release/scripts/startup/bl_operators/clip.py Modified: trunk/blender/release/scripts/startup/bl_operators/clip.py === --- trunk/blender/release/scripts/startup/bl_operators/clip.py 2012-01-30 20:09:50 UTC (rev 43780) +++ trunk/blender/release/scripts/startup/bl_operators/clip.py 2012-01-30 20:41:36 UTC (rev 43781) @@ -835,7 +835,7 @@ return {'FINISHED'} class CLIP_OT_track_settings_as_default(Operator): -Copy trackign settings from active track to default settings +Copy tracking settings from active track to default settings bl_idname = clip.track_settings_as_default bl_label = Track Settings As Default ___ 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 [43958] trunk/blender/source/blender/ blenkernel/intern/idcode.c: Fix [#30099] Wrong python path returned.
Revision: 43958 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=43958 Author: mont29 Date: 2012-02-07 15:14:08 + (Tue, 07 Feb 2012) Log Message: --- Fix [#30099] Wrong python path returned. bpy.data.keys instead of expected bpy.data.shape_keys. The plural name for ID_KE was wrong in idcode.c (bke), not matching the MainCollectionDef one used in rna_main.c. Checked the others too, everything seems ok now. Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/idcode.c Modified: trunk/blender/source/blender/blenkernel/intern/idcode.c === --- trunk/blender/source/blender/blenkernel/intern/idcode.c 2012-02-07 15:11:34 UTC (rev 43957) +++ trunk/blender/source/blender/blenkernel/intern/idcode.c 2012-02-07 15:14:08 UTC (rev 43958) @@ -58,7 +58,7 @@ { ID_ID,ID, ids, 0}, /* plural is fake */ { ID_IM,Image,images, IDTYPE_FLAGS_ISLINKABLE}, { ID_IP,Ipo, ipos, IDTYPE_FLAGS_ISLINKABLE}, /* deprecated */ - { ID_KE,Key, keys, 0}, + { ID_KE,Key, shape_keys, 0}, { ID_LA,Lamp, lamps, IDTYPE_FLAGS_ISLINKABLE}, { ID_LI,Library, libraries,0}, { ID_LT,Lattice, lattices, IDTYPE_FLAGS_ISLINKABLE}, ___ 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 [44037] trunk/blender/source/blender/ makesrna/intern/rna_wm.c: Fix [#30122] Tweak mouse event values were not loaded from keymap files.
Revision: 44037 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44037 Author: mont29 Date: 2012-02-11 14:50:26 + (Sat, 11 Feb 2012) Log Message: --- Fix [#30122] Tweak mouse event values were not loaded from keymap files. The problem was, those values were not included in the event type agnostic event_value_items list, hence RNA keymap item creation just ignored them. Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_wm.c Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c === --- trunk/blender/source/blender/makesrna/intern/rna_wm.c 2012-02-11 14:27:36 UTC (rev 44036) +++ trunk/blender/source/blender/makesrna/intern/rna_wm.c 2012-02-11 14:50:26 UTC (rev 44037) @@ -67,6 +67,14 @@ {KM_RELEASE, RELEASE, 0, Release, }, {KM_CLICK, CLICK, 0, Click, }, {KM_DBL_CLICK, DOUBLE_CLICK, 0, Double Click, }, + {EVT_GESTURE_N, NORTH, 0, North, }, + {EVT_GESTURE_NE, NORTH_EAST, 0, North-East, }, + {EVT_GESTURE_E, EAST, 0, East, }, + {EVT_GESTURE_SE, SOUTH_EAST, 0, South-East, }, + {EVT_GESTURE_S, SOUTH, 0, South, }, + {EVT_GESTURE_SW, SOUTH_WEST, 0, South-West, }, + {EVT_GESTURE_W, WEST, 0, West, }, + {EVT_GESTURE_NW, NORTH_WEST, 0, North-West, }, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem event_tweak_type_items[]= { ___ 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 [44039] trunk/blender/source/blender/ editors/space_sequencer/sequencer_add.c: Fix [#30136] Adding Sequence Plugin fails.
Revision: 44039 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44039 Author: mont29 Date: 2012-02-11 16:08:45 + (Sat, 11 Feb 2012) Log Message: --- Fix [#30136] Adding Sequence Plugin fails. Problem was in how file selector is called by the effect_strip_add operator invoke. WM_operator_filesel() is not suited, as it directly calls exec if filepath is already set, and sequencer_generic_invoke_xy__internal() will set that path unless otherwise told. So using rather the same way to do as the one used by the other strip_add operators... Modified Paths: -- trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c === --- trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c 2012-02-11 15:49:25 UTC (rev 44038) +++ trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c 2012-02-11 16:08:45 UTC (rev 44039) @@ -713,7 +713,8 @@ if (is_type_set type==SEQ_PLUGIN) { /* only plugins need the file selector */ - return WM_operator_filesel(C, op, event); + WM_event_add_fileselect(C, op); + return OPERATOR_RUNNING_MODAL; } else { return sequencer_add_effect_strip_exec(C, op); ___ 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 [44066] branches/bmesh/blender/source/ blender/editors/space_view3d/view3d_buttons.c: Fix for bevel weights not being set in toolbar buttons (edit mod
Revision: 44066 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44066 Author: mont29 Date: 2012-02-12 18:17:30 + (Sun, 12 Feb 2012) Log Message: --- Fix for bevel weights not being set in toolbar buttons (edit mode). Code simply mimics crease one... Modified Paths: -- branches/bmesh/blender/source/blender/editors/space_view3d/view3d_buttons.c Modified: branches/bmesh/blender/source/blender/editors/space_view3d/view3d_buttons.c === --- branches/bmesh/blender/source/blender/editors/space_view3d/view3d_buttons.c 2012-02-12 17:44:10 UTC (rev 44065) +++ branches/bmesh/blender/source/blender/editors/space_view3d/view3d_buttons.c 2012-02-12 18:17:30 UTC (rev 44066) @@ -436,7 +436,7 @@ BM_ITER(eed, iter, em-bm, BM_EDGES_OF_MESH, NULL) { if(BM_elem_flag_test(eed, BM_ELEM_SELECT)) { - float *crease = CustomData_bmesh_get(em-bm-edata, eed-head.data, CD_CREASE); + float *crease = bm_get_cd_float(em-bm-edata, eed-head.data, CD_CREASE); if (!crease) break; *crease= fixed_crease; @@ -458,7 +458,7 @@ BM_ITER(eed, iter, em-bm, BM_EDGES_OF_MESH, NULL) { if(BM_elem_flag_test(eed, BM_ELEM_SELECT) !BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { - float *crease = CustomData_bmesh_get(em-bm-edata, eed-head.data, CD_CREASE); + float *crease = bm_get_cd_float(em-bm-edata, eed-head.data, CD_CREASE); if (!crease) break; @@ -473,7 +473,7 @@ BM_ITER(eed, iter, em-bm, BM_EDGES_OF_MESH, NULL) { if(BM_elem_flag_test(eed, BM_ELEM_SELECT) !BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { - float *crease = CustomData_bmesh_get(em-bm-edata, eed-head.data, CD_CREASE); + float *crease = bm_get_cd_float(em-bm-edata, eed-head.data, CD_CREASE); if (!crease) break; *crease = 1.0f - ((1.0f - *crease) * sca); @@ -483,24 +483,27 @@ } } } - if (median[6] != 0.0f) { -#if 0 // BMESH_TODO - EditEdge *eed; - const float fixed_bweight= (ve_median[6] = 0.0f ? 0.0f : (ve_median[6] = 1.0f ? 1.0f : FLT_MAX)); + if(median[6] != 0.0f) { + BMEdge *eed; + const float fixed_bweight = (ve_median[6] = 0.0f ? 0.0f : (ve_median[6] = 1.0f ? 1.0f : FLT_MAX)); + if(fixed_bweight != FLT_MAX) { /* simple case */ - for(eed= em-edges.first; eed; eed= eed-next) { - if(eed-f SELECT) { - eed-bweight= fixed_bweight; + BM_ITER(eed, iter, em-bm, BM_EDGES_OF_MESH, NULL) { + if(BM_elem_flag_test(eed, BM_ELEM_SELECT)) { + float *bweight = bm_get_cd_float(em-bm-edata, eed-head.data, CD_BWEIGHT); + if(!bweight) break; + + *bweight = fixed_bweight; } } } else { /* scale crease to target median */ - float median_new= ve_median[6]; - float median_orig= ve_median[6] - median[6]; /* previous median value */ +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44188] trunk/blender/source/blender: fa_PE is no valid language code (how comes no one noted that yet?), fa_IR seems the right one!
Revision: 44188 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44188 Author: mont29 Date: 2012-02-17 12:27:58 + (Fri, 17 Feb 2012) Log Message: --- fa_PE is no valid language code (how comes no one noted that yet?), fa_IR seems the right one! Else, persian was just unavailable on Linux (at least, on Debian...). Modified Paths: -- trunk/blender/source/blender/blenfont/intern/blf_lang.c trunk/blender/source/blender/makesrna/intern/rna_userdef.c Modified: trunk/blender/source/blender/blenfont/intern/blf_lang.c === --- trunk/blender/source/blender/blenfont/intern/blf_lang.c 2012-02-17 11:46:28 UTC (rev 44187) +++ trunk/blender/source/blender/blenfont/intern/blf_lang.c 2012-02-17 12:27:58 UTC (rev 44188) @@ -101,7 +101,7 @@ greek, el_GR, korean, ko_KR, nepali, ne_NP, - persian, fa_PE, + persian, fa_IR, indonesian, id_ID, serbian (latin), sr_RS@latin, kyrgyz, ky, Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c === --- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2012-02-17 11:46:28 UTC (rev 44187) +++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2012-02-17 12:27:58 UTC (rev 44188) @@ -2827,7 +2827,7 @@ {24, KOREAN, 0, Korean (한국 언어), ko_KR}, {25, NEPALI, 0, Nepali (नेपाली), ne_NP}, /* using the utf8 flipped form of Persian (فارسی) */ - {26, PERSIAN, 0, Persian (ﯽﺳﺭﺎﻓ), fa_PE}, + {26, PERSIAN, 0, Persian (ﯽﺳﺭﺎﻓ), fa_IR}, {19, POLISH, 0, Polish (Polski), pl_PL}, {20, ROMANIAN, 0, Romanian (Român), ro_RO}, {17, SERBIAN, 0, Serbian (Српски), sr_RS}, ___ 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 [44193] trunk/blender/source/blender/ editors/animation/keyframing.c: Minor fixes found while working on keyingsets.
Revision: 44193 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44193 Author: mont29 Date: 2012-02-17 16:34:28 + (Fri, 17 Feb 2012) Log Message: --- Minor fixes found while working on keyingsets. Modified Paths: -- trunk/blender/source/blender/editors/animation/keyframing.c Modified: trunk/blender/source/blender/editors/animation/keyframing.c === --- trunk/blender/source/blender/editors/animation/keyframing.c 2012-02-17 16:06:32 UTC (rev 44192) +++ trunk/blender/source/blender/editors/animation/keyframing.c 2012-02-17 16:34:28 UTC (rev 44193) @@ -1178,7 +1178,8 @@ /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - prop= RNA_def_boolean(ot-srna, confirm_success, 1, Confirm Successful Insert, Show a popup when the keyframes get successfully added); + prop= RNA_def_boolean(ot-srna, confirm_success, 1, Confirm Successful Insert, + Show a popup when the keyframes get successfully added); RNA_def_property_flag(prop, PROP_HIDDEN); } @@ -1233,7 +1234,8 @@ * - by default, this is disabled so that if a menu is shown, this doesn't come up too */ // XXX should this just be always on? - prop= RNA_def_boolean(ot-srna, confirm_success, 0, Confirm Successful Insert, Show a popup when the keyframes get successfully added); + prop= RNA_def_boolean(ot-srna, confirm_success, 0, Confirm Successful Insert, + Show a popup when the keyframes get successfully added); RNA_def_property_flag(prop, PROP_HIDDEN); /* whether the menu should always be shown @@ -1273,7 +1275,7 @@ return OPERATOR_CANCELLED; } - /* try to insert keyframes for the channels specified by KeyingSet */ + /* try to delete keyframes for the channels specified by KeyingSet */ success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_DELETE, cfra); if (G.f G_DEBUG) printf(KeyingSet '%s' - Successfully removed %d Keyframes \n, ks-name, success); @@ -1325,7 +1327,8 @@ /* confirm whether a keyframe was added by showing a popup * - by default, this is enabled, since this operator is assumed to be called independently */ - RNA_def_boolean(ot-srna, confirm_success, 1, Confirm Successful Insert, Show a popup when the keyframes get successfully added); + RNA_def_boolean(ot-srna, confirm_success, 1, Confirm Successful Delete, + Show a popup when the keyframes get successfully removed); } /* Delete Key Operator */ ___ 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 [44202] trunk/blender/source/blender/ makesrna/intern/rna_access.c: Use BLF API to check whether translation is enabled, when possible!
Revision: 44202 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44202 Author: mont29 Date: 2012-02-17 18:04:49 + (Fri, 17 Feb 2012) Log Message: --- Use BLF API to check whether translation is enabled, when possible! Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_access.c Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c === --- trunk/blender/source/blender/makesrna/intern/rna_access.c 2012-02-17 17:47:10 UTC (rev 44201) +++ trunk/blender/source/blender/makesrna/intern/rna_access.c 2012-02-17 18:04:49 UTC (rev 44202) @@ -475,7 +475,7 @@ } #ifdef WITH_INTERNATIONAL - if(description (U.transoptsUSER_DOTRANSLATE) (U.transoptsUSER_TR_TOOLTIPS)) + if(description BLF_translate_tooltips()) description= BLF_gettext(description); #endif @@ -492,7 +492,7 @@ name= ((IDProperty*)prop)-name; #ifdef WITH_INTERNATIONAL - if((U.transoptsUSER_DOTRANSLATE) (U.transoptsUSER_TR_IFACE)) { + if(BLF_translate_iface()) { if(prop-translation_context) name = BLF_pgettext(prop-translation_context, name); else @@ -1182,7 +1182,7 @@ RNA_property_enum_items(C, ptr, prop, item, totitem, free); #ifdef WITH_INTERNATIONAL - if((U.transoptsUSER_DOTRANSLATE) (U.transoptsUSER_TR_IFACE)) { + if(BLF_translate_iface()) { int i; EnumPropertyItem *nitem; ___ 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 [44246] trunk/blender/source/blender: More pose armature code factorization:
Revision: 44246 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44246 Author: mont29 Date: 2012-02-19 11:09:44 + (Sun, 19 Feb 2012) Log Message: --- More pose armature code factorization: * New armature_mat_bone_to_pose, which is just the reverse of armature_mat_pose_to_bone (currently used by armature evaluation code only, but might be used by constraints space conversion code too, see note below). * Found another place where another (a bit erroneous) pose_to_bone code existed (apply_targetless_ik(), in transform_conversion.c, used by auto ik option), replaced it by a call to armature_mat_pose_to_bone. Notes: * All those changes leave many #if 0 commented code, I will remove those in a few weeks. * There is at least one other place where generic armature_mat_(pose_to_bone/bone_to_pose) functions should be usable: the space conversion function of constraints (constraint_mat_convertspace(), in BKE's constraint.c), but here I have some problems (old code is also somewhat erroneous, but using new one makes old rigs using bone space constraints wrong, e.g. sintel one, and it?\226?\128?\153s just impossible to make conversion code...). So I'll wait and investigate more for this one. Modified Paths: -- trunk/blender/source/blender/blenkernel/BKE_armature.h trunk/blender/source/blender/blenkernel/intern/armature.c trunk/blender/source/blender/editors/transform/transform_conversions.c Modified: trunk/blender/source/blender/blenkernel/BKE_armature.h === --- trunk/blender/source/blender/blenkernel/BKE_armature.h 2012-02-19 08:39:11 UTC (rev 44245) +++ trunk/blender/source/blender/blenkernel/BKE_armature.h 2012-02-19 11:09:44 UTC (rev 44246) @@ -107,6 +107,7 @@ void armature_loc_world_to_pose(struct Object *ob, float *inloc, float *outloc); void armature_mat_pose_to_bone(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]); void armature_loc_pose_to_bone(struct bPoseChannel *pchan, float *inloc, float *outloc); +void armature_mat_bone_to_pose(struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]); void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float arm_mat[][4]); void armature_mat_pose_to_bone_ex(struct Object *ob, struct bPoseChannel *pchan, float inmat[][4], float outmat[][4]); Modified: trunk/blender/source/blender/blenkernel/intern/armature.c === --- trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-19 08:39:11 UTC (rev 44245) +++ trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-19 11:09:44 UTC (rev 44246) @@ -1302,6 +1302,17 @@ mul_v3_m4v3(outmat[3], loc_mat, inmat[3]); } +/* Convert Bone-Space Matrix to Pose-Space Matrix. */ +void armature_mat_bone_to_pose(bPoseChannel *pchan, float inmat[][4], float outmat[][4]) +{ + float rotscale_mat[4][4], loc_mat[4][4]; + + pchan_to_pose_mat(pchan, rotscale_mat, loc_mat); + + mult_m4_m4m4(outmat, rotscale_mat, inmat); + mul_v3_m4v3(outmat[3], loc_mat, inmat[3]); +} + /* Convert Pose-Space Location to Bone-Space Location * NOTE: this cannot be used to convert to pose-space location of the supplied * pose-channel into its local space (i.e. 'visual'-keyframing) @@ -2405,6 +2416,8 @@ /* Construct the posemat based on PoseChannels, that we do before applying constraints. */ /* pose_mat(b)= pose_mat(b-1) * yoffs(b-1) * d_root(b) * bone_mat(b) * chan_mat(b) */ + armature_mat_bone_to_pose(pchan, pchan-chan_mat, pchan-pose_mat); +#if 0 /* XXX Old code, will remove this later. */ { float rotscale_mat[4][4], loc_mat[4][4]; pchan_to_pose_mat(pchan, rotscale_mat, loc_mat); @@ -2413,6 +2426,7 @@ /* Location. */ mul_v3_m4v3(pchan-pose_mat[3], loc_mat, pchan-chan_mat[3]); } +#endif /* Only rootbones get the cyclic offset (unless user doesn't want that). */ /* XXX That could be a problem for snapping and other reverse transform features... */ Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c === --- trunk/blender/source/blender/editors/transform/transform_conversions.c 2012-02-19 08:39:11 UTC (rev 44245) +++ trunk/blender/source/blender/editors/transform/transform_conversions.c 2012-02-19 11:09:44 UTC (rev 44246) @@ -409,7 +409,7 @@ } for(;segcount;segcount--) { Bone *bone; - float rmat[4][4], tmat[4][4], imat[4][4]; + float rmat[4][4]/*, tmat[4][4], imat[4][4]*/; /* pose_mat(b) = pose_mat(b-1) *
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44285] trunk/blender/source/blender/ editors/object/object_vgroup.c: Done BMESH_TODO in object/object_vgroup.c ( make getSurroundingVerts() use polys
Revision: 44285 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44285 Author: mont29 Date: 2012-02-20 22:16:20 + (Mon, 20 Feb 2012) Log Message: --- Done BMESH_TODO in object/object_vgroup.c (make getSurroundingVerts() use polys/loops instead of tessfaces). Also done a few optimizations of related code (OBJECT_OT_vertex_group_fix operator). Modified Paths: -- trunk/blender/source/blender/editors/object/object_vgroup.c Modified: trunk/blender/source/blender/editors/object/object_vgroup.c === --- trunk/blender/source/blender/editors/object/object_vgroup.c 2012-02-20 22:04:29 UTC (rev 44284) +++ trunk/blender/source/blender/editors/object/object_vgroup.c 2012-02-20 22:16:20 UTC (rev 44285) @@ -48,6 +48,7 @@ #include DNA_scene_types.h #include DNA_particle_types.h +#include BLI_array.h #include BLI_math.h #include BLI_blenlib.h #include BLI_utildefines.h @@ -748,100 +749,68 @@ } } -/* This adds the indices of vertices to a list if they are not already present -It returns the number that it added (0-2) -It relies on verts having -1 for unassigned indices -*/ -static int tryToAddVerts(int *verts, int length, int a, int b) +/* This finds all of the vertices face-connected to vert by an edge and returns a + * MEM_allocated array of indices of size count. + * count is an int passed by reference so it can be assigned the value of the length here. */ +static int* getSurroundingVerts(Mesh *me, int vert, int *count) { - char containsA = FALSE; - char containsB = FALSE; - int added = 0; - int i; - for(i = 0; i length (!containsA || !containsB); i++) { - if(verts[i] == a) { - containsA = TRUE; - } else if(verts[i] == b) { - containsB = TRUE; - } else if(verts[i] == -1) { - if(!containsA) { - verts[i] = a; - containsA = TRUE; - added++; - } else if(!containsB){ - verts[i] = b; - containsB = TRUE; - added++; - } - } - } - return added; -} + MPoly *mp = me-mpoly; + int i = me-totpoly; + /* Instead of looping twice on all polys and loops, and use a temp array, let's rather +* use a BLI_array, with a reasonable starting/reserved size (typically, there are not +* many vertices face-linked to another one, even 8 might be too high...). */ + int *verts = NULL; + BLI_array_declare(verts); -/* BMESH_TODO - use MPoly's */ + BLI_array_reserve(verts, 8); + while(i--) { + int j = mp-totloop; + int first_l = mp-totloop - 1; + MLoop *ml = me-mloop[mp-loopstart]; + while(j--) { + /* XXX This assume a vert can only be once in a poly, even though +* it seems logical to me, not totaly sure of that. */ + if (ml-v == vert) { + int a, b, k; + if(j == first_l) { + /* We are on the first corner. */ + a = ml[1].v; + b = ml[j].v; + } + else if(!j) { + /* We are on the last corner. */ + a = (ml-1)-v; + b = me-mloop[mp-loopstart].v; + } + else { + a = (ml-1)-v; + b = (ml+1)-v; + } -/* This finds all of the vertices connected to vert by an edge -and returns an array of indices of size count + /* Append a and b verts to array, if not yet present. */ + k = BLI_array_count(verts); + /* XXX Maybe a == b is enough? */ + while(k-- !(a == b a == -1)) { + if(verts[k] == a) + a = -1; + else if(verts[k] == b) + b = -1; + } + if(a != -1) + BLI_array_append(verts, a); + if(b != -1) + BLI_array_append(verts, b); -count is an int passed by reference so it can be assigned the
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44299] trunk/blender/source/blender/ modifiers/intern/MOD_mirror.c: Fix [#30281] Left/ Right vertex weights flipped.
Revision: 44299 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44299 Author: mont29 Date: 2012-02-21 14:45:18 + (Tue, 21 Feb 2012) Log Message: --- Fix [#30281] Left/Right vertex weights flipped. Mirror modifier was flipping vgroups on org vertices, not mirrored ones! Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_mirror.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_mirror.c === --- trunk/blender/source/blender/modifiers/intern/MOD_mirror.c 2012-02-21 14:39:59 UTC (rev 44298) +++ trunk/blender/source/blender/modifiers/intern/MOD_mirror.c 2012-02-21 14:45:18 UTC (rev 44299) @@ -266,7 +266,7 @@ /* handle vgroup stuff */ if ((mmd-flag MOD_MIR_VGROUP) CustomData_has_layer(result-vertData, CD_MDEFORMVERT)) { - MDeformVert *dvert = CustomData_get_layer(result-vertData, CD_MDEFORMVERT); + MDeformVert *dvert = (MDeformVert *) CustomData_get_layer(result-vertData, CD_MDEFORMVERT) + maxVerts; int *flip_map= NULL, flip_map_len= 0; flip_map= defgroup_flip_map(ob, flip_map_len, 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 [44331] trunk/blender/source/blender/ blenkernel/intern/armature.c: Style code cleanup and consistancy ( mainly spaces around assignements, C++ commen
Revision: 44331 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44331 Author: mont29 Date: 2012-02-22 15:35:42 + (Wed, 22 Feb 2012) Log Message: --- Style code cleanup and consistancy (mainly spaces around assignements, C++ comments to C, and misc spaces/tabs cleanup). No functional change. Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/armature.c Modified: trunk/blender/source/blender/blenkernel/intern/armature.c === --- trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-22 15:04:22 UTC (rev 44330) +++ trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-22 15:35:42 UTC (rev 44331) @@ -4,7 +4,7 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -73,84 +73,87 @@ #include BIK_api.h #include BKE_sketch.h -/* Generic Functions, data level *** */ +/* Generic Functions, data level *** */ bArmature *add_armature(const char *name) { bArmature *arm; - - arm= alloc_libblock (G.main-armature, ID_AR, name); + + arm = alloc_libblock (G.main-armature, ID_AR, name); arm-deformflag = ARM_DEF_VGROUP|ARM_DEF_ENVELOPE; arm-flag = ARM_COL_CUSTOM; /* custom bone-group colors */ - arm-layer= 1; + arm-layer = 1; return arm; } bArmature *get_armature(Object *ob) { - if(ob-type==OB_ARMATURE) + if(ob-type == OB_ARMATURE) return (bArmature *)ob-data; return NULL; } -void free_bonelist (ListBase *lb) +void free_bonelist(ListBase *lb) { Bone *bone; - for(bone=lb-first; bone; bone=bone-next) { + for(bone = lb-first; bone; bone = bone-next) { if(bone-prop) { IDP_FreeProperty(bone-prop); MEM_freeN(bone-prop); } free_bonelist(bone-childbase); } - + BLI_freelistN(lb); } void free_armature(bArmature *arm) { - if (arm) { + if(arm) { free_bonelist(arm-bonebase); - + /* free editmode data */ - if (arm-edbo) { + if(arm-edbo) { BLI_freelistN(arm-edbo); - + MEM_freeN(arm-edbo); - arm-edbo= NULL; + arm-edbo = NULL; } /* free sketch */ - if (arm-sketch) { + if(arm-sketch) { freeSketch(arm-sketch); arm-sketch = NULL; } - + /* free animation data */ - if (arm-adt) { + if(arm-adt) { BKE_free_animdata(arm-id); - arm-adt= NULL; + arm-adt = NULL; } } } void make_local_armature(bArmature *arm) { - Main *bmain= G.main; - int is_local= FALSE, is_lib= FALSE; + Main *bmain = G.main; + int is_local = FALSE, is_lib = FALSE; Object *ob; - if (arm-id.lib==NULL) return; - if (arm-id.us==1) { + if(arm-id.lib == NULL) + return; + if(arm-id.us == 1) { id_clear_lib_data(bmain, arm-id); return; } - for(ob= bmain-object.first; ob ELEM(0, is_lib, is_local); ob= ob-id.next) { + for(ob = bmain-object.first; ob ELEM(0, is_lib, is_local); ob = ob-id.next) { if(ob-data == arm) { - if(ob-id.lib) is_lib= TRUE; - else is_local= TRUE; + if(ob-id.lib) + is_lib = TRUE; + else + is_local = TRUE; } } @@ -158,16 +161,16 @@ id_clear_lib_data(bmain, arm-id); } else if(is_local is_lib) { - bArmature *arm_new= copy_armature(arm); - arm_new-id.us= 0; + bArmature *arm_new = copy_armature(arm); + arm_new-id.us = 0; /* Remap paths of new ID using old library as base. */ BKE_id_lib_local_paths(bmain, arm-id.lib, arm_new-id); - for(ob= bmain-object.first; ob; ob= ob-id.next) { + for(ob = bmain-object.first; ob; ob = ob-id.next) {
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44333] trunk/blender/source/blender/ blenkernel/intern/armature.c: More style edits ( adding a space between statements and parenthesis, if (foo) bla
Revision: 44333 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44333 Author: mont29 Date: 2012-02-22 16:21:17 + (Wed, 22 Feb 2012) Log Message: --- More style edits (adding a space between statements and parenthesis, if (foo) blah;), to follow http://wiki.blender.org/index.php/User:Nazg-gul/CodeStyle proposition. Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/armature.c Modified: trunk/blender/source/blender/blenkernel/intern/armature.c === --- trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-22 16:08:30 UTC (rev 44332) +++ trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-22 16:21:17 UTC (rev 44333) @@ -88,7 +88,7 @@ bArmature *get_armature(Object *ob) { - if(ob-type == OB_ARMATURE) + if (ob-type == OB_ARMATURE) return (bArmature *)ob-data; return NULL; } @@ -97,8 +97,8 @@ { Bone *bone; - for(bone = lb-first; bone; bone = bone-next) { - if(bone-prop) { + for (bone = lb-first; bone; bone = bone-next) { + if (bone-prop) { IDP_FreeProperty(bone-prop); MEM_freeN(bone-prop); } @@ -110,11 +110,11 @@ void free_armature(bArmature *arm) { - if(arm) { + if (arm) { free_bonelist(arm-bonebase); /* free editmode data */ - if(arm-edbo) { + if (arm-edbo) { BLI_freelistN(arm-edbo); MEM_freeN(arm-edbo); @@ -122,13 +122,13 @@ } /* free sketch */ - if(arm-sketch) { + if (arm-sketch) { freeSketch(arm-sketch); arm-sketch = NULL; } /* free animation data */ - if(arm-adt) { + if (arm-adt) { BKE_free_animdata(arm-id); arm-adt = NULL; } @@ -141,35 +141,35 @@ int is_local = FALSE, is_lib = FALSE; Object *ob; - if(arm-id.lib == NULL) + if (arm-id.lib == NULL) return; - if(arm-id.us == 1) { + if (arm-id.us == 1) { id_clear_lib_data(bmain, arm-id); return; } - for(ob = bmain-object.first; ob ELEM(0, is_lib, is_local); ob = ob-id.next) { - if(ob-data == arm) { - if(ob-id.lib) + for (ob = bmain-object.first; ob ELEM(0, is_lib, is_local); ob = ob-id.next) { + if (ob-data == arm) { + if (ob-id.lib) is_lib = TRUE; else is_local = TRUE; } } - if(is_local is_lib == FALSE) { + if (is_local is_lib == FALSE) { id_clear_lib_data(bmain, arm-id); } - else if(is_local is_lib) { + else if (is_local is_lib) { bArmature *arm_new = copy_armature(arm); arm_new-id.us = 0; /* Remap paths of new ID using old library as base. */ BKE_id_lib_local_paths(bmain, arm-id.lib, arm_new-id); - for(ob = bmain-object.first; ob; ob = ob-id.next) { - if(ob-data == arm) { - if(ob-id.lib == NULL) { + for (ob = bmain-object.first; ob; ob = ob-id.next) { + if (ob-data == arm) { + if (ob-id.lib == NULL) { ob-data = arm_new; arm_new-id.us++; arm-id.us--; @@ -183,10 +183,10 @@ { Bone *curBone, *newChildBone; - if(oldBone == actBone) + if (oldBone == actBone) *newActBone = newBone; - if(oldBone-prop) + if (oldBone-prop) newBone-prop = IDP_CopyProperty(oldBone-prop); /* Copy this bone's list */ @@ -194,7 +194,7 @@ /* For each child in the list, update it's children */ newChildBone = newBone-childbase.first; - for(curBone = oldBone-childbase.first; curBone; curBone = curBone-next){ + for (curBone = oldBone-childbase.first; curBone; curBone = curBone-next){ newChildBone-parent = newBone; copy_bonechildren(newChildBone, curBone, actBone, newActBone); newChildBone = newChildBone-next; @@ -212,7 +212,7 @@ /* Duplicate the childrens' lists*/ newBone = newArm-bonebase.first; - for(oldBone = arm-bonebase.first; oldBone; oldBone = oldBone-next) { + for (oldBone = arm-bonebase.first; oldBone; oldBone = oldBone-next) {
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44338] trunk/blender/source/blender/ blenkernel/intern: Armature pose evaluation: more factorization of code.
Revision: 44338 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44338 Author: mont29 Date: 2012-02-22 20:06:33 + (Wed, 22 Feb 2012) Log Message: --- Armature pose evaluation: more factorization of code. Now constraints' space conversion code also uses generic armature_mat_(pose_to_bone/bone_to_pose). Previous own function (constraint_pchan_diff_mat) was somewhat inconsistent too with Hinge/NoScale/LocalLocation options... As with previous similar changes, this might break some old rigs, in very specific cases (when constraint-evaluating an hinge/noscale/local_location bone in local space). In the same part of code, removed unnecessary matrices copying, mult_m4_m4m4 can take the same matrix as input and output, nowadays... Also found a bug-generator weakness in those armature_mat_ functions (if both input and output mat where the same, result was wrong, now systematically copying input mat, as done in LIB's matrix funcs). Finally, factorized offset bone matrix generation into its own small function too, as it is used in two different places in armature.c (pchan_to_pose_mat itself, and restpose's where_is_armature_bone). Note: I think all parts of blender's code related to that topic have now been tackled, but yet have to check BGE, it?\226?\128?\153s probably using that stuff too, one way or the other... Modified Paths: -- trunk/blender/source/blender/blenkernel/intern/armature.c trunk/blender/source/blender/blenkernel/intern/constraint.c Modified: trunk/blender/source/blender/blenkernel/intern/armature.c === --- trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-22 18:57:17 UTC (rev 44337) +++ trunk/blender/source/blender/blenkernel/intern/armature.c 2012-02-22 20:06:33 UTC (rev 44338) @@ -1129,6 +1129,24 @@ copy_v3_v3(outloc, nLocMat[3]); } +/* Simple helper, computes the offset bone matrix. + * offs_bone = yoffs(b-1) + root(b) + bonemat(b). + * Not exported, as it is only used in this file currently... */ +static void get_offset_bone_mat(Bone *bone, float offs_bone[][4]) +{ + if (!bone-parent) + return; + + /* Bone transform itself. */ + copy_m4_m3(offs_bone, bone-bone_mat); + + /* The bone's root offset (is in the parent's coordinate system). */ + copy_v3_v3(offs_bone[3], bone-head); + + /* Get the length translation of parent (length along y axis). */ + offs_bone[3][1] += bone-parent-length; +} + /* Construct the matrices (rot/scale and loc) to apply the PoseChannels into the armature (object) space. * I.e. (roughly) the pose_mat(b-1) * yoffs(b-1) * d_root(b) * bone_mat(b) in the * pose_mat(b)= pose_mat(b-1) * yoffs(b-1) * d_root(b) * bone_mat(b) * chan_mat(b) @@ -1157,17 +1175,10 @@ parchan = pchan-parent; if (parchan) { - float offs_bone[4][4]; /* yoffs(b-1) + root(b) + bonemat(b). */ + float offs_bone[4][4]; + /* yoffs(b-1) + root(b) + bonemat(b). */ + get_offset_bone_mat(bone, offs_bone); - /* Bone transform itself. */ - copy_m4_m3(offs_bone, bone-bone_mat); - - /* The bone's root offset (is in the parent's coordinate system). */ - copy_v3_v3(offs_bone[3], bone-head); - - /* Get the length translation of parent (length along y axis). */ - offs_bone[3][1] += parbone-length; - /* Compose the rotscale matrix for this bone. */ if ((bone-flag BONE_HINGE) (bone-flag BONE_NO_SCALE)) { /* Parent rest rotation and scale. */ @@ -1297,25 +1308,31 @@ * pose-channel into its local space (i.e. 'visual'-keyframing) */ void armature_mat_pose_to_bone(bPoseChannel *pchan, float inmat[][4], float outmat[][4]) { - float rotscale_mat[4][4], loc_mat[4][4]; + float rotscale_mat[4][4], loc_mat[4][4], inmat_[4][4]; + /* Security, this allows to call with inmat == outmat! */ + copy_m4_m4(inmat_, inmat); + pchan_to_pose_mat(pchan, rotscale_mat, loc_mat); invert_m4(rotscale_mat); invert_m4(loc_mat); - mult_m4_m4m4(outmat, rotscale_mat, inmat); - mul_v3_m4v3(outmat[3], loc_mat, inmat[3]); + mult_m4_m4m4(outmat, rotscale_mat, inmat_); + mul_v3_m4v3(outmat[3], loc_mat, inmat_[3]); } /* Convert Bone-Space Matrix to Pose-Space Matrix. */ void armature_mat_bone_to_pose(bPoseChannel *pchan, float inmat[][4], float outmat[][4]) { - float rotscale_mat[4][4], loc_mat[4][4]; + float rotscale_mat[4][4], loc_mat[4][4], inmat_[4][4]; + /* Security, this allows to call with inmat == outmat! */ + copy_m4_m4(inmat_, inmat); + pchan_to_pose_mat(pchan, rotscale_mat, loc_mat); - mult_m4_m4m4(outmat, rotscale_mat, inmat); -
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44464] trunk/blender/source/blender/ modifiers/intern/MOD_solidify.c: Fix [#30351] Solidify Modifier High Quality Normals fails.
Revision: 44464 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44464 Author: mont29 Date: 2012-02-26 15:38:28 + (Sun, 26 Feb 2012) Log Message: --- Fix [#30351] Solidify Modifier High Quality Normals fails. Don't really know why, but appears we need to recalc normals when this option is ON. Also small perf improvement (avoid to compute twice each face normals). Modified Paths: -- trunk/blender/source/blender/modifiers/intern/MOD_solidify.c Modified: trunk/blender/source/blender/modifiers/intern/MOD_solidify.c === --- trunk/blender/source/blender/modifiers/intern/MOD_solidify.c 2012-02-26 14:57:41 UTC (rev 44463) +++ trunk/blender/source/blender/modifiers/intern/MOD_solidify.c 2012-02-26 15:38:28 UTC (rev 44464) @@ -455,7 +455,8 @@ } for (i=0, mp=mpoly; inumFaces; i++, mp++) { - mesh_calc_poly_normal(mp, mloop[mp-loopstart], mvert, face_nors[i]); + if (face_nors_calc) + mesh_calc_poly_normal(mp, mloop[mp-loopstart], mvert, face_nors[i]); /* just added, calc the normal */ BLI_array_empty(face_angles); @@ -701,7 +702,8 @@ MEM_freeN(old_vert_arr); /* must recalculate normals with vgroups since they can displace unevenly [#26888] */ - if(dvert) { + /* Also needed in case of HQ normals [#30351] (don't really undestand why, though... --mont29). */ + if (dvert || smd-flag MOD_SOLIDIFY_NORMAL_CALC) { CDDM_calc_normals(result); } ___ 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 [44492] trunk/blender: Various fixes to UI messages (among other things, all messages needed it should now be capitalized).
Revision: 44492 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44492 Author: mont29 Date: 2012-02-27 18:14:56 + (Mon, 27 Feb 2012) Log Message: --- Various fixes to UI messages (among other things, all messages needed it should now be capitalized). Modified Paths: -- trunk/blender/release/scripts/modules/bpy_extras/io_utils.py trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py trunk/blender/release/scripts/startup/bl_operators/wm.py trunk/blender/source/blender/editors/animation/anim_markers.c trunk/blender/source/blender/editors/armature/editarmature_sketch.c trunk/blender/source/blender/editors/mesh/bmesh_select.c trunk/blender/source/blender/editors/mesh/bmesh_tools.c trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c trunk/blender/source/blender/editors/transform/transform_ops.c trunk/blender/source/blender/makesrna/intern/rna_mesh.c trunk/blender/source/blender/makesrna/intern/rna_nodetree.c trunk/blender/source/blender/makesrna/intern/rna_scene.c trunk/blender/source/blender/makesrna/intern/rna_sequencer.c trunk/blender/source/blender/makesrna/intern/rna_wm.c Modified: trunk/blender/release/scripts/modules/bpy_extras/io_utils.py === --- trunk/blender/release/scripts/modules/bpy_extras/io_utils.py 2012-02-27 18:08:31 UTC (rev 44491) +++ trunk/blender/release/scripts/modules/bpy_extras/io_utils.py 2012-02-27 18:14:56 UTC (rev 44492) @@ -335,7 +335,7 @@ ('MATCH', Match, Match Absolute/Relative setting with input path), ('STRIP', Strip Path, Filename only), - ('COPY', Copy, copy the file to the destination path + ('COPY', Copy, Copy the file to the destination path (or subdirectory)), ), default='AUTO' Modified: trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py === --- trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py 2012-02-27 18:08:31 UTC (rev 44491) +++ trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py 2012-02-27 18:14:56 UTC (rev 44492) @@ -1114,7 +1114,7 @@ angle_limit = FloatProperty( name=Angle Limit, -description=lower for more projection groups, higher for less distortion, +description=Lower for more projection groups, higher for less distortion, min=1.0, max=89.0, default=66.0, ) Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py === --- trunk/blender/release/scripts/startup/bl_operators/wm.py2012-02-27 18:08:31 UTC (rev 44491) +++ trunk/blender/release/scripts/startup/bl_operators/wm.py2012-02-27 18:14:56 UTC (rev 44492) @@ -146,12 +146,12 @@ bl_label = Set Brush Number mode = StringProperty( -name=mode, +name=Mode, description=Paint mode to set brush for, maxlen=1024, ) index = IntProperty( -name=number, +name=Number, description=Brush number, ) Modified: trunk/blender/source/blender/editors/animation/anim_markers.c === --- trunk/blender/source/blender/editors/animation/anim_markers.c 2012-02-27 18:08:31 UTC (rev 44491) +++ trunk/blender/source/blender/editors/animation/anim_markers.c 2012-02-27 18:14:56 UTC (rev 44492) @@ -1116,7 +1116,7 @@ /* flags */ ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot-srna, extend, 0, Extend, extend the selection); + RNA_def_boolean(ot-srna, extend, 0, Extend, Extend the selection); #ifdef DURIAN_CAMERA_SWITCH RNA_def_boolean(ot-srna, camera, 0, Camera, Select the camera); #endif Modified: trunk/blender/source/blender/editors/armature/editarmature_sketch.c === --- trunk/blender/source/blender/editors/armature/editarmature_sketch.c 2012-02-27 18:08:31 UTC (rev 44491) +++ trunk/blender/source/blender/editors/armature/editarmature_sketch.c 2012-02-27 18:14:56 UTC (rev 44492) @@ -2839,7 +2839,7 @@ void SKETCH_OT_delete(wmOperatorType *ot) { /* identifiers */ - ot-name= delete; + ot-name= Delete; ot-idname= SKETCH_OT_delete; /* api callbacks */ @@ -2854,7 +2854,7 @@ void SKETCH_OT_select(wmOperatorType *ot) { /* identifiers */ - ot-name= select; + ot-name= Select; ot-idname=
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44493] trunk/blender/source/blender/ editors/space_node/node_edit.c: Quite a warning (unused param in func), was preventing debug build...
Revision: 44493 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=44493 Author: mont29 Date: 2012-02-27 18:20:58 + (Mon, 27 Feb 2012) Log Message: --- Quite a warning (unused param in func), was preventing debug build... Modified Paths: -- trunk/blender/source/blender/editors/space_node/node_edit.c Modified: trunk/blender/source/blender/editors/space_node/node_edit.c === --- trunk/blender/source/blender/editors/space_node/node_edit.c 2012-02-27 18:14:56 UTC (rev 44492) +++ trunk/blender/source/blender/editors/space_node/node_edit.c 2012-02-27 18:20:58 UTC (rev 44493) @@ -2637,7 +2637,7 @@ /* ** Detach links operator * */ -static int detach_links_exec(bContext *C, wmOperator *op) +static int detach_links_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceNode *snode= CTX_wm_space_node(C); bNodeTree *ntree= snode-edittree; ___ 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 [58417] trunk/blender/release/datafiles: Add Tamil characters to our i18n font (from samyak-tamil).
Revision: 58417 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=58417 Author: mont29 Date: 2013-07-19 20:28:46 + (Fri, 19 Jul 2013) Log Message: --- Add Tamil characters to our i18n font (from samyak-tamil). Modified Paths: -- trunk/blender/release/datafiles/LICENSE-droidsans.ttf.txt trunk/blender/release/datafiles/fonts/droidsans.ttf.gz Modified: trunk/blender/release/datafiles/LICENSE-droidsans.ttf.txt === --- trunk/blender/release/datafiles/LICENSE-droidsans.ttf.txt 2013-07-19 20:16:05 UTC (rev 58416) +++ trunk/blender/release/datafiles/LICENSE-droidsans.ttf.txt 2013-07-19 20:28:46 UTC (rev 58417) @@ -5,6 +5,7 @@ 3. Samyak-devanagari 4. Droid Sans Hebrew Regular 5. Droid Sans Ethiopic Regular +6. Samyak-tamil These were merged using FontForge in (approximately) the above order. For each glyph, a license of the font from which it was imported is applied. @@ -30,7 +31,7 @@ License: Apache-2.0 See Appendix A. -(3) Samyak-devanagari +(3) Samyak-devanagari and (6) Samyak-tamil Copyright: 2005-2006, Rahul Bhalerao b.rahul...@gmail.com 2005-2006, Bageshri Salvi sbages...@gmail.com 2005-2006, Pravin Satpute pravin@gmail.com Modified: trunk/blender/release/datafiles/fonts/droidsans.ttf.gz === (Binary files differ) ___ 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 [58531] trunk/blender/source/blender/ editors/space_node/node_add.c: Minor UI typo fix...
Revision: 58531 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=58531 Author: mont29 Date: 2013-07-23 06:58:05 + (Tue, 23 Jul 2013) Log Message: --- Minor UI typo fix... ;) Modified Paths: -- trunk/blender/source/blender/editors/space_node/node_add.c Modified: trunk/blender/source/blender/editors/space_node/node_add.c === --- trunk/blender/source/blender/editors/space_node/node_add.c 2013-07-23 06:09:00 UTC (rev 58530) +++ trunk/blender/source/blender/editors/space_node/node_add.c 2013-07-23 06:58:05 UTC (rev 58531) @@ -441,7 +441,7 @@ node = node_add_node(C, NULL, CMP_NODE_MASK, snode-cursor[0], snode-cursor[1]); if (!node) { - BKE_report(op-reports, RPT_WARNING, Could not add an mask node); + BKE_report(op-reports, RPT_WARNING, Could not add a mask node); return OPERATOR_CANCELLED; } ___ 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 [58551] trunk/blender/source/blender/ editors/mesh/editmesh_select.c: Fix [#36259] Select linked flat faces with Shift+Ctrl+Alt+F does not work in ver
Revision: 58551 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=58551 Author: mont29 Date: 2013-07-23 18:03:40 + (Tue, 23 Jul 2013) Log Message: --- Fix [#36259] Select linked flat faces with Shift+Ctrl+Alt+F does not work in ver. 2.68 Code was cleaning BM_ELEM_TAG flag of verts, when it actually uses the one of faces... Modified Paths: -- trunk/blender/source/blender/editors/mesh/editmesh_select.c Modified: trunk/blender/source/blender/editors/mesh/editmesh_select.c === --- trunk/blender/source/blender/editors/mesh/editmesh_select.c 2013-07-23 16:23:30 UTC (rev 58550) +++ trunk/blender/source/blender/editors/mesh/editmesh_select.c 2013-07-23 18:03:40 UTC (rev 58551) @@ -2619,7 +2619,7 @@ BMLoop *l, *l2; const float angle_limit = RNA_float_get(op-ptr, sharpness); - BM_mesh_elem_hflag_disable_all(bm, BM_VERT, BM_ELEM_TAG, false); + BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false); BM_ITER_MESH (f, iter, bm, BM_FACES_OF_MESH) { ___ 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 [58969] trunk/blender: Usual edits/ fixes to new UI messages...
Revision: 58969 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=58969 Author: mont29 Date: 2013-08-06 14:55:00 + (Tue, 06 Aug 2013) Log Message: --- Usual edits/fixes to new UI messages... Modified Paths: -- trunk/blender/release/scripts/modules/bl_i18n_utils/utils_spell_check.py trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c trunk/blender/source/blender/makesrna/intern/rna_scene.c Modified: trunk/blender/release/scripts/modules/bl_i18n_utils/utils_spell_check.py === --- trunk/blender/release/scripts/modules/bl_i18n_utils/utils_spell_check.py 2013-08-06 14:50:39 UTC (rev 58968) +++ trunk/blender/release/scripts/modules/bl_i18n_utils/utils_spell_check.py 2013-08-06 14:55:00 UTC (rev 58969) @@ -72,6 +72,7 @@ bandnoise, bindcode, bitrate, +blackbody, blendfile, blendin, bonesize, @@ -361,6 +362,7 @@ timecode, voronoi, voxel, voxels, +vsync, wireframe, zmask, ztransp, Modified: trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c === --- trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c 2013-08-06 14:50:39 UTC (rev 58968) +++ trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c 2013-08-06 14:55:00 UTC (rev 58969) @@ -713,7 +713,8 @@ prop = RNA_def_property(srna, wave_smoothness, PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_range(prop, 0.1, 5.0, 1, 2); - RNA_def_property_ui_text(prop, Smoothness, Limit maximum steepness of wave slope between simulation points. Use higher values for smoother waves at expense of reduced detail); + RNA_def_property_ui_text(prop, Smoothness, Limit maximum steepness of wave slope between simulation points +(use higher values for smoother waves at expense of reduced detail)); prop = RNA_def_property(srna, use_wave_open_border, PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, flags, MOD_DPAINT_WAVE_OPEN_BORDERS); Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c === --- trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-06 14:50:39 UTC (rev 58968) +++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-06 14:55:00 UTC (rev 58969) @@ -3145,14 +3145,14 @@ }; static EnumPropertyItem vsync_items[] = { - {VSYNC_OFF, OFF, 0, Off, Disables vsync}, - {VSYNC_ON, ON, 0, On, Enables vsync}, - {VSYNC_ADAPTIVE, ADAPTIVE, 0, Adaptive, Enables adaptive vsync (if supported)}, + {VSYNC_OFF, OFF, 0, Off, Disable vsync}, + {VSYNC_ON, ON, 0, On, Enable vsync}, + {VSYNC_ADAPTIVE, ADAPTIVE, 0, Adaptive, Enable adaptive vsync (if supported)}, {0, NULL, 0, NULL, NULL} }; static EnumPropertyItem storage_items[] = { - {RAS_STORE_AUTO, AUTO, 0, Auto Select, Chooses the best supported mode}, + {RAS_STORE_AUTO, AUTO, 0, Auto Select, Choose the best supported mode}, {RAS_STORE_IMMEDIATE, IMMEDIATE, 0, Immediate Mode, Slowest performance, requires OpenGL (any version)}, {RAS_STORE_VA, VERTEX_ARRAY, 0, Vertex Arrays, Better performance, requires at least OpenGL 1.1}, #if 0 /* XXX VBOS are currently disabled since they cannot beat vertex array with display lists in performance. */ ___ 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 [59045] trunk/blender/build_files/ build_environment/install_deps.sh: Linux install_deps: update OpenCOLLADA to 828b60384552b83e55d2af7055f07d2c40b4d3
Revision: 59045 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59045 Author: mont29 Date: 2013-08-10 11:06:46 + (Sat, 10 Aug 2013) Log Message: --- Linux install_deps: update OpenCOLLADA to 828b60384552b83e55d2af7055f07d2c40b4d3f4 repo UID. Modified Paths: -- trunk/blender/build_files/build_environment/install_deps.sh Modified: trunk/blender/build_files/build_environment/install_deps.sh === --- trunk/blender/build_files/build_environment/install_deps.sh 2013-08-10 01:29:23 UTC (rev 59044) +++ trunk/blender/build_files/build_environment/install_deps.sh 2013-08-10 11:06:46 UTC (rev 59045) @@ -237,6 +237,7 @@ # Version?? OPENCOLLADA_VERSION=1.3 OPENCOLLADA_SOURCE=https://github.com/KhronosGroup/OpenCOLLADA.git; +OPENCOLLADA_REPO_UID=828b60384552b83e55d2af7055f07d2c40b4d3f4 OPENCOLLADA_FORCE_REBUILD=false OPENCOLLADA_SKIP=false @@ -1632,7 +1633,7 @@ compile_OpenCOLLADA() { # To be changed each time we make edits that would modify the compiled results! - opencollada_magic=6 + opencollada_magic=7 _init_opencollada # Clean install if needed! @@ -1657,7 +1658,7 @@ git pull origin master # Stick to same rev as windows' libs... -git checkout e886e196673222f2f4bc32b936dc96419fff815f +git checkout $OPENCOLLADA_REPO_UID git reset --hard # Always refresh the whole build! ___ 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 [59118] trunk/blender/release/scripts/ startup/bl_operators/add_mesh_torus.py: Typo ( dimention instead of dimension).
Revision: 59118 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59118 Author: mont29 Date: 2013-08-13 18:35:39 + (Tue, 13 Aug 2013) Log Message: --- Typo (dimention instead of dimension). Modified Paths: -- trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py Modified: trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py === --- trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py 2013-08-13 18:34:20 UTC (rev 59117) +++ trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py 2013-08-13 18:35:39 UTC (rev 59118) @@ -105,7 +105,7 @@ default=12, ) mode = bpy.props.EnumProperty( -name=Torus Dimentions, +name=Torus Dimensions, items=((MAJOR_MINOR, Major/Minor, Use the major/minor radiuses for torus dimensions), (EXT_INT, Exterior/Interior, ___ 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 [59119] trunk/blender/release/scripts/ startup/bl_operators/add_mesh_torus.py: Grrr, more typo!
Revision: 59119 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59119 Author: mont29 Date: 2013-08-13 19:01:36 + (Tue, 13 Aug 2013) Log Message: --- Grrr, more typo! Modified Paths: -- trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py Modified: trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py === --- trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py 2013-08-13 18:35:39 UTC (rev 59118) +++ trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py 2013-08-13 19:01:36 UTC (rev 59119) @@ -107,9 +107,9 @@ mode = bpy.props.EnumProperty( name=Torus Dimensions, items=((MAJOR_MINOR, Major/Minor, -Use the major/minor radiuses for torus dimensions), +Use the major/minor radii for torus dimensions), (EXT_INT, Exterior/Interior, -Use the exterior/interior radiuses for torus dimensions)), +Use the exterior/interior radii for torus dimensions)), update=mode_update_callback, ) major_radius = FloatProperty( ___ 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 [59296] trunk/blender: Fix [#36454] 'Tiles ' settings in Render/Performance panel don't respect keyframes
Revision: 59296 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59296 Author: mont29 Date: 2013-08-19 13:30:17 + (Mon, 19 Aug 2013) Log Message: --- Fix [#36454] 'Tiles' settings in Render/Performance panel don't respect keyframes These are not animatable! Note this is the case of most (all?) render settings, maybe we should go over both Cycles and internal ones, there are still quite a bunch of them that are marked as animatable... :/ Modified Paths: -- trunk/blender/intern/cycles/blender/addon/properties.py trunk/blender/source/blender/makesrna/intern/rna_scene.c Modified: trunk/blender/intern/cycles/blender/addon/properties.py === --- trunk/blender/intern/cycles/blender/addon/properties.py 2013-08-19 12:17:31 UTC (rev 59295) +++ trunk/blender/intern/cycles/blender/addon/properties.py 2013-08-19 13:30:17 UTC (rev 59296) @@ -385,6 +385,7 @@ description=Tile order for rendering, items=enum_tile_order, default='CENTER', +options={}, # Not animatable! ) cls.use_progressive_refine = BoolProperty( name=Progressive Refine, Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c === --- trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-19 12:17:31 UTC (rev 59295) +++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-19 13:30:17 UTC (rev 59296) @@ -4190,12 +4190,14 @@ prop = RNA_def_property(srna, tile_x, PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, tilex); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 8, 65536); RNA_def_property_ui_text(prop, Tile X, Horizontal tile size to use while rendering); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, tile_y, PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, tiley); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 8, 65536); RNA_def_property_ui_text(prop, Tile Y, Vertical tile size to use while rendering); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); ___ 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 [59297] trunk/blender/intern/cycles/ blender/addon/properties.py: Stupid mistake in previous commit, sorry :/
Revision: 59297 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59297 Author: mont29 Date: 2013-08-19 13:35:52 + (Mon, 19 Aug 2013) Log Message: --- Stupid mistake in previous commit, sorry :/ Modified Paths: -- trunk/blender/intern/cycles/blender/addon/properties.py Modified: trunk/blender/intern/cycles/blender/addon/properties.py === --- trunk/blender/intern/cycles/blender/addon/properties.py 2013-08-19 13:30:17 UTC (rev 59296) +++ trunk/blender/intern/cycles/blender/addon/properties.py 2013-08-19 13:35:52 UTC (rev 59297) @@ -385,7 +385,7 @@ description=Tile order for rendering, items=enum_tile_order, default='CENTER', -options={}, # Not animatable! +options=set(), # Not animatable! ) cls.use_progressive_refine = BoolProperty( name=Progressive Refine, ___ 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 [59305] trunk/blender/source/gameengine/ Ketsji/BL_ActionManager.h: Fix build with GE and WITH_CXX_GUARDEDALLOC enabled?\226?\128?\166
Revision: 59305 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59305 Author: mont29 Date: 2013-08-19 15:02:28 + (Mon, 19 Aug 2013) Log Message: --- Fix build with GE and WITH_CXX_GUARDEDALLOC enabled?\226?\128?\166 Modified Paths: -- trunk/blender/source/gameengine/Ketsji/BL_ActionManager.h Modified: trunk/blender/source/gameengine/Ketsji/BL_ActionManager.h === --- trunk/blender/source/gameengine/Ketsji/BL_ActionManager.h 2013-08-19 14:40:16 UTC (rev 59304) +++ trunk/blender/source/gameengine/Ketsji/BL_ActionManager.h 2013-08-19 15:02:28 UTC (rev 59305) @@ -27,6 +27,10 @@ #ifndef __BL_ACTIONMANAGER_H__ #define __BL_ACTIONMANAGER_H__ +#ifdef WITH_CXX_GUARDEDALLOC + #include MEM_guardedalloc.h +#endif + #define MAX_ACTION_LAYERS 8 class BL_Action; ___ 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 [59307] trunk/blender/source/blender: Fix [#36438] Adding Metaball when unit scale is smaller than 0. 01 seemingly hangs Blender
Revision: 59307 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59307 Author: mont29 Date: 2013-08-19 17:58:28 + (Mon, 19 Aug 2013) Log Message: --- Fix [#36438] Adding Metaball when unit scale is smaller than 0.01 seemingly hangs Blender Wiresize and rendersize were not handled regarding scene scale, leading to insane precision when working in cm or less... Modified Paths: -- trunk/blender/source/blender/editors/metaball/mball_edit.c trunk/blender/source/blender/makesrna/intern/rna_meta.c Modified: trunk/blender/source/blender/editors/metaball/mball_edit.c === --- trunk/blender/source/blender/editors/metaball/mball_edit.c 2013-08-19 17:37:21 UTC (rev 59306) +++ trunk/blender/source/blender/editors/metaball/mball_edit.c 2013-08-19 17:58:28 UTC (rev 59307) @@ -112,6 +112,8 @@ ml = BKE_mball_element_add(mball, type); ml-rad *= dia; + mball-wiresize *= dia; + mball-rendersize *= dia; copy_v3_v3(ml-x, mat[3]); ml-flag |= SELECT; Modified: trunk/blender/source/blender/makesrna/intern/rna_meta.c === --- trunk/blender/source/blender/makesrna/intern/rna_meta.c 2013-08-19 17:37:21 UTC (rev 59306) +++ trunk/blender/source/blender/makesrna/intern/rna_meta.c 2013-08-19 17:58:28 UTC (rev 59307) @@ -320,13 +320,13 @@ /* number values */ prop = RNA_def_property(srna, resolution, PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, wiresize); - RNA_def_property_range(prop, 0.050f, 1.0f); + RNA_def_property_range(prop, 0.005f, 1.0f); RNA_def_property_ui_text(prop, Wire Size, Polygonization resolution in the 3D viewport); RNA_def_property_update(prop, 0, rna_MetaBall_update_data); prop = RNA_def_property(srna, render_resolution, PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, rendersize); - RNA_def_property_range(prop, 0.050f, 1.0f); + RNA_def_property_range(prop, 0.005f, 1.0f); RNA_def_property_ui_text(prop, Render Size, Polygonization resolution in rendering); RNA_def_property_update(prop, 0, rna_MetaBall_update_data); ___ 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 [59308] trunk/blender/source/blender/ makesrna/intern: Usual UI messages fixes...
Revision: 59308 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59308 Author: mont29 Date: 2013-08-19 18:37:00 + (Mon, 19 Aug 2013) Log Message: --- Usual UI messages fixes... Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_actuator.c trunk/blender/source/blender/makesrna/intern/rna_tracking.c Modified: trunk/blender/source/blender/makesrna/intern/rna_actuator.c === --- trunk/blender/source/blender/makesrna/intern/rna_actuator.c 2013-08-19 17:58:28 UTC (rev 59307) +++ trunk/blender/source/blender/makesrna/intern/rna_actuator.c 2013-08-19 18:37:00 UTC (rev 59308) @@ -700,7 +700,7 @@ prop = RNA_def_property(srna, blend_mode, PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, blend_mode); RNA_def_property_enum_items(prop, prop_blend_items); - RNA_def_property_ui_text(prop, Blend Mode, Determines how this layer is blended with previous layers); + RNA_def_property_ui_text(prop, Blend Mode, How this layer is blended with previous layers); RNA_def_property_update(prop, NC_LOGIC, NULL); #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR Modified: trunk/blender/source/blender/makesrna/intern/rna_tracking.c === --- trunk/blender/source/blender/makesrna/intern/rna_tracking.c 2013-08-19 17:58:28 UTC (rev 59307) +++ trunk/blender/source/blender/makesrna/intern/rna_tracking.c 2013-08-19 18:37:00 UTC (rev 59308) @@ -511,7 +511,8 @@ /* API */ -static MovieTrackingTrack *add_track_to_base(MovieClip *clip, MovieTracking *tracking, ListBase *tracksbase, const char *name, int frame) +static MovieTrackingTrack *add_track_to_base(MovieClip *clip, MovieTracking *tracking, ListBase *tracksbase, + const char *name, int frame) { int width, height; MovieClipUser user = {0}; @@ -1317,7 +1318,7 @@ RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x2); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT); RNA_def_property_ui_text(prop, Corners, -Array of coordinates which represents UI rectange corners in +Array of coordinates which represents UI rectangle corners in frame normalized coordinates); RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL); @@ -1335,7 +1336,8 @@ RNA_def_property_srna(cprop, MovieTrackingPlaneMarkers); srna = RNA_def_struct(brna, MovieTrackingPlaneMarkers, NULL); RNA_def_struct_sdna(srna, MovieTrackingPlaneTrack); - RNA_def_struct_ui_text(srna, Movie Tracking Plane Markers, Collection of markers for movie tracking plane track); + RNA_def_struct_ui_text(srna, Movie Tracking Plane Markers, + Collection of markers for movie tracking plane track); } static void rna_def_trackingPlaneTrack(BlenderRNA *brna) @@ -1569,7 +1571,8 @@ /* active plane track */ prop = RNA_def_property(srna, active, PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, MovieTrackingPlaneTrack); - RNA_def_property_pointer_funcs(prop, rna_tracking_active_plane_track_get, rna_tracking_active_plane_track_set, NULL, NULL); + RNA_def_property_pointer_funcs(prop, rna_tracking_active_plane_track_get, rna_tracking_active_plane_track_set, + NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, Active Plane Track, Active plane track in this tracking data object); } @@ -1613,7 +1616,8 @@ /* active track */ prop = RNA_def_property(srna, active, PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, MovieTrackingTrack); - RNA_def_property_pointer_funcs(prop, rna_tracking_active_plane_track_get, rna_tracking_active_plane_track_set, NULL, NULL); + RNA_def_property_pointer_funcs(prop, rna_tracking_active_plane_track_get, rna_tracking_active_plane_track_set, + NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, Active Track, Active track in this tracking data object); } ___ 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 [59313] trunk/blender/source/blender/ editors/gpencil/gpencil_edit.c: Fix GPencil part of [#36101] BSurface Throw an Error When Press Add Surface
Revision: 59313 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59313 Author: mont29 Date: 2013-08-19 22:46:32 + (Mon, 19 Aug 2013) Log Message: --- Fix GPencil part of [#36101] BSurface Throw an Error When Press Add Surface gpencil_data_get_active and gpencil_data_get_active_v3d did not have consistent behavior when we had an active object, but not on any visible layer (the first would return the default scene gpd in this case, while the first was still returning active object's one). Now they both return scene's one. Modified Paths: -- trunk/blender/source/blender/editors/gpencil/gpencil_edit.c Modified: trunk/blender/source/blender/editors/gpencil/gpencil_edit.c === --- trunk/blender/source/blender/editors/gpencil/gpencil_edit.c 2013-08-19 20:09:02 UTC (rev 59312) +++ trunk/blender/source/blender/editors/gpencil/gpencil_edit.c 2013-08-19 22:46:32 UTC (rev 59313) @@ -192,7 +192,16 @@ /* needed for offscreen rendering */ bGPdata *gpencil_data_get_active_v3d(Scene *scene) { - bGPdata *gpd = scene-basact ? scene-basact-object-gpd : NULL; + Base *base = scene-basact; + bGPdata *gpd = base ? base-object-gpd : NULL; + if (base gpd) { + /* We have to make sure active object is actually visible, else we must use default scene gpd, +* to be consistent with gpencil_data_get_active's behavior. +*/ + if ((scene-lay base-lay) == 0) { + gpd = NULL; + } + } return gpd ? gpd : scene-gpd; } ___ 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 [59336] trunk/blender/source/blender/ blenkernel: Fix [#36351] Changing the Frame Rate value doesnt adjust audio strip length.
Revision: 59336 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59336 Author: mont29 Date: 2013-08-20 19:50:31 + (Tue, 20 Aug 2013) Log Message: --- Fix [#36351] Changing the Frame Rate value doesnt adjust audio strip length. Simply recalc sequence len for audio (and meta!) strips when modifying fps value. Note start, startofs and endofs are also updated, to try to keep final pos and length as consistent as possible. Modified Paths: -- trunk/blender/source/blender/blenkernel/BKE_sequencer.h trunk/blender/source/blender/blenkernel/intern/sequencer.c trunk/blender/source/blender/blenkernel/intern/sound.c Modified: trunk/blender/source/blender/blenkernel/BKE_sequencer.h === --- trunk/blender/source/blender/blenkernel/BKE_sequencer.h 2013-08-20 18:55:41 UTC (rev 59335) +++ trunk/blender/source/blender/blenkernel/BKE_sequencer.h 2013-08-20 19:50:31 UTC (rev 59336) @@ -318,6 +318,8 @@ void BKE_sequencer_update_muting(struct Editing *ed); void BKE_sequencer_update_sound(struct Scene *scene, struct bSound *sound); +void BKE_sequencer_refresh_sound_length(struct Scene *scene); + void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq); void BKE_sequence_base_dupli_recursive(struct Scene *scene, struct Scene *scene_to, ListBase *nseqbase, ListBase *seqbase, int dupe_flag); bool BKE_sequence_is_valid_check(struct Sequence *seq); Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c === --- trunk/blender/source/blender/blenkernel/intern/sequencer.c 2013-08-20 18:55:41 UTC (rev 59335) +++ trunk/blender/source/blender/blenkernel/intern/sequencer.c 2013-08-20 19:50:31 UTC (rev 59336) @@ -3677,6 +3677,50 @@ return offset ? false : true; } +/* Unlike _update_sound_ funcs, these ones take info from audaspace to update sequence length! */ +#ifdef WITH_AUDASPACE +static bool sequencer_refresh_sound_length_recursive(Scene *scene, ListBase *seqbase) { + Sequence *seq; + bool changed = false; + + for (seq = seqbase-first; seq; seq = seq-next) { + if (seq-type == SEQ_TYPE_META) { + if (sequencer_refresh_sound_length_recursive(scene, seq-seqbase)) { + BKE_sequence_calc(scene, seq); + changed = true; + } + } + else if (seq-type == SEQ_TYPE_SOUND_RAM) { + AUD_SoundInfo info = AUD_getInfo(seq-sound-playback_handle); + int old = seq-len; + float fac; + + seq-len = (int)ceil((double)info.length * FPS); + fac = (float)seq-len / (float)old; + old = seq-startofs; + seq-startofs *= fac; + seq-endofs *= fac; + seq-start += (old - seq-startofs); /* So that visual/real start frame does not change! */ + + BKE_sequence_calc(scene, seq); + changed = true; + } + } + return changed; +} +#endif + +void BKE_sequencer_refresh_sound_length(Scene *scene) +{ +#ifdef WITH_AUDASPACE + if (scene-ed) { + sequencer_refresh_sound_length_recursive(scene, scene-ed-seqbase); + } +#else + (void)scene; +#endif +} + void BKE_sequencer_update_sound_bounds_all(Scene *scene) { Editing *ed = scene-ed; Modified: trunk/blender/source/blender/blenkernel/intern/sound.c === --- trunk/blender/source/blender/blenkernel/intern/sound.c 2013-08-20 18:55:41 UTC (rev 59335) +++ trunk/blender/source/blender/blenkernel/intern/sound.c 2013-08-20 19:50:31 UTC (rev 59336) @@ -427,6 +427,8 @@ { if (scene-sound_scene) AUD_setSequencerFPS(scene-sound_scene, FPS); + + BKE_sequencer_refresh_sound_length(scene); } void sound_update_scene_listener(struct Scene *scene) ___ 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 [59374] trunk/blender/source/blender: Fix [#36530] Texture tab refreshing problem
Revision: 59374 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59374 Author: mont29 Date: 2013-08-21 21:35:45 + (Wed, 21 Aug 2013) Log Message: --- Fix [#36530] Texture tab refreshing problem That was not really a bug (code working as expected), but the way tex context was handled was a bit raw, now it is much smarter: * Default fallback context (when current one is no more valid) will now choose most specific ones first (i.e. material/lamp/particules before world and others). * When using that default fallback context, previous one is stored and we try to revive it later, if possible. Thus e.g. object[mat tex ctxt] - empty[default world ctxt] - object[mat tex ctxt] is now working as expected. * However, when user explicitely or implicitely (through e.g. going to Material context...) sets a tex context, previous one is not stored, so that only default fallback context switch may later automatically revive a previous (presumably user-set) context. Modified Paths: -- trunk/blender/source/blender/editors/space_buttons/buttons_texture.c trunk/blender/source/blender/makesdna/DNA_space_types.h trunk/blender/source/blender/makesrna/intern/rna_space.c Modified: trunk/blender/source/blender/editors/space_buttons/buttons_texture.c === --- trunk/blender/source/blender/editors/space_buttons/buttons_texture.c 2013-08-21 21:20:51 UTC (rev 59373) +++ trunk/blender/source/blender/editors/space_buttons/buttons_texture.c 2013-08-21 21:35:45 UTC (rev 59374) @@ -150,21 +150,32 @@ bool valid_particles = ED_texture_context_check_particles(C); bool valid_others = ED_texture_context_check_others(C); + /* this is similar to direct user action, no need to keep better ctxt in _prev */ if ((sbuts-mainb == BCONTEXT_WORLD) valid_world) { - sbuts-texture_context = SB_TEXC_WORLD; + sbuts-texture_context = sbuts-texture_context_prev = SB_TEXC_WORLD; } else if ((sbuts-mainb == BCONTEXT_MATERIAL) valid_material) { - sbuts-texture_context = SB_TEXC_MATERIAL; + sbuts-texture_context = sbuts-texture_context_prev = SB_TEXC_MATERIAL; } else if ((sbuts-mainb == BCONTEXT_DATA) valid_lamp) { - sbuts-texture_context = SB_TEXC_LAMP; + sbuts-texture_context = sbuts-texture_context_prev = SB_TEXC_LAMP; } else if ((sbuts-mainb == BCONTEXT_PARTICLE) valid_particles) { - sbuts-texture_context = SB_TEXC_PARTICLES; + sbuts-texture_context = sbuts-texture_context_prev = SB_TEXC_PARTICLES; } else if ((ELEM(sbuts-mainb, BCONTEXT_MODIFIER, BCONTEXT_PHYSICS)) valid_others) { - sbuts-texture_context = SB_TEXC_OTHER; + sbuts-texture_context = sbuts-texture_context_prev = SB_TEXC_OTHER; } + /* Else, try to revive a previous better ctxt... */ + else if ((sbuts-texture_context_prev != sbuts-texture_context) +(((sbuts-texture_context_prev == SB_TEXC_WORLD) valid_world) || + ((sbuts-texture_context_prev == SB_TEXC_MATERIAL) valid_material) || + ((sbuts-texture_context_prev == SB_TEXC_LAMP) valid_lamp) || + ((sbuts-texture_context_prev == SB_TEXC_PARTICLES) valid_particles) || + ((sbuts-texture_context_prev == SB_TEXC_OTHER) valid_others))) + { + sbuts-texture_context = sbuts-texture_context_prev; + } /* Else, just be sure that current context is valid! */ else if (((sbuts-texture_context == SB_TEXC_WORLD) !valid_world) || ((sbuts-texture_context == SB_TEXC_MATERIAL) !valid_material) || @@ -172,13 +183,9 @@ ((sbuts-texture_context == SB_TEXC_PARTICLES) !valid_particles) || ((sbuts-texture_context == SB_TEXC_OTHER) !valid_others)) { - if (valid_others) { - sbuts-texture_context = SB_TEXC_OTHER; - } - else if (valid_world) { - sbuts-texture_context = SB_TEXC_WORLD; - } - else if (valid_material) { + /* this is default fallback, do keep better ctxt in _prev */ + sbuts-texture_context_prev = sbuts-texture_context; + if (valid_material) { sbuts-texture_context =
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59378] trunk/blender/build_files/ build_environment/install_deps.sh: Fix [#36534] Errors in install_deps. sh script when running on Arch Linux
Revision: 59378 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59378 Author: mont29 Date: 2013-08-22 06:05:40 + (Thu, 22 Aug 2013) Log Message: --- Fix [#36534] Errors in install_deps.sh script when running on Arch Linux Patch provided by Darren Beck, thanks! Modified Paths: -- trunk/blender/build_files/build_environment/install_deps.sh Modified: trunk/blender/build_files/build_environment/install_deps.sh === --- trunk/blender/build_files/build_environment/install_deps.sh 2013-08-22 00:50:10 UTC (rev 59377) +++ trunk/blender/build_files/build_environment/install_deps.sh 2013-08-22 06:05:40 UTC (rev 59378) @@ -212,6 +212,7 @@ OPENEXR_FORCE_REBUILD=false OPENEXR_SKIP=false _with_built_openexr=false +_need_openexr_ldconfig=false OIIO_VERSION=1.1.10 OIIO_SOURCE=https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz; @@ -230,6 +231,7 @@ # OSL needs to be compiled for now! OSL_VERSION=1.3.2 +OSL_VERSION_MIN=$OSL_VERSION OSL_SOURCE=https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz; OSL_FORCE_REBUILD=false OSL_SKIP=false @@ -2776,7 +2778,7 @@ if [ $? -eq 0 ]; then install_packages_ARCH llvm clang have_llvm=true -LLVM_VERSION=`check_package_version_ge_ARCH llvm` +LLVM_VERSION=`check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN` LLVM_VERSION_FOUND=$LLVM_VERSION clean_LLVM else ___ 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 [59381] trunk/blender/release/datafiles/ prvicons.png: Had not been updated after last edit to prvicons.svg file ( r53004)...
Revision: 59381 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59381 Author: mont29 Date: 2013-08-22 13:48:22 + (Thu, 22 Aug 2013) Log Message: --- Had not been updated after last edit to prvicons.svg file (r53004)... Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=53004 Modified Paths: -- trunk/blender/release/datafiles/prvicons.png Modified: trunk/blender/release/datafiles/prvicons.png === (Binary files differ) ___ 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 [59382] trunk/blender: Automatically re-generate png icon files from svg ones (CMake only for now )...
Revision: 59382 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59382 Author: mont29 Date: 2013-08-22 13:51:00 + (Thu, 22 Aug 2013) Log Message: --- Automatically re-generate png icon files from svg ones (CMake only for now)... Expects Inkscape program. Modified Paths: -- trunk/blender/build_files/cmake/macros.cmake trunk/blender/source/blender/editors/datafiles/CMakeLists.txt Modified: trunk/blender/build_files/cmake/macros.cmake === --- trunk/blender/build_files/cmake/macros.cmake2013-08-22 13:48:22 UTC (rev 59381) +++ trunk/blender/build_files/cmake/macros.cmake2013-08-22 13:51:00 UTC (rev 59382) @@ -799,4 +799,35 @@ unset(_file_from) unset(_file_to) unset(_file_to_path) + endmacro() + +macro(svg_to_png + file_from + file_to + dpi + list_to_add) + + # remove ../'s + get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from} REALPATH) + get_filename_component(_file_to ${CMAKE_CURRENT_SOURCE_DIR}/${file_to} REALPATH) + + list(APPEND ${list_to_add} ${_file_to}) + + find_program(INKSCAPE_EXE inkscape) + mark_as_advanced(INKSCAPE_EXE) + + if(INKSCAPE_EXE) + add_custom_command( + OUTPUT ${_file_to} + COMMAND ${INKSCAPE_EXE} ${_file_from} --export-dpi=${dpi} --without-gui --export-png=${_file_to} + DEPENDS ${_file_from} ${INKSCAPE_EXE} + ) + else() + message(WARNING Inkscape not found, could not re-generate ${_file_to} from ${_file_from}!) + endif() + + unset(_file_from) + unset(_file_to) + +endmacro() \ No newline at end of file Modified: trunk/blender/source/blender/editors/datafiles/CMakeLists.txt === --- trunk/blender/source/blender/editors/datafiles/CMakeLists.txt 2013-08-22 13:48:22 UTC (rev 59381) +++ trunk/blender/source/blender/editors/datafiles/CMakeLists.txt 2013-08-22 13:51:00 UTC (rev 59382) @@ -47,8 +47,17 @@ # images data_to_c_simple(../../../../release/datafiles/splash.png SRC) + svg_to_png(../../../../release/datafiles/blender_icons.svg + ../../../../release/datafiles/blender_icons16.png + 90 SRC) data_to_c_simple(../../../../release/datafiles/blender_icons16.png SRC) + svg_to_png(../../../../release/datafiles/blender_icons.svg + ../../../../release/datafiles/blender_icons32.png + 180 SRC) data_to_c_simple(../../../../release/datafiles/blender_icons32.png SRC) + svg_to_png(../../../../release/datafiles/prvicons.svg + ../../../../release/datafiles/prvicons.png + 90 SRC) data_to_c_simple(../../../../release/datafiles/prvicons.png SRC) # brushes ___ 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 [59427] trunk/blender/source/blender/ editors/space_graph/graph_edit.c: Fix [#36538] Discontinuity (Euler) Filter - never ends - (deadlock?)
Revision: 59427 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59427 Author: mont29 Date: 2013-08-23 15:17:54 + (Fri, 23 Aug 2013) Log Message: --- Fix [#36538] Discontinuity (Euler) Filter - never ends - (deadlock?) Code could enter in an infinite loop when curve value was an odd multiple of PI (i.e. 180?\194?\176)... Current code was also factorized and got rid of fabs calls! ;) Modified Paths: -- trunk/blender/source/blender/editors/space_graph/graph_edit.c Modified: trunk/blender/source/blender/editors/space_graph/graph_edit.c === --- trunk/blender/source/blender/editors/space_graph/graph_edit.c 2013-08-23 14:51:20 UTC (rev 59426) +++ trunk/blender/source/blender/editors/space_graph/graph_edit.c 2013-08-23 15:17:54 UTC (rev 59427) @@ -1676,7 +1676,7 @@ /* FIXME: there are more complicated methods that will be needed to fix more cases than just some */ for (f = 0; f 3; f++) { FCurve *fcu = euf-fcurves[f]; - BezTriple *bezt, *prev = NULL; + BezTriple *bezt, *prev; unsigned int i; /* skip if not enough vets to do a decent analysis of... */ @@ -1684,30 +1684,20 @@ continue; /* prev follows bezt, bezt = current point to be fixed */ - for (i = 0, bezt = fcu-bezt; i fcu-totvert; i++, prev = bezt, bezt++) { - /* our method depends on determining a difference from the previous vert */ - if (prev == NULL) - continue; + /* our method depends on determining a difference from the previous vert */ + for (i = 1, prev = fcu-bezt, bezt = fcu-bezt + 1; i fcu-totvert; i++, prev = bezt++) { + const float sign = (prev-vec[1][1] bezt-vec[1][1]) ? 1.0f : -1.0f; /* 180 degree flip? */ - if (fabs(prev-vec[1][1] - bezt-vec[1][1]) = M_PI) { + if ((sign * (prev-vec[1][1] - bezt-vec[1][1])) = (float)M_PI) { /* 360 degrees to add/subtract frame value until difference is acceptably small that there's no more flip */ - const float fac = 2.0f * (float)M_PI; + const float fac = sign * 2.0f * (float)M_PI; - if (prev-vec[1][1] bezt-vec[1][1]) { - while (fabsf(bezt-vec[1][1] - prev-vec[1][1]) = (float)M_PI) { - bezt-vec[0][1] += fac; - bezt-vec[1][1] += fac; - bezt-vec[2][1] += fac; - } + while ((sign * (prev-vec[1][1] - bezt-vec[1][1])) = (float)M_PI) { + bezt-vec[0][1] += fac; + bezt-vec[1][1] += fac; + bezt-vec[2][1] += fac; } - else { /* if (prev-vec[1][1] bezt-vec[1][1]) */ - while (fabsf(bezt-vec[1][1] - prev-vec[1][1]) = (float)M_PI) { - bezt-vec[0][1] -= fac; - bezt-vec[1][1] -= fac; - bezt-vec[2][1] -= fac; - } - } } } } ___ 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 [59434] trunk/blender/source/blender/ editors/interface/interface_layout.c: UI layout: Fix the fact that children layouts were implicitely incondition
Revision: 59434 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59434 Author: mont29 Date: 2013-08-23 16:53:37 + (Fri, 23 Aug 2013) Log Message: --- UI layout: Fix the fact that children layouts were implicitely inconditionnaly aligned when the parent was. E.g.in col = layout.column(True) row = col.row(False) Items in row would be 'aligned' in the same group as those in col. Now to get this happening, you have to set row as aligned as well. Please note that fixes for py UI scripts will follow in another commit. Also fixed labels of RNA pointers searchboxes, which were missing the colon! Modified Paths: -- trunk/blender/source/blender/editors/interface/interface_layout.c Modified: trunk/blender/source/blender/editors/interface/interface_layout.c === --- trunk/blender/source/blender/editors/interface/interface_layout.c 2013-08-23 16:52:24 UTC (rev 59433) +++ trunk/blender/source/blender/editors/interface/interface_layout.c 2013-08-23 16:53:37 UTC (rev 59434) @@ -568,7 +568,7 @@ PropertySubType subtype; int labelw; - sub = uiLayoutRow(layout, FALSE); + sub = uiLayoutRow(layout, layout-align); uiBlockSetCurLayout(block, sub); if (name[0]) { @@ -1465,6 +1465,7 @@ uiBlock *block; StructRNA *icontype; int w, h; + char namestr[UI_MAX_NAME_STR]; /* validate arguments */ prop = RNA_struct_find_property(ptr, propname); @@ -1507,6 +1508,8 @@ if (!name) name = RNA_property_ui_name(prop); + name = ui_item_name_add_colon(name, namestr); + /* create button */ block = uiLayoutGetBlock(layout); @@ -2678,8 +2681,9 @@ BLI_remlink(litem-root-block-buttons, box-roundbox); BLI_addhead(litem-root-block-buttons, box-roundbox); } - else + else if (((uiLayout *)item)-align) { ui_item_align((uiLayout *)item, nr); + } } } ___ 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 [59442] trunk/blender: Followup to r59434 : py UI scripts edits.
Revision: 59442 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59442 Author: mont29 Date: 2013-08-23 20:41:21 + (Fri, 23 Aug 2013) Log Message: --- Followup to r59434 : py UI scripts edits. Notes: * Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it... * Also made some cleanup on the road! Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59434 Modified Paths: -- trunk/blender/intern/cycles/blender/addon/ui.py trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py trunk/blender/release/scripts/startup/bl_ui/properties_constraint.py trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py trunk/blender/release/scripts/startup/bl_ui/properties_data_bone.py trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py trunk/blender/release/scripts/startup/bl_ui/properties_data_modifier.py trunk/blender/release/scripts/startup/bl_ui/properties_freestyle.py trunk/blender/release/scripts/startup/bl_ui/properties_mask_common.py trunk/blender/release/scripts/startup/bl_ui/properties_material.py trunk/blender/release/scripts/startup/bl_ui/properties_object.py trunk/blender/release/scripts/startup/bl_ui/properties_particle.py trunk/blender/release/scripts/startup/bl_ui/properties_physics_common.py trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py trunk/blender/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py trunk/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py trunk/blender/release/scripts/startup/bl_ui/properties_render.py trunk/blender/release/scripts/startup/bl_ui/properties_texture.py trunk/blender/release/scripts/startup/bl_ui/space_clip.py trunk/blender/release/scripts/startup/bl_ui/space_image.py trunk/blender/release/scripts/startup/bl_ui/space_outliner.py trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py trunk/blender/release/scripts/startup/bl_ui/space_text.py trunk/blender/release/scripts/startup/bl_ui/space_time.py trunk/blender/release/scripts/startup/bl_ui/space_userpref.py trunk/blender/release/scripts/startup/bl_ui/space_view3d.py trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py Modified: trunk/blender/intern/cycles/blender/addon/ui.py === --- trunk/blender/intern/cycles/blender/addon/ui.py 2013-08-23 20:38:36 UTC (rev 59441) +++ trunk/blender/intern/cycles/blender/addon/ui.py 2013-08-23 20:41:21 UTC (rev 59442) @@ -252,8 +252,8 @@ col = split.column(align=True) col.label(text=Threads:) -col.row().prop(rd, threads_mode, expand=True) -sub = col.column() +col.row(align=True).prop(rd, threads_mode, expand=True) +sub = col.column(align=True) sub.enabled = rd.threads_mode == 'FIXED' sub.prop(rd, threads) @@ -266,7 +266,7 @@ sub.prop(cscene, use_progressive_refine) -subsub = sub.column() +subsub = sub.column(align=True) subsub.enabled = not rd.use_border subsub.prop(rd, use_save_buffers) Modified: trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py === --- trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py 2013-08-23 20:38:36 UTC (rev 59441) +++ trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py 2013-08-23 20:41:21 UTC (rev 59442) @@ -150,18 +150,19 @@ layout = self.layout col = layout.column(align=True) col.prop(self, 'view_align') + col = layout.column(align=True) - col.label(text=Location) col.prop(self, 'location', text=) + col = layout.column(align=True) - col.label(text=Rotation) col.prop(self, 'rotation', text=) col = layout.column(align=True) col.label(text=Major Segments) col.prop(self, 'major_segments', text=) + col = layout.column(align=True) col.label(text=Minor Segments) col.prop(self, 'minor_segments', text=) @@ -174,6 +175,7 @@ col = layout.column(align=True) col.label(text=Major Radius) col.prop(self, 'major_radius', text=) + col = layout.column(align=True) col.label(text=Minor Radius) col.prop(self, 'minor_radius', text=) @@ -181,6 +183,7 @@ col = layout.column(align=True) col.label(text=Exterior Radius) col.prop(self, 'abso_major_rad', text=) +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59443] trunk/blender/source/blender/ makesrna/intern/rna_ui_api.c: Code cleanup: use TRUE/FALSE instead of 1/ 0 for bool properties default values...
Revision: 59443 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59443 Author: mont29 Date: 2013-08-23 21:13:30 + (Fri, 23 Aug 2013) Log Message: --- Code cleanup: use TRUE/FALSE instead of 1/0 for bool properties default values... Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_ui_api.c Modified: trunk/blender/source/blender/makesrna/intern/rna_ui_api.c === --- trunk/blender/source/blender/makesrna/intern/rna_ui_api.c 2013-08-23 20:41:21 UTC (rev 59442) +++ trunk/blender/source/blender/makesrna/intern/rna_ui_api.c 2013-08-23 21:13:30 UTC (rev 59443) @@ -369,7 +369,7 @@ { RNA_def_string(func, text, , 0, , Override automatic text of the item); RNA_def_string(func, text_ctxt, , 0, , Override automatic translation context of the given text); - RNA_def_boolean(func, translate, true, , Translate the given text, when UI translation is enabled); + RNA_def_boolean(func, translate, TRUE, , Translate the given text, when UI translation is enabled); } static void api_ui_item_common(FunctionRNA *func) @@ -428,7 +428,7 @@ RNA_def_function_ui_description(func, Sub-layout. Items placed in this sublayout are placed next to each other in a row); - RNA_def_boolean(func, align, 0, , Align buttons to each other); + RNA_def_boolean(func, align, FALSE, , Align buttons to each other); func = RNA_def_function(srna, column, uiLayoutColumn); parm = RNA_def_pointer(func, layout, UILayout, , Sub-layout to put items in); @@ -436,13 +436,13 @@ RNA_def_function_ui_description(func, Sub-layout. Items placed in this sublayout are placed under each other in a column); - RNA_def_boolean(func, align, 0, , Align buttons to each other); + RNA_def_boolean(func, align, FALSE, , Align buttons to each other); func = RNA_def_function(srna, column_flow, uiLayoutColumnFlow); RNA_def_int(func, columns, 0, 0, INT_MAX, , Number of columns, 0 is automatic, 0, INT_MAX); parm = RNA_def_pointer(func, layout, UILayout, , Sub-layout to put items in); RNA_def_function_return(func, parm); - RNA_def_boolean(func, align, 0, , Align buttons to each other); + RNA_def_boolean(func, align, FALSE, , Align buttons to each other); /* box layout */ func = RNA_def_function(srna, box, uiLayoutBox); @@ -456,7 +456,7 @@ parm = RNA_def_pointer(func, layout, UILayout, , Sub-layout to put items in); RNA_def_function_return(func, parm); RNA_def_float(func, percentage, 0.0f, 0.0f, 1.0f, Percentage, Percentage of width to split at, 0.0f, 1.0f); - RNA_def_boolean(func, align, 0, , Align buttons to each other); + RNA_def_boolean(func, align, FALSE, , Align buttons to each other); /* Icon of a rna pointer */ func = RNA_def_function(srna, icon, rna_ui_get_rnaptr_icon); @@ -501,13 +501,13 @@ RNA_def_function_ui_description(func, Item. Exposes an RNA item and places it into the layout); api_ui_item_rna_common(func); api_ui_item_common(func); - RNA_def_boolean(func, expand, 0, , Expand button to show more detail); - RNA_def_boolean(func, slider, 0, , Use slider widget for numeric values); - RNA_def_boolean(func, toggle, 0, , Use toggle widget for boolean values); - RNA_def_boolean(func, icon_only, 0, , Draw only icons in buttons, no text); - RNA_def_boolean(func, event, 0, , Use button to input key events); - RNA_def_boolean(func, full_event, 0, , Use button to input full events including modifiers); - RNA_def_boolean(func, emboss, 1, , Draw the button itself, just the icon/text); + RNA_def_boolean(func, expand, FALSE, , Expand button to show more detail); + RNA_def_boolean(func, slider, FALSE, , Use slider widget for numeric values); + RNA_def_boolean(func, toggle, FALSE, , Use toggle widget for boolean values); + RNA_def_boolean(func, icon_only, FALSE, , Draw only icons in buttons, no text); + RNA_def_boolean(func, event, FALSE, , Use button to input key events); + RNA_def_boolean(func, full_event, FALSE, , Use button to input full events including modifiers); + RNA_def_boolean(func, emboss, TRUE, , Draw the button itself, just the icon/text); RNA_def_int(func, index, -1, -2, INT_MAX, , The index of this button, when set a single member of an array can be accessed, when set to -1 all array members are used, -2, INT_MAX); /* RNA_NO_INDEX == -1 */ @@ -535,7 +535,7 @@ func = RNA_def_function(srna, operator, rna_uiItemO); api_ui_item_op_common(func); -
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59444] trunk/blender/source/blender/ editors/gpencil/gpencil_edit.c: Related to [#36548] Grease Pencil Problems
Revision: 59444 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59444 Author: mont29 Date: 2013-08-23 21:26:59 + (Fri, 23 Aug 2013) Log Message: --- Related to [#36548] Grease Pencil Problems Use scene's GPencil when active object is deselected. Else it can be tricky and not user-friendly to access to the scene's GPencil once some objects have GPencil data (you have to select/active a non-gpencil object, or switch to a layout without active object...). Modified Paths: -- trunk/blender/source/blender/editors/gpencil/gpencil_edit.c Modified: trunk/blender/source/blender/editors/gpencil/gpencil_edit.c === --- trunk/blender/source/blender/editors/gpencil/gpencil_edit.c 2013-08-23 21:13:30 UTC (rev 59443) +++ trunk/blender/source/blender/editors/gpencil/gpencil_edit.c 2013-08-23 21:26:59 UTC (rev 59444) @@ -106,8 +106,8 @@ /* TODO: we can include other data-types such as bones later if need be... */ - /* just in case no active object */ - if (ob) { + /* just in case no active/selected object */ + if (ob (ob-flag SELECT)) { /* for now, as long as there's an object, default to using that in 3D-View */ if (ptr) RNA_id_pointer_create(ob-id, ptr); return ob-gpd; @@ -193,14 +193,12 @@ bGPdata *gpencil_data_get_active_v3d(Scene *scene) { Base *base = scene-basact; - bGPdata *gpd = base ? base-object-gpd : NULL; - if (base gpd) { - /* We have to make sure active object is actually visible, else we must use default scene gpd, -* to be consistent with gpencil_data_get_active's behavior. -*/ - if ((scene-lay base-lay) == 0) { - gpd = NULL; - } + bGPdata *gpd = NULL; + /* We have to make sure active object is actually visible and selected, else we must use default scene gpd, +* to be consistent with gpencil_data_get_active's behavior. +*/ + if (base (scene-lay base-lay) (base-object-flag SELECT)) { + gpd = base-object-gpd; } return gpd ? gpd : scene-gpd; } ___ 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 [59445] trunk/blender/release/datafiles/ startup.blend: Fix [#36551] Camera has wrong rotation in default scene :P
Revision: 59445 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59445 Author: mont29 Date: 2013-08-23 21:37:39 + (Fri, 23 Aug 2013) Log Message: --- Fix [#36551] Camera has wrong rotation in default scene :P Modified Paths: -- trunk/blender/release/datafiles/startup.blend Modified: trunk/blender/release/datafiles/startup.blend === (Binary files differ) ___ 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 [59454] trunk/blender/source/blender/ editors/interface/view2d_ops.c: Fix [#36330] Clicking Scrolled Object Properties Tab Brings Up Wrong One
Revision: 59454 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59454 Author: mont29 Date: 2013-08-24 08:46:48 + (Sat, 24 Aug 2013) Log Message: --- Fix [#36330] Clicking Scrolled Object Properties Tab Brings Up Wrong One Actually, happened in any view2D... Just added a call to WM_event_add_mousemove() in view_pan_apply, so that overed/active button is refreshed in this case. Modified Paths: -- trunk/blender/source/blender/editors/interface/view2d_ops.c Modified: trunk/blender/source/blender/editors/interface/view2d_ops.c === --- trunk/blender/source/blender/editors/interface/view2d_ops.c 2013-08-24 05:22:13 UTC (rev 59453) +++ trunk/blender/source/blender/editors/interface/view2d_ops.c 2013-08-24 08:46:48 UTC (rev 59454) @@ -128,7 +128,7 @@ } /* apply transform to view (i.e. adjust 'cur' rect) */ -static void view_pan_apply(wmOperator *op) +static void view_pan_apply(bContext *C, wmOperator *op) { v2dViewPanData *vpd = op-customdata; View2D *v2d = vpd-v2d; @@ -153,6 +153,7 @@ /* request updates to be done... */ ED_region_tag_redraw(vpd-ar); + WM_event_add_mousemove(C); UI_view2d_sync(vpd-sc, vpd-sa, v2d, V2D_LOCK_COPY); @@ -181,7 +182,7 @@ if (!view_pan_init(C, op)) return OPERATOR_CANCELLED; - view_pan_apply(op); + view_pan_apply(C, op); view_pan_exit(op); return OPERATOR_FINISHED; } @@ -209,7 +210,7 @@ RNA_int_set(op-ptr, deltax, event-prevx - event-x); RNA_int_set(op-ptr, deltay, event-prevy - event-y); - view_pan_apply(op); + view_pan_apply(C, op); view_pan_exit(op); return OPERATOR_FINISHED; } @@ -246,7 +247,7 @@ vpd-lastx = event-x; vpd-lasty = event-y; - view_pan_apply(op); + view_pan_apply(C, op); break; } /* XXX - Mode switching isn't implemented. See comments in 36818. @@ -333,7 +334,7 @@ RNA_int_set(op-ptr, deltay, 0); /* apply movement, then we're done */ - view_pan_apply(op); + view_pan_apply(C, op); view_pan_exit(op); return OPERATOR_FINISHED; @@ -377,7 +378,7 @@ RNA_int_set(op-ptr, deltay, 0); /* apply movement, then we're done */ - view_pan_apply(op); + view_pan_apply(C, op); view_pan_exit(op); return OPERATOR_FINISHED; @@ -425,7 +426,7 @@ } /* apply movement, then we're done */ - view_pan_apply(op); + view_pan_apply(C, op); view_pan_exit(op); return OPERATOR_FINISHED; @@ -475,7 +476,7 @@ } /* apply movement, then we're done */ - view_pan_apply(op); + view_pan_apply(C, op); view_pan_exit(op); return OPERATOR_FINISHED; ___ 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 [59466] trunk/blender/release/datafiles/ prvicons.svg: Adding a darker blender icon for save blends (.blend1, . blend2, etc.), as requested by elubi
Revision: 59466 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59466 Author: mont29 Date: 2013-08-24 13:28:18 + (Sat, 24 Aug 2013) Log Message: --- Adding a darker blender icon for save blends (.blend1, .blend2, etc.), as requested by elubie. Modified Paths: -- trunk/blender/release/datafiles/prvicons.svg Modified: trunk/blender/release/datafiles/prvicons.svg === --- trunk/blender/release/datafiles/prvicons.svg2013-08-24 13:13:29 UTC (rev 59465) +++ trunk/blender/release/datafiles/prvicons.svg2013-08-24 13:28:18 UTC (rev 59466) @@ -14,7 +14,7 @@ height=192 id=svg2 sodipodi:version=0.32 - inkscape:version=0.48.3.1 r9886 + inkscape:version=0.48.4 r9939 version=1.0 sodipodi:docname=prvicons.svg inkscape:output_extension=org.inkscape.output.svg.inkscape @@ -22,6 +22,64 @@ inkscape:export-filename=blender_icons.png inkscape:export-xdpi=90 inkscape:export-ydpi=90 + sodipodi:namedview + id=base + pagecolor=#ff + bordercolor=#66 + borderopacity=1.0 + gridtolerance=1 + guidetolerance=1 + objecttolerance=1 + inkscape:pageopacity=0.0 + inkscape:pageshadow=2 + inkscape:zoom=2.8284271 + inkscape:cx=89.343502 + inkscape:cy=57.232509 + inkscape:document-units=px + inkscape:current-layer=g45475-4 + showgrid=false + inkscape:window-width=1366 + inkscape:window-height=695 + inkscape:window-x=0 + inkscape:window-y=24 + inkscape:snap-nodes=true + inkscape:snap-bbox=false + showguides=true + inkscape:guide-bbox=true + inkscape:object-nodes=false + inkscape:object-paths=false + inkscape:snap-intersection-line-segments=true + inkscape:snap-intersection-grid-guide=false + inkscape:window-maximized=1 + inkscape:bbox-paths=false + inkscape:snap-global=true + inkscape:snap-bbox-midpoints=false + inkscape:snap-grids=true + inkscape:snap-to-guides=false + inkscape:snap-page=false + units=px + inkscape:snap-center=false + fit-margin-top=0 + fit-margin-left=0 + fit-margin-right=0 + fit-margin-bottom=0 +inkscape:grid + originy=0px + originx=0px + snapvisiblegridlinesonly=true + empopacity=0.25098039 + empcolor=#7f7f7f + dotted=false + opacity=0.09803922 + color=#808080 + empspacing=4 + spacingy=0.25px + spacingx=0.25px + enabled=true + visible=true + id=grid17394 + type=xygrid / + /sodipodi:namedview title id=title49470Blender icons v. 2.5.06/title defs @@ -29,17478 +87,17675 @@ linearGradient id=linearGradient30958 stop - id=stop30960 + style=stop-color:#fff9cf;stop-opacity:1; offset=0 - style=stop-color:#fff9cf;stop-opacity:1; / + id=stop30960 / stop - id=stop30962 + style=stop-color:#c7bc52;stop-opacity:1; offset=1 - style=stop-color:#c7bc52;stop-opacity:1; / + id=stop30962 / /linearGradient linearGradient - inkscape:collect=always - id=linearGradient29312 + id=linearGradient29312 + inkscape:collect=always stop - style=stop-color:#ff;stop-opacity:1; + id=stop29314 offset=0 - id=stop29314 / + style=stop-color:#ff;stop-opacity:1; / stop - style=stop-color:#ff;stop-opacity:0; + id=stop29316 offset=1 - id=stop29316 / + style=stop-color:#ff;stop-opacity:0; / /linearGradient linearGradient id=linearGradient29304 stop - style=stop-color:#11233f;stop-opacity:1; + id=stop29306 offset=0 - id=stop29306 / + style=stop-color:#11233f;stop-opacity:1; / stop - style=stop-color:#162d50;stop-opacity:0; + id=stop29308 offset=1 - id=stop29308 / + style=stop-color:#162d50;stop-opacity:0; / /linearGradient linearGradient - inkscape:collect=always - id=linearGradient27896 + id=linearGradient27896 + inkscape:collect=always stop - style=stop-color:#ff;stop-opacity:1; + id=stop27898 offset=0 - id=stop27898 / + style=stop-color:#ff;stop-opacity:1; / stop - style=stop-color:#ff;stop-opacity:0; + id=stop27900 offset=1 - id=stop27900 / + style=stop-color:#ff;stop-opacity:0; / /linearGradient linearGradient - inkscape:collect=always - id=linearGradient27854 + id=linearGradient27854 + inkscape:collect=always stop - style=stop-color:#ff;stop-opacity:1; + id=stop27856 offset=0 - id=stop27856 / +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59500] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: Fix [#36289] Not change children object on freez layer when change frame.
Revision: 59500 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59500 Author: mont29 Date: 2013-08-25 18:45:04 + (Sun, 25 Aug 2013) Log Message: --- Fix [#36289] Not change children object on freez layer when change frame. When hiding the layer of an object, switching to a different fram, and showing again that layer, things like object's parenting were not handled... Just set do_time option of DAG_on_visible_update() to True when updating layers. Note: maybe we could re-enable layers animation... not sure though ;) Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_scene.c Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c === --- trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-25 16:29:10 UTC (rev 59499) +++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-25 18:45:04 UTC (rev 59500) @@ -487,7 +487,8 @@ static void rna_Scene_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) { rna_Scene_view3d_update(bmain, scene, ptr); - DAG_on_visible_update(bmain, FALSE); + /* We need do_time here, else we can have update issues like [#36289]... */ + DAG_on_visible_update(bmain, true); } static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(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 [59516] trunk/blender: Remove (comment out ) auto-generating png form svg (r59382) in CMake, handy but gives nasty false changes in svn.
Revision: 59516 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59516 Author: mont29 Date: 2013-08-26 12:16:23 + (Mon, 26 Aug 2013) Log Message: --- Remove (comment out) auto-generating png form svg (r59382) in CMake, handy but gives nasty false changes in svn. Let's try not to forget to update PNGs when needed, then! Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59382 Modified Paths: -- trunk/blender/build_files/cmake/macros.cmake trunk/blender/source/blender/editors/datafiles/CMakeLists.txt Modified: trunk/blender/build_files/cmake/macros.cmake === --- trunk/blender/build_files/cmake/macros.cmake2013-08-26 12:09:13 UTC (rev 59515) +++ trunk/blender/build_files/cmake/macros.cmake2013-08-26 12:16:23 UTC (rev 59516) @@ -802,6 +802,7 @@ endmacro() +# XXX Not used for now... macro(svg_to_png file_from file_to Modified: trunk/blender/source/blender/editors/datafiles/CMakeLists.txt === --- trunk/blender/source/blender/editors/datafiles/CMakeLists.txt 2013-08-26 12:09:13 UTC (rev 59515) +++ trunk/blender/source/blender/editors/datafiles/CMakeLists.txt 2013-08-26 12:16:23 UTC (rev 59516) @@ -47,17 +47,18 @@ # images data_to_c_simple(../../../../release/datafiles/splash.png SRC) - svg_to_png(../../../../release/datafiles/blender_icons.svg - ../../../../release/datafiles/blender_icons16.png - 90 SRC) + # XXX These are handy, but give nasty false changes in svn :/ + #svg_to_png(../../../../release/datafiles/blender_icons.svg + #../../../../release/datafiles/blender_icons16.png + #90 SRC) data_to_c_simple(../../../../release/datafiles/blender_icons16.png SRC) - svg_to_png(../../../../release/datafiles/blender_icons.svg - ../../../../release/datafiles/blender_icons32.png - 180 SRC) + #svg_to_png(../../../../release/datafiles/blender_icons.svg + #../../../../release/datafiles/blender_icons32.png + #180 SRC) data_to_c_simple(../../../../release/datafiles/blender_icons32.png SRC) - svg_to_png(../../../../release/datafiles/prvicons.svg - ../../../../release/datafiles/prvicons.png - 90 SRC) + #svg_to_png(../../../../release/datafiles/prvicons.svg + #../../../../release/datafiles/prvicons.png + #90 SRC) data_to_c_simple(../../../../release/datafiles/prvicons.png SRC) # brushes ___ 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 [59517] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: Revert r59500, has too much drawbakcs in term of speed...
Revision: 59517 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59517 Author: mont29 Date: 2013-08-26 12:22:15 + (Mon, 26 Aug 2013) Log Message: --- Revert r59500, has too much drawbakcs in term of speed... This bug ([#36289]) is not really solvable for now, will mark it as todo. :/ Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59500 Modified Paths: -- trunk/blender/source/blender/makesrna/intern/rna_scene.c Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c === --- trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-26 12:16:23 UTC (rev 59516) +++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-08-26 12:22:15 UTC (rev 59517) @@ -487,8 +487,11 @@ static void rna_Scene_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) { rna_Scene_view3d_update(bmain, scene, ptr); - /* We need do_time here, else we can have update issues like [#36289]... */ - DAG_on_visible_update(bmain, true); + /* XXX We would need do_time=true here, else we can have update issues like [#36289]... +* However, this has too much drawbacks (like slower layer switch, undesired updates...). +* That's TODO for future DAG updates. +*/ + DAG_on_visible_update(bmain, false); } static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(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 [59518] trunk/blender/source/blender/ editors/interface/interface_widgets.c: Fix uiList labels themed colors.
Revision: 59518 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59518 Author: mont29 Date: 2013-08-26 12:32:46 + (Mon, 26 Aug 2013) Log Message: --- Fix uiList labels themed colors. r57760 broke usual labels, and r59511 broke again uiList labels! :P Hopefully every one works as expected now! Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=57760 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59511 Modified Paths: -- trunk/blender/source/blender/editors/interface/interface_widgets.c Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c === --- trunk/blender/source/blender/editors/interface/interface_widgets.c 2013-08-26 12:22:15 UTC (rev 59517) +++ trunk/blender/source/blender/editors/interface/interface_widgets.c 2013-08-26 12:32:46 UTC (rev 59518) @@ -2980,7 +2980,9 @@ case UI_WTYPE_LISTLABEL: wt.wcol_theme = btheme-tui.wcol_list_item; - /* fall-through */ /* we use usual label code too. */ + wt.draw = NULL; + /* Can't use usual label code. */ + break; case UI_WTYPE_LABEL: wt.draw = NULL; wt.state = widget_state_label; ___ 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 [59521] trunk/blender/source/blender/ makesdna/DNA_object_types.h: Cleanup ( bitflags are *so much* easy to handle and clear as bit-shift operations t
Revision: 59521 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59521 Author: mont29 Date: 2013-08-26 13:50:25 + (Mon, 26 Aug 2013) Log Message: --- Cleanup (bitflags are *so much* easy to handle and clear as bit-shift operations than raw values!). Modified Paths: -- trunk/blender/source/blender/makesdna/DNA_object_types.h Modified: trunk/blender/source/blender/makesdna/DNA_object_types.h === --- trunk/blender/source/blender/makesdna/DNA_object_types.h2013-08-26 13:41:13 UTC (rev 59520) +++ trunk/blender/source/blender/makesdna/DNA_object_types.h2013-08-26 13:50:25 UTC (rev 59521) @@ -41,7 +41,7 @@ #ifdef __cplusplus extern C { #endif - + struct Object; struct AnimData; struct Ipo; @@ -323,26 +323,26 @@ /* OBJECT * */ /* used many places... should be specialized */ -#define SELECT 1 +#define SELECT 1 /* type */ -#define OB_EMPTY 0 -#define OB_MESH1 -#define OB_CURVE 2 -#define OB_SURF3 -#define OB_FONT4 -#define OB_MBALL 5 +#define OB_EMPTY0 +#define OB_MESH 1 +#define OB_CURVE2 +#define OB_SURF 3 +#define OB_FONT 4 +#define OB_MBALL5 -#define OB_LAMP10 -#define OB_CAMERA 11 +#define OB_LAMP 10 +#define OB_CAMERA 11 -#define OB_SPEAKER 12 +#define OB_SPEAKER 12 -// #define OB_WAVE 21 -#define OB_LATTICE 22 +/* #define OB_WAVE 21 */ +#define OB_LATTICE 22 /* 23 and 24 are for life and sector (old file compat.) */ -#defineOB_ARMATURE 25 +#defineOB_ARMATURE 25 /* check if the object type supports materials */ #define OB_TYPE_SUPPORT_MATERIAL(_type) \ @@ -360,86 +360,87 @@ ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR /* partype: first 4 bits: type */ -#define PARTYPE15 -#define PAROBJECT 0 -#define PARCURVE 1 -#define PARKEY 2 +#define PARTYPE ((1 4) - 1) +#define PAROBJECT 0 +#define PARCURVE1 +#define PARKEY 2 -#define PARSKEL4 -#define PARVERT1 5 -#define PARVERT3 6 -#define PARBONE7 +#define PARSKEL 4 +#define PARVERT15 +#define PARVERT36 +#define PARBONE 7 - /* slow parenting - is not threadsafe and/or may give errors after jumping */ -#define PARSLOW16 +/* slow parenting - is not threadsafe and/or may give errors after jumping */ +#define PARSLOW 16 /* (short) transflag */ /* flags 1 and 2 were unused or relics from past features */ -#define OB_NEG_SCALE 4 -#define OB_DUPLI (8+16+256+512+2048) -#define OB_DUPLIFRAMES 8 -#define OB_DUPLIVERTS 16 -#define OB_DUPLIROT32 -#define OB_DUPLINOSPEED64 -/*#define OB_POWERTRACK128*/ /*UNUSED*/ -#define OB_DUPLIGROUP 256 -#define OB_DUPLIFACES 512 -#define OB_DUPLIFACES_SCALE1024 -#define OB_DUPLIPARTS 2048 -#define OB_RENDER_DUPLI4096 -#define OB_NO_CONSTRAINTS 8192 /* runtime constraints disable */ -#define OB_NO_PSYS_UPDATE 16384 /* hack to work around particle issue */ +#define OB_NEG_SCALE(1 2) +#define OB_DUPLIFRAMES (1 3) +#define OB_DUPLIVERTS (1 4) +#define OB_DUPLIROT (1 5) +#define OB_DUPLINOSPEED (1 6) +/*#define OB_POWERTRACK (1 7)*/ /*UNUSED*/ +#define OB_DUPLIGROUP (1 8) +#define OB_DUPLIFACES (1 9) +#define OB_DUPLIFACES_SCALE (1 10) +#define OB_DUPLIPARTS (1 11) +#define OB_RENDER_DUPLI (1 12) +#define OB_NO_CONSTRAINTS (1 13) /* runtime constraints disable */ +#define OB_NO_PSYS_UPDATE (1 14) /* hack to work around particle issue */ +#define OB_DUPLI(OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLIGROUP | OB_DUPLIFACES | OB_DUPLIPARTS) + /* (short) ipoflag */ /* XXX: many old flags for features removed due to incompatibility * with new system and/or other design issues were here */ /* for stride/path editing (XXX: NEEDS REVIEW) */ -#define OB_DISABLE_PATH1024 +#define OB_DISABLE_PATH (1 10) /* (short) trackflag / upflag */ -#define OB_POSX0 -#define OB_POSY1 -#define OB_POSZ2 -#define OB_NEGX3 -#define OB_NEGY4 -#define OB_NEGZ5 +#define OB_POSX0 +#define OB_POSY1
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59523] trunk/blender/source/blender/ makesdna/DNA_object_types.h: Cleanup: move defines into anon enums, as suggested by Joshua, thx.
Revision: 59523 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59523 Author: mont29 Date: 2013-08-26 14:30:00 + (Mon, 26 Aug 2013) Log Message: --- Cleanup: move defines into anon enums, as suggested by Joshua, thx. Note I let a few as defines for now (esp. base options are not clear to me, how they should be aranged in groups). Modified Paths: -- trunk/blender/source/blender/makesdna/DNA_object_types.h Modified: trunk/blender/source/blender/makesdna/DNA_object_types.h === --- trunk/blender/source/blender/makesdna/DNA_object_types.h2013-08-26 14:13:04 UTC (rev 59522) +++ trunk/blender/source/blender/makesdna/DNA_object_types.h2013-08-26 14:30:00 UTC (rev 59523) @@ -326,23 +326,25 @@ #define SELECT 1 /* type */ -#define OB_EMPTY0 -#define OB_MESH 1 -#define OB_CURVE2 -#define OB_SURF 3 -#define OB_FONT 4 -#define OB_MBALL5 +enum { + OB_EMPTY = 0, + OB_MESH = 1, + OB_CURVE = 2, + OB_SURF = 3, + OB_FONT = 4, + OB_MBALL = 5, -#define OB_LAMP 10 -#define OB_CAMERA 11 + OB_LAMP = 10, + OB_CAMERA = 11, -#define OB_SPEAKER 12 + OB_SPEAKER= 12, -/* #define OB_WAVE 21 */ -#define OB_LATTICE 22 +/* OB_WAVE = 21, */ + OB_LATTICE= 22, /* 23 and 24 are for life and sector (old file compat.) */ -#defineOB_ARMATURE 25 + OB_ARMATURE = 25, +}; /* check if the object type supports materials */ #define OB_TYPE_SUPPORT_MATERIAL(_type) \ @@ -360,36 +362,40 @@ ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR /* partype: first 4 bits: type */ -#define PARTYPE ((1 4) - 1) -#define PAROBJECT 0 -#define PARCURVE1 -#define PARKEY 2 +enum { + PARTYPE = (1 4) - 1, + PAROBJECT = 0, + PARCURVE = 1, + PARKEY= 2, -#define PARSKEL 4 -#define PARVERT15 -#define PARVERT36 -#define PARBONE 7 + PARSKEL = 4, + PARVERT1 = 5, + PARVERT3 = 6, + PARBONE = 7, -/* slow parenting - is not threadsafe and/or may give errors after jumping */ -#define PARSLOW 16 + /* slow parenting - is not threadsafe and/or may give errors after jumping */ + PARSLOW = 16, +}; /* (short) transflag */ /* flags 1 and 2 were unused or relics from past features */ -#define OB_NEG_SCALE(1 2) -#define OB_DUPLIFRAMES (1 3) -#define OB_DUPLIVERTS (1 4) -#define OB_DUPLIROT (1 5) -#define OB_DUPLINOSPEED (1 6) -/*#define OB_POWERTRACK (1 7)*/ /*UNUSED*/ -#define OB_DUPLIGROUP (1 8) -#define OB_DUPLIFACES (1 9) -#define OB_DUPLIFACES_SCALE (1 10) -#define OB_DUPLIPARTS (1 11) -#define OB_RENDER_DUPLI (1 12) -#define OB_NO_CONSTRAINTS (1 13) /* runtime constraints disable */ -#define OB_NO_PSYS_UPDATE (1 14) /* hack to work around particle issue */ +enum { + OB_NEG_SCALE= 1 2, + OB_DUPLIFRAMES = 1 3, + OB_DUPLIVERTS = 1 4, + OB_DUPLIROT = 1 5, + OB_DUPLINOSPEED = 1 6, +/* OB_POWERTRACK = 1 7,*/ /*UNUSED*/ + OB_DUPLIGROUP = 1 8, + OB_DUPLIFACES = 1 9, + OB_DUPLIFACES_SCALE = 1 10, + OB_DUPLIPARTS = 1 11, + OB_RENDER_DUPLI = 1 12, + OB_NO_CONSTRAINTS = 1 13, /* runtime constraints disable */ + OB_NO_PSYS_UPDATE = 1 14, /* hack to work around particle issue */ -#define OB_DUPLI(OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLIGROUP | OB_DUPLIFACES | OB_DUPLIPARTS) + OB_DUPLI= OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLIGROUP | OB_DUPLIFACES | OB_DUPLIPARTS, +}; /* (short) ipoflag */ /* XXX: many old flags for features removed due to incompatibility @@ -399,58 +405,68 @@ #define OB_DISABLE_PATH (1 10) /* (short) trackflag / upflag */ -#define OB_POSX0 -#define OB_POSY1 -#define OB_POSZ2 -#define OB_NEGX3 -#define OB_NEGY4 -#define OB_NEGZ5 +enum { + OB_POSX = 0, + OB_POSY = 1, + OB_POSZ = 2, + OB_NEGX = 3, + OB_NEGY = 4, + OB_NEGZ = 5, +}; /* gameflag in game.h */ /* dt: no flags */ -#define OB_BOUNDBOX1 -#define OB_WIRE2 -#define OB_SOLID 3 -#define OB_MATERIAL4 -#define OB_TEXTURE 5 -#define OB_RENDER 6 +enum { + OB_BOUNDBOX = 1, + OB_WIRE = 2, + OB_SOLID = 3, + OB_MATERIAL = 4, + OB_TEXTURE = 5, + OB_RENDER= 6, -#define OB_PAINT 100 /* temporary used in draw code */ + OB_PAINT = 100, /* temporary used in draw code
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59530] trunk/blender/source/blender/ editors/object/object_edit.c: Fix [#36308] Custom hotkey Set Object Mode - Object Mode doesn't work properly
Revision: 59530 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59530 Author: mont29 Date: 2013-08-26 15:43:34 + (Mon, 26 Aug 2013) Log Message: --- Fix [#36308] Custom hotkey Set Object Mode - Object Mode doesn't work properly There was actually two different issues: * mode and toggle options had remanant values, when e.g. you used MODE_EDIT/toggle, these would be used again with the newly defined keymap (which sets eg MODE_OBJECT/notoggle)... Defining those props as PROP_SKIP_SAVE fixed this. * Toggling was not supported for MODE_OBJECT, fixed this (can indeed be handy to have a shortcut to toggle between current mode and Object one ;) ). Modified Paths: -- trunk/blender/source/blender/editors/object/object_edit.c Modified: trunk/blender/source/blender/editors/object/object_edit.c === --- trunk/blender/source/blender/editors/object/object_edit.c 2013-08-26 15:10:22 UTC (rev 59529) +++ trunk/blender/source/blender/editors/object/object_edit.c 2013-08-26 15:43:34 UTC (rev 59530) @@ -1501,19 +1501,21 @@ } /* checks the mode to be set is compatible with the object - * should be made into a generic function */ -static bool object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob) + * should be made into a generic function + */ +static bool object_mode_set_compat(Object *ob, ObjectMode mode) { - ObjectMode mode = RNA_enum_get(op-ptr, mode); - if (ob) { if (mode == OB_MODE_OBJECT) return true; switch (ob-type) { case OB_MESH: - if (mode (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT)) + if (mode (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | + OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT)) + { return true; + } break; case OB_CURVE: case OB_SURF: @@ -1543,26 +1545,31 @@ ObjectMode restore_mode = (ob) ? ob-mode : OB_MODE_OBJECT; int toggle = RNA_boolean_get(op-ptr, toggle); - if (!ob || !object_mode_set_compat(C, op, ob)) + if (!ob || !object_mode_set_compat(ob, mode)) return OPERATOR_PASS_THROUGH; /* Exit current mode if it's not the mode we're setting */ - if (ob-mode != OB_MODE_OBJECT ob-mode != mode) + if (ob-mode != OB_MODE_OBJECT ob-mode != mode) { WM_operator_name_call(C, object_mode_op_string(ob-mode), WM_OP_EXEC_REGION_WIN, NULL); + } - if (mode != OB_MODE_OBJECT) { + if (mode != OB_MODE_OBJECT (ob-mode != mode || toggle)) { /* Enter new mode */ - if (ob-mode != mode || toggle) - WM_operator_name_call(C, object_mode_op_string(mode), WM_OP_EXEC_REGION_WIN, NULL); + WM_operator_name_call(C, object_mode_op_string(mode), WM_OP_EXEC_REGION_WIN, NULL); + } - if (toggle) { - if (ob-mode == mode) - /* For toggling, store old mode so we know what to go back to */ - ob-restore_mode = restore_mode; - else if (ob-restore_mode != OB_MODE_OBJECT ob-restore_mode != mode) { - WM_operator_name_call(C, object_mode_op_string(ob-restore_mode), WM_OP_EXEC_REGION_WIN, NULL); - } + if (toggle) { + /* Special case for Object mode! */ + if (mode == OB_MODE_OBJECT restore_mode == OB_MODE_OBJECT ob-restore_mode != OB_MODE_OBJECT) { + WM_operator_name_call(C, object_mode_op_string(ob-restore_mode), WM_OP_EXEC_REGION_WIN, NULL); } + else if (ob-mode == mode) { + /* For toggling, store old mode so we know what to go back to */ + ob-restore_mode = restore_mode; + } + else if (ob-restore_mode != OB_MODE_OBJECT ob-restore_mode != mode) { + WM_operator_name_call(C, object_mode_op_string(ob-restore_mode), WM_OP_EXEC_REGION_WIN, NULL); + } } return OPERATOR_FINISHED; @@ -1570,6 +1577,8 @@ void OBJECT_OT_mode_set(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot-name = Set Object Mode; ot-description = Sets the object interaction mode; @@ -1585,14 +1594,20 @@ ot-prop = RNA_def_enum(ot-srna, mode, object_mode_items, OB_MODE_OBJECT, Mode, );
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59531] trunk/blender/source/blender/ makesrna: RNA fixes regarding dynamic array properties in functions parameters ( reviewed by Brecht, thanks!):
Revision: 59531 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59531 Author: mont29 Date: 2013-08-26 16:08:03 + (Mon, 26 Aug 2013) Log Message: --- RNA fixes regarding dynamic array properties in functions parameters (reviewed by Brecht, thanks!): * It was not clear that RNA_parameter_length_get() co only affected dynamic properties, renamed them to RNA_parameter_dynamic_length_get() and such. * Fixed RNA_function_find_parameter(), we can't use BLI_findstring() here, need to call RNA_property_identifier()! * Fixed RNA_parameter_get() and RNA_parameter_set(), which were completely wrong for dynamic properties. * Fixed RNA_parameter_dynamic_length_get/set_data(), they did not check the property was actually a dynamic one and were using again ugly blackmagic casting intead of ParameterDynAlloc structure! * makesrna was still using an ugly hackish (and perhaps not always working) code when handling dynamic parameters, now synchronized with RNA_parameter_dynamic_length_get_data and RNA_parameter_get code. Modified Paths: -- trunk/blender/source/blender/makesrna/RNA_access.h trunk/blender/source/blender/makesrna/intern/makesrna.c trunk/blender/source/blender/makesrna/intern/rna_access.c Modified: trunk/blender/source/blender/makesrna/RNA_access.h === --- trunk/blender/source/blender/makesrna/RNA_access.h 2013-08-26 15:43:34 UTC (rev 59530) +++ trunk/blender/source/blender/makesrna/RNA_access.h 2013-08-26 16:08:03 UTC (rev 59531) @@ -1073,10 +1073,11 @@ void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **value); void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, const void *value); void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value); -int RNA_parameter_length_get(ParameterList *parms, PropertyRNA *parm); -int RNA_parameter_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data); -void RNA_parameter_length_set(ParameterList *parms, PropertyRNA *parm, int length); -void RNA_parameter_length_set_data(ParameterList *parms, PropertyRNA *parm, void *data, int length); +/* Only for PROP_DYNAMIC properties! */ +int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm); +int RNA_parameter_dynamic_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data); +void RNA_parameter_dynamic_length_set(ParameterList *parms, PropertyRNA *parm, int length); +void RNA_parameter_dynamic_length_set_data(ParameterList *parms, PropertyRNA *parm, void *data, int length); int RNA_function_call(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms); Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c === --- trunk/blender/source/blender/makesrna/intern/makesrna.c 2013-08-26 15:43:34 UTC (rev 59530) +++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2013-08-26 16:08:03 UTC (rev 59531) @@ -2273,11 +2273,12 @@ valstr = *; } - /* this must be kept in sync with RNA_parameter_length_get_data, + /* this must be kept in sync with RNA_parameter_dynamic_length_get_data and RNA_parameter_get, * we could just call the function directly, but this is faster */ if (flag PROP_DYNAMIC) { - fprintf(f, \t%s_len = %s((int *)_data);\n, dparm-prop-identifier, pout ? : *); - data_str = char *)_data)[sizeof(void *)])); + fprintf(f, \t%s_len = %s((ParameterDynAlloc *)_data)-array_tot;\n, dparm-prop-identifier, + pout ? (int *) : (int)); + data_str = ParameterDynAlloc *)_data)-array)); } else { data_str = _data; Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c === --- trunk/blender/source/blender/makesrna/intern/rna_access.c 2013-08-26 15:43:34 UTC (rev 59530) +++ trunk/blender/source/blender/makesrna/intern/rna_access.c 2013-08-26 16:08:03 UTC (rev 59531) @@ -5357,7 +5357,14 @@ PropertyRNA *RNA_function_find_parameter(PointerRNA *UNUSED(ptr), FunctionRNA *func, const char *identifier) { - return BLI_findstring(func-cont.properties, identifier, offsetof(PropertyRNA, identifier)); + PropertyRNA *parm; + + parm = func-cont.properties.first; + for (; parm; parm = parm-next) + if
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59536] trunk/blender/source/blender: This commit adds optional parameters for pyfunc implementations of RNA API (i.e.
Revision: 59536 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=59536 Author: mont29 Date: 2013-08-26 21:11:52 + (Mon, 26 Aug 2013) Log Message: --- This commit adds optional parameters for pyfunc implementations of RNA API (i.e. callbacks, e.g. draw functions of panels, uiLists, or exec/poll/etc. of operators). Thanks to Brecht for he review! Any parameter after the first flagged with PROP_PYFUNC_OPTIONAL will be considered as optional, hence the python code does not have to define/use it. This will ease API evolutions by avoiding to break existing code when adding non-essential new parameters. Note: this will need some update to API doc generation, patch is ready, will have it reviewed by Campbell asap. Modified Paths: -- trunk/blender/source/blender/makesrna/RNA_types.h trunk/blender/source/blender/python/intern/bpy_rna.c Modified: trunk/blender/source/blender/makesrna/RNA_types.h === --- trunk/blender/source/blender/makesrna/RNA_types.h 2013-08-26 20:29:36 UTC (rev 59535) +++ trunk/blender/source/blender/makesrna/RNA_types.h 2013-08-26 21:11:52 UTC (rev 59536) @@ -146,7 +146,7 @@ } PropertySubType; /* Make sure enums are updated with thses */ -/* HIGHEST FLAG IN USE: 1 29 */ +/* HIGHEST FLAG IN USE: 1 30 */ typedef enum PropertyFlag { /* editable means the property is editable in the user * interface, properties are editable by default except @@ -172,10 +172,16 @@ /* do not write in presets */ PROP_SKIP_SAVE = (1 28), - /* function paramater flags */ + /* function parameter flags */ PROP_REQUIRED = (1 2), PROP_OUTPUT = (1 3), PROP_RNAPTR = (1 11), + /* This allows for non-breaking API updates, when adding non-critical new parameter to a callback function. +* This way, old py code defining funcs without that parameter would still work. +* WARNING: any parameter after the first PYFUNC_OPTIONAL one will be considered as optional! +* NOTE: only for input parameters! +*/ + PROP_PYFUNC_OPTIONAL = (1 30), /* registering */ PROP_REGISTER = (1 4), PROP_REGISTER_OPTIONAL = (1 4) | (1 5), Modified: trunk/blender/source/blender/python/intern/bpy_rna.c === --- trunk/blender/source/blender/python/intern/bpy_rna.c2013-08-26 20:29:36 UTC (rev 59535) +++ trunk/blender/source/blender/python/intern/bpy_rna.c2013-08-26 21:11:52 UTC (rev 59536) @@ -6875,7 +6875,7 @@ /* Type Registration */ -static int rna_function_arg_count(FunctionRNA *func) +static int rna_function_arg_count(FunctionRNA *func, int *min_count) { const ListBase *lb = RNA_function_defined_parameters(func); PropertyRNA *parm; @@ -6883,13 +6883,23 @@ int flag = RNA_function_flag(func); int is_staticmethod = (flag FUNC_NO_SELF) !(flag FUNC_USE_SELF_TYPE); int count = is_staticmethod ? 0 : 1; + bool done_min_count = false; for (link = lb-first; link; link = link-next) { parm = (PropertyRNA *)link; - if (!(RNA_property_flag(parm) PROP_OUTPUT)) + if (!(RNA_property_flag(parm) PROP_OUTPUT)) { + if (!done_min_count (RNA_property_flag(parm) PROP_PYFUNC_OPTIONAL)) { + /* From now on, following parameters are optional in py func */ + if (min_count) + *min_count = count; + done_min_count = true; + } count++; + } } + if (!done_min_count min_count) + *min_count = count; return count; } @@ -6904,7 +6914,7 @@ PyObject *py_class = (PyObject *)py_data; PyObject *base_class = RNA_struct_py_type_get(srna); PyObject *item; - int i, flag, is_staticmethod, arg_count, func_arg_count; + int i, flag, is_staticmethod, arg_count, func_arg_count, func_arg_min_count = 0; const char *py_class_name = ((PyTypeObject *)py_class)-tp_name; /* __name__ */ if (srna_base) { @@ -6968,7 +6978,7 @@ } } - func_arg_count = rna_function_arg_count(func); + func_arg_count = rna_function_arg_count(func, func_arg_min_count); if (func_arg_count = 0) { /* -1 if we don't care*/ arg_count = ((PyCodeObject *)PyFunction_GET_CODE(item))-co_argcount; @@ -6976,14 +6986,25 @@ /* note, the number of args we check for and the number of args we give to