Merged with trunk r37717.

This commit is contained in:
Joerg Mueller 2011-06-21 21:10:36 +00:00
commit 11c0ee5c76
35 changed files with 6565 additions and 8574 deletions

@ -74,6 +74,7 @@ def svn_step(branch=''):
else:
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
def lib_svn_step(dir):
return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)

@ -64,10 +64,11 @@ def get_platform(filename):
return '-'.join(platform_tokens)
def get_branch(filename):
tokens = filename.split("-")
branch = ""
for token in tokens:
if branch == "":
branch = token

@ -36,7 +36,7 @@ builder = sys.argv[1]
branch = ''
if len(sys.argv) >= 3:
branch = sys.argv[2]
branch = sys.argv[2]
# scons does own packaging
if builder.find('scons') != -1:

@ -32,8 +32,41 @@ IGNORE = (
"/decimation/intern/future/",
"/TerraplayNetwork/",
"/ik_glut_test/",
# specific source files
"extern/Eigen2/Eigen/src/Cholesky/CholeskyInstantiations.cpp",
"extern/Eigen2/Eigen/src/Core/CoreInstantiations.cpp",
"extern/Eigen2/Eigen/src/QR/QrInstantiations.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp",
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.cpp",
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp",
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp",
"extern/eltopo/common/meshes/ObjLoader.cpp",
"extern/eltopo/common/meshes/meshloader.cpp",
"extern/eltopo/common/openglutils.cpp",
"extern/eltopo/eltopo3d/broadphase_blenderbvh.cpp",
"source/blender/imbuf/intern/imbuf_cocoa.m",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h",
"extern/bullet2/src/BulletCollision/CollisionShapes/btBox2dShape.h",
"extern/bullet2/src/BulletCollision/CollisionShapes/btConvex2dShape.h",
"extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.h",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h",
"extern/bullet2/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h",
"extern/eltopo/common/meshes/Edge.hpp",
"extern/eltopo/common/meshes/ObjLoader.hpp",
"extern/eltopo/common/meshes/TriangleIndex.hpp",
"extern/eltopo/common/meshes/meshloader.h",
"extern/eltopo/eltopo3d/broadphase_blenderbvh.h"
)
import os
from os.path import join, dirname, normpath, abspath, splitext

@ -93,7 +93,7 @@ BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
#BF_GETTEXT_LIB_STATIC = '${BF_GETTEXT}/lib/libgettextlib.a'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = False
WITH_BF_PLAYER = True
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'

@ -13,8 +13,8 @@
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENCE BLOCK *****

@ -13,8 +13,8 @@
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENCE BLOCK *****

@ -31,7 +31,7 @@ PROJECT_NAME = Blender
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = "V2.57"
PROJECT_NUMBER = "V2.58"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer

@ -10,6 +10,7 @@ All properties define update functions except for CollectionProperty.
import bpy
def update_func(self, context):
print("my test function", self)

