[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15865] branches/soc-2008-unclezeiv: svn merge -r 15760:15864 https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Davide Vercelli
davide.vercelli at gmail.com
Tue Jul 29 14:26:51 CEST 2008
Revision: 15865
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15865
Author: unclezeiv
Date: 2008-07-29 14:26:50 +0200 (Tue, 29 Jul 2008)
Log Message:
-----------
svn merge -r 15760:15864 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Modified Paths:
--------------
branches/soc-2008-unclezeiv/release/scripts/rvk1_torvk2.py
branches/soc-2008-unclezeiv/source/blender/blenkernel/bad_level_call_stubs/stubs.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/constraint.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/softbody.c
branches/soc-2008-unclezeiv/source/blender/blenlib/intern/arithb.c
branches/soc-2008-unclezeiv/source/blender/blenlib/intern/freetypefont.c
branches/soc-2008-unclezeiv/source/blender/include/BIF_editarmature.h
branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_armature_types.h
branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_constraint_types.h
branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_object_types.h
branches/soc-2008-unclezeiv/source/blender/python/BPY_interface.c
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Armature.c
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Bone.c
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/doc/Armature.py
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/sceneRender.c
branches/soc-2008-unclezeiv/source/blender/src/buttons_editing.c
branches/soc-2008-unclezeiv/source/blender/src/buttons_object.c
branches/soc-2008-unclezeiv/source/blender/src/drawgpencil.c
branches/soc-2008-unclezeiv/source/blender/src/drawview.c
branches/soc-2008-unclezeiv/source/blender/src/editarmature.c
branches/soc-2008-unclezeiv/source/blender/src/editobject.c
branches/soc-2008-unclezeiv/source/blender/src/gpencil.c
branches/soc-2008-unclezeiv/source/blender/src/interface.c
branches/soc-2008-unclezeiv/source/blender/src/outliner.c
branches/soc-2008-unclezeiv/source/blender/src/poseobject.c
branches/soc-2008-unclezeiv/source/blender/src/sequence.c
branches/soc-2008-unclezeiv/source/blender/src/transform_conversions.c
branches/soc-2008-unclezeiv/source/blender/src/transform_manipulator.c
branches/soc-2008-unclezeiv/source/creator/creator.c
branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_LogicManager.cpp
branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_LogicManager.h
branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_PyMath.h
branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_Scene.cpp
Modified: branches/soc-2008-unclezeiv/release/scripts/rvk1_torvk2.py
===================================================================
--- branches/soc-2008-unclezeiv/release/scripts/rvk1_torvk2.py 2008-07-29 11:53:43 UTC (rev 15864)
+++ branches/soc-2008-unclezeiv/release/scripts/rvk1_torvk2.py 2008-07-29 12:26:50 UTC (rev 15865)
@@ -14,7 +14,7 @@
__version__ = "2007/04/27"
__bpydoc__ = """\
-"DEFORM to RVK2" copies deform data (except EDGESPLIT,DECIMATE,SUBSURF,BOOLEAN,
+"DEFORM to RVK2" copies deform data (except EDGESPLIT,DECIMATE,SUBSURF,BOOLEAN,
BUILD,MIRROR,ARRAY) of the active object to the RVK (relative vertex key) of
the other selected object.
@@ -25,7 +25,7 @@
The new version of this scrit (Blender 2.43) manages the modifier changes.
There are a lot of modifiers but only the ones which just deforms the shape
can be used : LATTICE, CURVE, WAVE, ARMATURE. You can unset these modifiers
-from the script.
+from the script.
Usage:
@@ -35,7 +35,7 @@
level, the script will ask if it should change that. Before copying data to
the rvk it will also ask whether it should replace or add a new vertex group.
-
+
"""
#----------------------------------------------
@@ -70,7 +70,7 @@
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 St, Fifth Floor, Boston, MA 02110-1301 USA
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
# Copy the rvk (1, or armature, lattice, or
# any mesh deformation except surface
@@ -83,7 +83,7 @@
# download the script :
# http://jmsoler.free.fr/util/blenderfile/py/rvk1_torvk2.py
# Communicate upon problems or errors:
-# http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender
+# http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender
#----------------------------------------------
# Page officielle :
# http://jmsoler.free.fr/util/blenderfile/py/rvk1_torvk2.py
@@ -101,22 +101,22 @@
exec "t=Modifier.Types.%s"%t
return t
-def deform2rvk():
+def deform2rvk():
POSSMOD_list=['EDGESPLIT',
'DECIMATE',
- 'SUBSURF',
- 'BOOLEAN',
+ 'SUBSURF',
+ 'BOOLEAN',
'BUILD',
- 'MIRROR',
+ 'MIRROR',
'ARRAY']
AUTHMOD_list=['LATTICE',
- 'CURVE',
+ 'CURVE',
'WAVE',
'ARMATURE']
MODIFIERS=0
-
+
BMOD=[['Possible Modifiers'],
['Allowed Modifiers']]
@@ -129,8 +129,8 @@
# =============================================================
# must be 2 meshes ============================================
# =============================================================
- if RVK1.getType()=='Mesh' and RVK2.getType()=='Mesh':
- FRAME=Blender.Get('curframe')
+ if RVK1.getType()=='Mesh' and RVK2.getType()=='Mesh':
+ FRAME=Blender.Get('curframe')
DATA2=RVK2.getData()
if DEBUG: print DATA2.getKey()
# ============================================================
@@ -151,7 +151,7 @@
# === Bloc Menu Modifiers ===1 doc =================
# ===================================================
m=0
- for mod in MODRVK1:
+ for mod in MODRVK1:
if DEBUG: print mod.type
if mod.type in POSSMOD:
BMOD[0].append([Draw.Create(0),mod.type,
@@ -183,7 +183,7 @@
retval = Blender.Draw.PupBlock("MESH 2 RVK", block)
# ===================================================
# === unset Modifiers =============================
- # ===================================================
+ # ===================================================
for B in BMOD[0][1:]:
if DEBUG: print B[2]
MODRVK1[B[2]][Modifier.Settings.RENDER]=0
@@ -193,12 +193,12 @@
# ===================================================
# === update Modifiers =============================
# ===================================================
- RVK1.makeDisplayList()
+ #RVK1.makeDisplayList()
# =======================================================
# === get deformed mesh ================================
# =======================================================
RVK1NAME=Object.GetSelected()[0].getName()
- meshrvk1=NMesh.GetRawFromObject(RVK1NAME)
+ meshrvk1=NMesh.GetRawFromObject(RVK1NAME)
if DEBUG: print len(meshrvk1.verts)
# =======================================================
# === get normal mesh for vertex group =================
@@ -209,18 +209,18 @@
# =======================================================
DATA2=RVK2.getData()
if DEBUG: print len(meshrvk1.verts)
- if DEBUG: print len(DATA2.verts)
+ if DEBUG: print len(DATA2.verts)
# ========================================================
# ===== is there the same number of vertices =============
# ========================================================
- if len(meshrvk1.verts)==len(DATA2.verts):
- name = "Do you want to replace or add vertex groups ? %t| YES %x1| NO ? %x2 "
+ if len(meshrvk1.verts)==len(DATA2.verts):
+ name = "Do you want to replace or add vertex groups ? %t| YES %x1| NO ? %x2 "
result = Draw.PupMenu(name)
- if result==1:
+ if result==1:
# =====================================================
# ===== Do we save vertex groups ? ===================
# =====================================================
- GROUPNAME2=DATA2.getVertGroupNames()
+ GROUPNAME2=DATA2.getVertGroupNames()
if len(GROUPNAME2)!=0:
for GROUP2 in GROUPNAME2:
DATA2.removeVertGroup(GROUP2)
@@ -233,11 +233,11 @@
# ===== now copy the vertices coords =====================
# ========================================================
for v in meshrvk1.verts:
- i= meshrvk1.verts.index(v)
+ i= meshrvk1.verts.index(v)
v1=DATA2.verts[i]
for n in [0,1,2]:
v1.co[n]=v.co[n]
- DATA2.update()
+ DATA2.update()
DATA2.insertKey(FRAME,'relative')
DATA2.update()
RVK2.makeDisplayList()
@@ -251,23 +251,23 @@
if not B[1]:
MODRVK1[B[2]][Modifier.Settings.RENDER]|=B[-2]
else:
- name = "Meshes Objects must the same number of vertices %t| Ok. %x1"
+ name = "Meshes Objects must the same number of vertices %t| Ok. %x1"
result = Draw.PupMenu(name)
return
else:
- name = "Second Object must have at least a shape key %t| Ok. %x1"
+ name = "Second Object must have at least a shape key %t| Ok. %x1"
result = Draw.PupMenu(name)
return
- else:
- name = "Object must be Meshes %t| Ok. %x1"
+ else:
+ name = "Object must be Meshes %t| Ok. %x1"
result = Draw.PupMenu(name)
- return
+ return
else :
- name = "At least 2 Meshes as to be selected %t| Ok. %x1"
+ name = "At least 2 Meshes as to be selected %t| Ok. %x1"
result = Draw.PupMenu(name)
return
- Blender.Redraw()
+ Blender.Redraw()
EDITMODE=Blender.Window.EditMode()
Blender.Window.EditMode(0)
deform2rvk()
-Blender.Window.EditMode(EDITMODE)
+Blender.Window.EditMode(EDITMODE)
\ No newline at end of file
Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/bad_level_call_stubs/stubs.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/bad_level_call_stubs/stubs.c 2008-07-29 11:53:43 UTC (rev 15864)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/bad_level_call_stubs/stubs.c 2008-07-29 12:26:50 UTC (rev 15865)
@@ -354,7 +354,6 @@
/* editseq.c */
Sequence *get_forground_frame_seq(int frame){return 0;};
-void set_last_seq(Sequence *seq){};
void clear_last_seq(Sequence *seq){};
Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/constraint.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/constraint.c 2008-07-29 11:53:43 UTC (rev 15864)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/constraint.c 2008-07-29 12:26:50 UTC (rev 15865)
@@ -558,8 +558,8 @@
if (dgroup < 0) return;
/* get DerivedMesh */
- if (G.obedit && G.editMesh) {
- /* we are in editmode, so get a special derived mesh */
+ if ((G.obedit == ob) && (G.editMesh)) {
+ /* target is in editmode, so get a special derived mesh */
dm = CDDM_from_editmesh(G.editMesh, ob->data);
}
else {
Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/softbody.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/softbody.c 2008-07-29 11:53:43 UTC (rev 15864)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/softbody.c 2008-07-29 12:26:50 UTC (rev 15865)
@@ -1548,7 +1548,7 @@
/* note we don't use sb->mediafrict but use sb->aeroedge for magnitude of effect*/
if(sb->aeroedge){
float vel[3],sp[3],pr[3],force[3];
- float f,windfactor = 10.0f;
+ float f,windfactor = 250.0f;
/*see if we have wind*/
if(do_effector) {
float speed[3]={0.0f,0.0f,0.0f};
@@ -2034,7 +2034,7 @@
BodySpring *bs;
ListBase *do_effector;
float iks, ks, kd, gravity;
- float fieldfactor = -100.0f, windfactor = 10.0f;
+ float fieldfactor = 1000.0f, windfactor = 250.0f;
float tune = sb->ballstiff;
int a, b, do_deflector,do_selfcollision,do_springcollision,do_aero;
Modified: branches/soc-2008-unclezeiv/source/blender/blenlib/intern/arithb.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenlib/intern/arithb.c 2008-07-29 11:53:43 UTC (rev 15864)
+++ branches/soc-2008-unclezeiv/source/blender/blenlib/intern/arithb.c 2008-07-29 12:26:50 UTC (rev 15865)
@@ -2536,11 +2536,6 @@
}
-
- /* copied from Geometry.c - todo - move to arithb.c or some other generic place we can reuse */
-#define SIDE_OF_LINE(pa,pb,pp) ((pa[0]-pp[0])*(pb[1]-pp[1]))-((pb[0]-pp[0])*(pa[1]-pp[1]))
-#define POINT_IN_TRI(p0,p1,p2,p3) ((SIDE_OF_LINE(p1,p2,p0)>=0) && (SIDE_OF_LINE(p2,p3,p0)>=0) && (SIDE_OF_LINE(p3,p1,p0)>=0))
-
/**
*
* @param min
Modified: branches/soc-2008-unclezeiv/source/blender/blenlib/intern/freetypefont.c
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list