@ -149,6 +149,15 @@ set(SRC
src/LinearMath/btGeometryUtil.cpp
src/LinearMath/btQuickprof.cpp
src/LinearMath/btSerializer.cpp
# UNUSED
# src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
# src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
# src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp
# src/BulletCollision/CollisionShapes/btBox2dShape.cpp
# src/BulletCollision/CollisionShapes/btConvex2dShape.cpp
# src/BulletDynamics/Character/btKinematicCharacterController.cpp
# src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp
# src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
src/Bullet-C-Api.h
src/BulletCollision/BroadphaseCollision/btAxisSweep3.h
@ -217,6 +226,7 @@ set(SRC
src/BulletCollision/CollisionShapes/btTriangleCallback.h
src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h
src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h
src/BulletCollision/CollisionShapes/btTriangleInfoMap.h
src/BulletCollision/CollisionShapes/btTriangleMesh.h
src/BulletCollision/CollisionShapes/btTriangleMeshShape.h
src/BulletCollision/CollisionShapes/btTriangleShape.h
@ -264,6 +274,7 @@ set(SRC
src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h
src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h
src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
src/BulletDynamics/Character/btCharacterControllerInterface.h
src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
src/BulletDynamics/ConstraintSolver/btContactConstraint.h
@ -291,9 +302,12 @@ set(SRC
src/BulletSoftBody/btDefaultSoftBodySolver.h
src/BulletSoftBody/btSoftBody.h
src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
src/BulletSoftBody/btSoftBodyData.h
src/BulletSoftBody/btSoftBodyHelpers.h
src/BulletSoftBody/btSoftBodyInternals.h
src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h
src/BulletSoftBody/btSoftBodySolverVertexBuffer.h
src/BulletSoftBody/btSoftBodySolvers.h
src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h
src/BulletSoftBody/btSoftRigidDynamicsWorld.h
src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h
@ -323,9 +337,16 @@ set(SRC
src/LinearMath/btTransform.h
src/LinearMath/btTransformUtil.h
src/LinearMath/btVector3.h
src/btBulletCollisionCommon.h
src/btBulletDynamicsCommon.h
# src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
# src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h
# src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h
# src/BulletCollision/CollisionShapes/btBox2dShape.h
# src/BulletCollision/CollisionShapes/btConvex2dShape.h
# src/BulletDynamics/Character/btKinematicCharacterController.h
# src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h
# src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
)
if(CMAKE_COMPILER_IS_GNUCXX)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 197 KiB

@ -22,6 +22,7 @@ __all__ = (
"load_image",
)
# limited replacement for BPyImage.comprehensiveImageLoad
def load_image(imagepath,
dirname="",

@ -27,6 +27,7 @@ __all__ = (
"ngon_tesselate",
)
def mesh_linked_faces(mesh):
"""
Splits the mesh into connected faces, use this for seperating cubes from

@ -25,6 +25,7 @@ __all__ = (
"location_3d_to_region_2d",
)
def region_2d_to_vector_3d(region, rv3d, coord):
"""
Return a direction vector from the viewport at the spesific 2d region
@ -48,7 +49,7 @@ def region_2d_to_vector_3d(region, rv3d, coord):
out = Vector(((2.0 * coord[0] / region.width) - 1.0,
(2.0 * coord[1] / region.height) - 1.0,
-0.5
))
))
w = (out[0] * persinv[0][3]) + \
(out[1] * persinv[1][3]) + \

@ -152,7 +152,6 @@ class MeshMirrorUV(bpy.types.Operator):
if j is not None:
fmap[i] = j
done = [False] * len(faces)
for i, j in fmap.items():
if not fuvsel[i] or not fuvsel[j]:
@ -170,10 +169,10 @@ class MeshMirrorUV(bpy.types.Operator):
v1 = faces[j].vertices[:]
v2 = [vmap[k] for k in faces[i].vertices[:]]
for k in range(len(uv1)):
k_map = v1.index(v2[k])
uv1[k].x = - (uv2[k_map].x - 0.5) + 0.5
uv1[k].y = uv2[k_map].y
if len(v1) == len(v2):
for k in range(len(v1)):
k_map = v1.index(v2[k])
uv1[k].xy = - (uv2[k_map].x - 0.5) + 0.5, uv2[k_map].y
if is_editmode:
bpy.ops.object.mode_set(mode='EDIT', toggle=False)

@ -103,7 +103,7 @@ def bake(frame_start,
# -------------------------------------------------------------------------
# Collect transformations
# could speed this up by applying steps here too...
for f in frame_range:
scene.frame_set(f)

@ -244,6 +244,7 @@ class QuickExplode(bpy.types.Operator):
self.frame_end = self.frame_start + self.frame_duration
return self.execute(context)
def obj_bb_minmax(obj, min_co, max_co):
for i in range(0, 8):
bb_vec = Vector(obj.bound_box[i]) * obj.matrix_world

@ -16,7 +16,7 @@
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
# TODO <pep8 compliant>
from mathutils import Matrix, Vector, geometry
import bpy

@ -112,22 +112,23 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
sub.prop(curve, "use_fill_front")
sub.prop(curve, "use_fill_back")
col.prop(curve, "use_fill_deform", text="Fill Deformed")
class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel):
bl_label = "Texture Space"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
ob = context.object
curve = context.curve
row = layout.row()
row.prop(curve, "use_auto_texspace")
row.prop(curve, "use_uv_as_generated")
row = layout.row()
row.column().prop(curve, "texspace_location", text="Location")
row.column().prop(curve, "texspace_size", text="Size")

@ -118,6 +118,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
row.column().prop(mesh, "texspace_location", text="Location")
row.column().prop(mesh, "texspace_size", text="Size")
class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
bl_label = "Vertex Groups"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}

@ -70,20 +70,20 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
layout.label(text="Update:")
layout.prop(mball, "update_method", expand=True)
class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel):
bl_label = "Texture Space"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
mball = context.meta_ball
layout.prop(mball, "use_auto_texspace")
row = layout.row()
row.column().prop(mball, "texspace_location", text="Location")
row.column().prop(mball, "texspace_size", text="Size")

@ -485,7 +485,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
if md.wrap_method == 'PROJECT':
split = layout.split(percentage=0.25)
col = split.column()
col.label(text="Axis:")
col.prop(md, "use_project_x")

@ -660,8 +660,8 @@ class ConstraintButtonsPanel():
row = col.row()
row.label(text="Source to Destination Mapping:")
# note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
# open it. Thus we are using the hardcoded value instead.
# note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
# open it. Thus we are using the hardcoded value instead.
row = col.row()
row.prop(con, "map_to_x_from", expand=False, text="")
row.label(text=" %s X" % chr(187))

@ -2,7 +2,7 @@
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

@ -43,17 +43,17 @@ extern "C" {
/* these lines are grep'd, watch out for our not-so-awesome regex
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 257
#define BLENDER_SUBVERSION 1
#define BLENDER_VERSION 258
#define BLENDER_SUBVERSION 0
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
/* used by packaging tools */
/* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR b
#define BLENDER_VERSION_CHAR
/* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE beta
#define BLENDER_VERSION_CYCLE release
struct ListBase;
struct MemFile;

File diff suppressed because it is too large Load Diff

@ -3461,7 +3461,8 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
ARegion *ar= CTX_wm_region(C);
float vec[3], mousef[2];
int mval[2];
int flip, mouse[2], dx, dy, removed= 0, added=0, selected= 0;
int flip, mouse[2], removed= 0, added=0, selected= 0, tot_steps= 1, step= 1;
float dx, dy, dmax;
int lock_root = pset->flag & PE_LOCK_FIRST;
if(!PE_start_edit(edit))
@ -3496,152 +3497,163 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
view3d_operator_needs_opengl(C);
selected= (short)count_selected_keys(scene, edit);
switch(pset->brushtype) {
case PE_BRUSH_COMB:
{
float mval_f[2];
data.mval= mval;
data.rad= (float)brush->size;
dmax = MAX2(fabs(dx), fabs(dy));
tot_steps = dmax/(0.2f * brush->size) + 1;
data.combfac= (brush->strength - 0.5f) * 2.0f;
if(data.combfac < 0.0f)
data.combfac= 1.0f - 9.0f * data.combfac;
else
data.combfac= 1.0f - data.combfac;
dx /= (float)tot_steps;
dy /= (float)tot_steps;
invert_m4_m4(ob->imat, ob->obmat);
for(step = 1; step<=tot_steps; step++) {
mval[0] = bedit->lastmouse[0] + step*dx;
mval[1] = bedit->lastmouse[1] + step*dy;
mval_f[0]= dx;
mval_f[1]= dy;
ED_view3d_win_to_delta(ar, mval_f, vec);
data.dvec= vec;
foreach_mouse_hit_key(&data, brush_comb, selected);
break;
}
case PE_BRUSH_CUT:
{
if(edit->psys && edit->pathcache) {
switch(pset->brushtype) {
case PE_BRUSH_COMB:
{
float mval_f[2];
data.mval= mval;
data.rad= (float)brush->size;
data.cutfac= brush->strength;
if(selected)
foreach_selected_point(&data, brush_cut);
data.combfac= (brush->strength - 0.5f) * 2.0f;
if(data.combfac < 0.0f)
data.combfac= 1.0f - 9.0f * data.combfac;
else
foreach_point(&data, brush_cut);
data.combfac= 1.0f - data.combfac;
removed= remove_tagged_particles(ob, edit->psys, pe_x_mirror(ob));
if(pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
}
else
removed= 0;
break;
}
case PE_BRUSH_LENGTH:
{
data.mval= mval;
data.rad= (float)brush->size;
data.growfac= brush->strength / 50.0f;
if(brush->invert ^ flip)
data.growfac= 1.0f - data.growfac;
else
data.growfac= 1.0f + data.growfac;
foreach_mouse_hit_point(&data, brush_length, selected);
if(pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
break;
}
case PE_BRUSH_PUFF:
{
if(edit->psys) {
data.dm= psmd->dm;
data.mval= mval;
data.rad= (float)brush->size;
data.select= selected;
data.pufffac= (brush->strength - 0.5f) * 2.0f;
if(data.pufffac < 0.0f)
data.pufffac= 1.0f - 9.0f * data.pufffac;
else
data.pufffac= 1.0f - data.pufffac;
data.invert= (brush->invert ^ flip);
invert_m4_m4(ob->imat, ob->obmat);
foreach_mouse_hit_point(&data, brush_puff, selected);
}
break;
}
case PE_BRUSH_ADD:
{
if(edit->psys && edit->psys->part->from==PART_FROM_FACE) {
data.mval= mval;
mval_f[0]= dx;
mval_f[1]= dy;
ED_view3d_win_to_delta(ar, mval_f, vec);
data.dvec= vec;
added= brush_add(&data, brush->count);
foreach_mouse_hit_key(&data, brush_comb, selected);
break;
}
case PE_BRUSH_CUT:
{
if(edit->psys && edit->pathcache) {
data.mval= mval;
data.rad= (float)brush->size;
data.cutfac= brush->strength;
if(selected)
foreach_selected_point(&data, brush_cut);
else
foreach_point(&data, brush_cut);
removed= remove_tagged_particles(ob, edit->psys, pe_x_mirror(ob));
if(pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
}
else
removed= 0;
break;
}
case PE_BRUSH_LENGTH:
{
data.mval= mval;
data.rad= (float)brush->size;
data.growfac= brush->strength / 50.0f;
if(brush->invert ^ flip)
data.growfac= 1.0f - data.growfac;
else
data.growfac= 1.0f + data.growfac;
foreach_mouse_hit_point(&data, brush_length, selected);
if(pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
break;
}
else
added= 0;
break;
}
case PE_BRUSH_SMOOTH:
{
data.mval= mval;
data.rad= (float)brush->size;
case PE_BRUSH_PUFF:
{
if(edit->psys) {
data.dm= psmd->dm;
data.mval= mval;
data.rad= (float)brush->size;
data.select= selected;
data.vec[0]= data.vec[1]= data.vec[2]= 0.0f;
data.tot= 0;
data.pufffac= (brush->strength - 0.5f) * 2.0f;
if(data.pufffac < 0.0f)
data.pufffac= 1.0f - 9.0f * data.pufffac;
else
data.pufffac= 1.0f - data.pufffac;
data.smoothfac= brush->strength;
data.invert= (brush->invert ^ flip);
invert_m4_m4(ob->imat, ob->obmat);
invert_m4_m4(ob->imat, ob->obmat);
foreach_mouse_hit_key(&data, brush_smooth_get, selected);
if(data.tot) {
mul_v3_fl(data.vec, 1.0f / (float)data.tot);
foreach_mouse_hit_key(&data, brush_smooth_do, selected);
foreach_mouse_hit_point(&data, brush_puff, selected);
}
break;
}
case PE_BRUSH_ADD:
{
if(edit->psys && edit->psys->part->from==PART_FROM_FACE) {
data.mval= mval;
break;
}
case PE_BRUSH_WEIGHT:
{
if(edit->psys) {
data.dm= psmd->dm;
added= brush_add(&data, brush->count);
if(pset->flag & PE_KEEP_LENGTHS)
recalc_lengths(edit);
}
else
added= 0;
break;
}
case PE_BRUSH_SMOOTH:
{
data.mval= mval;
data.rad= (float)brush->size;
data.weightfac = brush->strength; /* note that this will never be zero */
data.vec[0]= data.vec[1]= data.vec[2]= 0.0f;
data.tot= 0;
foreach_mouse_hit_key(&data, brush_weight, selected);
data.smoothfac= brush->strength;
invert_m4_m4(ob->imat, ob->obmat);
foreach_mouse_hit_key(&data, brush_smooth_get, selected);
if(data.tot) {
mul_v3_fl(data.vec, 1.0f / (float)data.tot);
foreach_mouse_hit_key(&data, brush_smooth_do, selected);
}
break;
}
case PE_BRUSH_WEIGHT:
{
if(edit->psys) {
data.dm= psmd->dm;
data.mval= mval;
data.rad= (float)brush->size;
break;
data.weightfac = brush->strength; /* note that this will never be zero */
foreach_mouse_hit_key(&data, brush_weight, selected);
}
break;
}
}
}
if((pset->flag & PE_KEEP_LENGTHS)==0)
recalc_lengths(edit);
if((pset->flag & PE_KEEP_LENGTHS)==0)
recalc_lengths(edit);
if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_CUT) && (added || removed)) {
if(pset->brushtype == PE_BRUSH_ADD && pe_x_mirror(ob))
PE_mirror_x(scene, ob, 1);
if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_CUT) && (added || removed)) {
if(pset->brushtype == PE_BRUSH_ADD && pe_x_mirror(ob))
PE_mirror_x(scene, ob, 1);
update_world_cos(ob,edit);
psys_free_path_cache(NULL, edit);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
update_world_cos(ob,edit);
psys_free_path_cache(NULL, edit);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else
PE_update_object(scene, ob, 1);
}
else
PE_update_object(scene, ob, 1);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);

@ -121,8 +121,10 @@ short ED_fileselect_set_params(SpaceFile *sfile)
/* set the parameters from the operator, if it exists */
if (op) {
short is_filename= FALSE;
short is_dir= FALSE;
const short is_files= (RNA_struct_find_property(op->ptr, "files") != NULL);
const short is_filepath= (RNA_struct_find_property(op->ptr, "filepath") != NULL);
const short is_filename= (RNA_struct_find_property(op->ptr, "filename") != NULL);
const short is_directory= (RNA_struct_find_property(op->ptr, "directory") != NULL);
BLI_strncpy(params->title, op->type->name, sizeof(params->title));
@ -131,7 +133,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
else
params->type = FILE_SPECIAL;
if ((is_dir= is_filename= RNA_struct_find_property(op->ptr, "filepath")!=NULL) && RNA_property_is_set(op->ptr, "filepath")) {
if (is_filepath && RNA_property_is_set(op->ptr, "filepath")) {
char name[FILE_MAX];
RNA_string_get(op->ptr, "filepath", name);
if (params->type == FILE_LOADLIB) {
@ -143,13 +145,12 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
}
else {
if ((is_dir= RNA_struct_find_property(op->ptr, "directory")!=NULL) && RNA_property_is_set(op->ptr, "directory")) {
if (is_directory && RNA_property_is_set(op->ptr, "directory")) {
RNA_string_get(op->ptr, "directory", params->dir);
sfile->params->file[0]= '\0';
is_dir= TRUE;
}
if ((is_filename= RNA_struct_find_property(op->ptr, "filename")!=NULL) && RNA_property_is_set(op->ptr, "filename")) {
if (is_filename && RNA_property_is_set(op->ptr, "filename")) {
RNA_string_get(op->ptr, "filename", params->file);
}
}
@ -159,7 +160,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
BLI_path_abs(params->dir, G.main->name);
}
if(is_dir==TRUE && is_filename==FALSE) {
if(is_directory==TRUE && is_filename==FALSE && is_filepath==FALSE && is_files==FALSE) {
params->flag |= FILE_DIRSEL_ONLY;
}
else {

@ -4737,7 +4737,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
if(!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))) {
// icons a bit higher
tselem_draw_icon(block, xmax, (float)startx+offsx, (float)*starty+2*ufac, tselem, te, 1.0f);
tselem_draw_icon(block, xmax, (float)startx+offsx - 0.5f*ufac, (float)*starty+2.0f*ufac, tselem, te, 1.0f);
offsx+= UI_UNIT_X;
}

@ -551,7 +551,7 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_FILENAME|WM_FILESEL_RELPATH);
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME|SEQPROP_FILES);
}

@ -385,8 +385,8 @@ static void initSnappingMode(TransInfo *t)
if (t->tsnap.applySnap != NULL && // A snapping function actually exist
(obedit != NULL && ELEM4(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE)) ) // Temporary limited to edit mode meshes, armature, curves
{
/* editmode meshes now supported */
if ((obedit->type != OB_MESH) && ((t->flag & T_PROP_EDIT) || t->tsnap.project)) /* also exclude edit for project, for now */
/* Exclude editmesh if using proportional edit */
if ((obedit->type == OB_MESH) && (t->flag & T_PROP_EDIT))
{
t->tsnap.modeSelect = SNAP_NOT_OBEDIT;
}

@ -1826,7 +1826,6 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "par1");
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");

@ -1634,7 +1634,7 @@ static int Vector_setSwizzle(VectorObject *self, PyObject *value, void *closure)
size_from= axis_from;
}
else if((size_from=mathutils_array_parse(vec_assign, 2, 4, value, "mathutils.Vector.**** = swizzle assignment")) == -1) {
else if(PyErr_Clear(), (size_from=mathutils_array_parse(vec_assign, 2, 4, value, "mathutils.Vector.**** = swizzle assignment")) == -1) {
return -1;
}

@ -200,7 +200,7 @@ void BPY_python_start(int argc, const char **argv)
/* allow to use our own included python */
PyC_SetHomePath(BLI_get_folder(BLENDER_SYSTEM_PYTHON, NULL));
/* Python 3.2 now looks for '2.57/python/include/python3.2d/pyconfig.h' to parse
/* Python 3.2 now looks for '2.58/python/include/python3.2d/pyconfig.h' to parse
* from the 'sysconfig' module which is used by 'site', so for now disable site.
* alternatively we could copy the file. */
Py_NoSiteFlag= 1;

@ -1473,7 +1473,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
param= _PyUnicode_AsString(value);
}
#else // USE_STRING_COERCE
param= _PyUnicode_AsStringSize(value);
param= _PyUnicode_AsString(value);
#endif // USE_STRING_COERCE
if (param==NULL) {
@ -6041,9 +6041,10 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
PyGILState_STATE gilstate;
#ifdef USE_PEDANTIC_WRITE
const int is_operator= RNA_struct_is_a(ptr->type, &RNA_Operator);
const char *func_id= RNA_function_identifier(func);
/* testing, for correctness, not operator and not draw function */
const short is_readonly= strstr("draw", func_id) || /*strstr("render", func_id) ||*/ !RNA_struct_is_a(ptr->type, &RNA_Operator);
const short is_readonly= strstr("draw", func_id) || /*strstr("render", func_id) ||*/ !is_operator;
#endif
py_class= RNA_struct_py_type_get(ptr->type);
@ -6099,6 +6100,11 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
* Although this is annoying to have to impliment a part of pythons typeobject.c:type_call().
*/
if(py_class->tp_init) {
#ifdef USE_PEDANTIC_WRITE
const int prev_write= rna_disallow_writes;
rna_disallow_writes= is_operator ? FALSE : TRUE; /* only operators can write on __init__ */
#endif
/* true in most cases even when the class its self doesn't define an __init__ function. */
args= PyTuple_New(0);
if (py_class->tp_init(py_srna, args, NULL) < 0) {
@ -6107,11 +6113,16 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
/* err set below */
}
Py_DECREF(args);
#ifdef USE_PEDANTIC_WRITE
rna_disallow_writes= prev_write;
#endif
}
py_class_instance= py_srna;
#else
const int prev_write= rna_disallow_writes;
rna_disallow_writes= TRUE;
/* 'almost' all the time calling the class isn't needed.
* We could just do...
py_class_instance= py_srna;
@ -6125,7 +6136,10 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
py_class_instance= PyObject_Call(py_class, args, NULL);
Py_DECREF(args);
rna_disallow_writes= prev_write;
#endif
if(py_class_instance == NULL) {
err= -1; /* so the error is not overridden below */
}