[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30069] branches/particles-2010: Added a new object data type for particles called ParticleSet, which will be a container for particles.

2010-07-07 Thread Lukas Toenne
Revision: 30069
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30069
Author:   lukastoenne
Date: 2010-07-07 09:17:12 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Added a new object data type for particles called ParticleSet, which will be a 
container for particles.

Modified Paths:
--
branches/particles-2010/release/scripts/ui/space_info.py
branches/particles-2010/source/blender/blenkernel/BKE_main.h
branches/particles-2010/source/blender/blenkernel/intern/library.c
branches/particles-2010/source/blender/editors/CMakeLists.txt
branches/particles-2010/source/blender/editors/space_api/spacetypes.c
branches/particles-2010/source/blender/makesdna/DNA_ID.h
branches/particles-2010/source/blender/makesdna/DNA_object_types.h
branches/particles-2010/source/creator/CMakeLists.txt

Added Paths:
---
branches/particles-2010/source/blender/blenkernel/BKE_particleset.h
branches/particles-2010/source/blender/blenkernel/intern/particleset.c
branches/particles-2010/source/blender/editors/include/ED_particleset.h
branches/particles-2010/source/blender/editors/particleset/
branches/particles-2010/source/blender/editors/particleset/CMakeLists.txt
branches/particles-2010/source/blender/editors/particleset/editparticleset.c

branches/particles-2010/source/blender/editors/particleset/particleset_intern.h
branches/particles-2010/source/blender/editors/particleset/particleset_ops.c
branches/particles-2010/source/blender/makesdna/DNA_particleset_types.h

Modified: branches/particles-2010/release/scripts/ui/space_info.py
===
--- branches/particles-2010/release/scripts/ui/space_info.py2010-07-07 
04:40:33 UTC (rev 30068)
+++ branches/particles-2010/release/scripts/ui/space_info.py2010-07-07 
07:17:12 UTC (rev 30069)
@@ -242,6 +242,9 @@
 layout.operator(object.add, text=Empty, 
icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
 layout.separator()
 
+layout.operator(particleset.primitive_particleset_add, 
text=Particle Set, icon='PARTICLES')
+layout.separator()
+
 layout.operator(object.camera_add, text=Camera, 
icon='OUTLINER_OB_CAMERA')
 layout.operator_context = 'EXEC_SCREEN'
 layout.operator_menu_enum(object.lamp_add, type, text=Lamp, 
icon='OUTLINER_OB_LAMP')

Modified: branches/particles-2010/source/blender/blenkernel/BKE_main.h
===
--- branches/particles-2010/source/blender/blenkernel/BKE_main.h
2010-07-07 04:40:33 UTC (rev 30068)
+++ branches/particles-2010/source/blender/blenkernel/BKE_main.h
2010-07-07 07:17:12 UTC (rev 30069)
@@ -78,6 +78,7 @@
ListBase particle;
ListBase wm;
ListBase gpencil;
+   ListBase particleset;
 } Main;
 
 

Added: branches/particles-2010/source/blender/blenkernel/BKE_particleset.h
===
--- branches/particles-2010/source/blender/blenkernel/BKE_particleset.h 
(rev 0)
+++ branches/particles-2010/source/blender/blenkernel/BKE_particleset.h 
2010-07-07 07:17:12 UTC (rev 30069)
@@ -0,0 +1,39 @@
+/**
+ * * 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) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * * END GPL LICENSE BLOCK *
+ */
+
+#ifndef BKE_PARTICLESET_H
+#define BKE_PARTICLESET_H
+
+#include DNA_particleset_types.h
+
+struct ParticleSet;
+
+void make_local_particleset(struct ParticleSet *pset);
+struct ParticleSet* copy_particleset(struct ParticleSet *pset);
+void free_particleset(struct ParticleSet *pset);
+
+#endif

Modified: branches/particles-2010/source/blender/blenkernel/intern/library.c
===
--- branches/particles-2010/source/blender/blenkernel/intern/library.c  
2010-07-07 04:40:33 UTC (rev 30068)
+++ branches/particles-2010/source/blender/blenkernel/intern/library.c  
2010-07-07 07:17:12 UTC (rev 30069)
@@ -64,6 +64,7 @@
 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30070] branches/soc-2010-jwilkins/source/ blender/makesrna/intern/rna_brush.c: * brush time property is used in uv painting

2010-07-07 Thread Jason Wilkins
Revision: 30070
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30070
Author:   jwilkins
Date: 2010-07-07 09:24:09 +0200 (Wed, 07 Jul 2010)

Log Message:
---
* brush time property is used in uv painting

Modified Paths:
--
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c

Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
===
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c   
2010-07-07 07:17:12 UTC (rev 30069)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c   
2010-07-07 07:24:09 UTC (rev 30070)
@@ -603,10 +603,10 @@
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, Flip, );
 
-   // XXX: not used?
-   //prop= RNA_def_property(srna, time, PROP_FLOAT, PROP_UNSIGNED);
-   //RNA_def_property_flag(prop, PROP_IDPROPERTY);
-   //RNA_def_property_ui_text(prop, Time, );
+   // used in uv painting
+   prop= RNA_def_property(srna, time, PROP_FLOAT, PROP_UNSIGNED);
+   RNA_def_property_flag(prop, PROP_IDPROPERTY);
+   RNA_def_property_ui_text(prop, Time, );
 
/* XXX: Tool (this will be for pressing a modifier key for a different 
brush,
e.g. switching to a Smooth brush in the middle of the 
stroke */


___
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 [30071] branches/particles-2010/source/ blender: Basic particle buffers ported back.

2010-07-07 Thread Lukas Toenne
Revision: 30071
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30071
Author:   lukastoenne
Date: 2010-07-07 10:10:43 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Basic particle buffers ported back. This needs to be extended to include 
particle properties.

Modified Paths:
--
branches/particles-2010/source/blender/blenkernel/BKE_particleset.h
branches/particles-2010/source/blender/blenkernel/intern/object.c
branches/particles-2010/source/blender/blenkernel/intern/particleset.c
branches/particles-2010/source/blender/editors/particleset/editparticleset.c
branches/particles-2010/source/blender/makesdna/DNA_particleset_types.h
branches/particles-2010/source/blender/makesdna/intern/makesdna.c

Modified: branches/particles-2010/source/blender/blenkernel/BKE_particleset.h
===
--- branches/particles-2010/source/blender/blenkernel/BKE_particleset.h 
2010-07-07 07:24:09 UTC (rev 30070)
+++ branches/particles-2010/source/blender/blenkernel/BKE_particleset.h 
2010-07-07 08:10:43 UTC (rev 30071)
@@ -32,8 +32,41 @@
 
 struct ParticleSet;
 
+/* attribute management */
+int pset_get_particle_size(struct ParticleSet *pset);
+
+/* buffer management */
+void pset_create_particles(struct ParticleSet *pset, float cfra, int emit);
+void pset_kill_particle(struct ParticleSet *pset, int index);
+void pset_kill_all_particles(struct ParticleSet *pset);
+void pset_free_dead_pages(struct ParticleSet *pset);
+void pset_free_particles(struct ParticleSet *pset);
+void pset_reset(struct ParticleSet *pset);
+
+/* particle access */
+struct Particle* pset_get_particle(struct ParticleSet *pset, int index);
+
+struct ParticleIterator;
+typedef int (*ParticleIteratorSkipFunc)(struct ParticleIterator*);
+typedef struct ParticleIterator
+{
+   ParticleSet *pset;
+   Particle *pa;
+   int index;
+   ParticlePage *page;
+   
+   ParticleIteratorSkipFunc skip;
+} ParticleIterator;
+
+void pit_init_skip(struct ParticleIterator *it, struct ParticleSet *pset, 
ParticleIteratorSkipFunc skip);
+void pit_init(struct ParticleIterator *it, struct ParticleSet *pset);
+void pit_next(struct ParticleIterator *it);
+void pit_goto(struct ParticleIterator *it, int index);
+
 void make_local_particleset(struct ParticleSet *pset);
+struct ParticleSet *add_particleset(char *name);
 struct ParticleSet* copy_particleset(struct ParticleSet *pset);
+void unlink_particleset(struct ParticleSet *pset);
 void free_particleset(struct ParticleSet *pset);
 
 #endif

Modified: branches/particles-2010/source/blender/blenkernel/intern/object.c
===
--- branches/particles-2010/source/blender/blenkernel/intern/object.c   
2010-07-07 07:24:09 UTC (rev 30070)
+++ branches/particles-2010/source/blender/blenkernel/intern/object.c   
2010-07-07 08:10:43 UTC (rev 30071)
@@ -87,6 +87,7 @@
 #include BKE_object.h
 #include BKE_paint.h
 #include BKE_particle.h
+#include BKE_particleset.h
 #include BKE_pointcache.h
 #include BKE_property.h
 #include BKE_sca.h
@@ -965,6 +966,7 @@
case OB_SURF: return add_curve(Surf, OB_SURF);
case OB_FONT: return add_curve(Text, OB_FONT);
case OB_MBALL: return add_mball(Meta);
+   case OB_PSET: return add_particleset(Particles);
case OB_CAMERA: return add_camera(Camera);
case OB_LAMP: return add_lamp(Lamp);
case OB_LATTICE: return add_lattice(Lattice);
@@ -985,6 +987,7 @@
case OB_SURF: return Surf;
case OB_FONT: return Text;
case OB_MBALL: return Mball;
+   case OB_PSET: return Particles;
case OB_CAMERA: return Camera;
case OB_LAMP: return Lamp;
case OB_LATTICE: return Lattice;

Modified: branches/particles-2010/source/blender/blenkernel/intern/particleset.c
===
--- branches/particles-2010/source/blender/blenkernel/intern/particleset.c  
2010-07-07 07:24:09 UTC (rev 30070)
+++ branches/particles-2010/source/blender/blenkernel/intern/particleset.c  
2010-07-07 08:10:43 UTC (rev 30071)
@@ -25,22 +25,488 @@
  * * END GPL LICENSE BLOCK *
  */
 
+#include DNA_object_types.h
 #include DNA_particleset_types.h
 
 #include MEM_guardedalloc.h
 
+#include BLI_math.h
+
+#include BKE_animsys.h
+#include BKE_global.h
+#include BKE_library.h
+#include BKE_main.h
 #include BKE_particleset.h
+#include BKE_utildefines.h
 
+/* attribute management */
+/* TODO */
+
+int pset_get_particle_size(ParticleSet *pset)
+{
+   return sizeof(Particle);
+}
+
+/* buffer management */
+static void init_particle(ParticleSet *pset, Particle *pa)
+{
+   pa-birthtime = 0.0f;
+   zero_v3(pa-loc);
+   zero_v3(pa-vel);
+}
+
+static void init_page(ParticleSet *pset, ParticlePage *page, int page_size)
+{
+   Particle *pa;
+   int psize= 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30072] branches/particles-2010/source/ blender: Ported back particle nodes basics.

2010-07-07 Thread Lukas Toenne
Revision: 30072
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30072
Author:   lukastoenne
Date: 2010-07-07 11:29:11 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Ported back particle nodes basics. Also includes node tree info structs and 
execution code split-off.

Modified Paths:
--
branches/particles-2010/source/blender/blenkernel/BKE_node.h
branches/particles-2010/source/blender/blenkernel/intern/node.c
branches/particles-2010/source/blender/editors/include/ED_node.h
branches/particles-2010/source/blender/editors/space_node/drawnode.c
branches/particles-2010/source/blender/editors/space_node/node_draw.c
branches/particles-2010/source/blender/editors/space_node/node_edit.c
branches/particles-2010/source/blender/editors/space_node/node_header.c
branches/particles-2010/source/blender/editors/space_node/space_node.c
branches/particles-2010/source/blender/makesdna/DNA_node_types.h
branches/particles-2010/source/blender/makesrna/intern/rna_nodetree.c
branches/particles-2010/source/blender/makesrna/intern/rna_nodetree_types.h
branches/particles-2010/source/blender/makesrna/intern/rna_space.c
branches/particles-2010/source/blender/nodes/CMakeLists.txt
branches/particles-2010/source/blender/nodes/intern/CMP_util.h
branches/particles-2010/source/blender/nodes/intern/SHD_util.h
branches/particles-2010/source/blender/nodes/intern/TEX_util.h
branches/particles-2010/source/blender/nodes/intern/node_util.c
branches/particles-2010/source/blender/nodes/intern/node_util.h

Added Paths:
---
branches/particles-2010/source/blender/nodes/PAR_node.h
branches/particles-2010/source/blender/nodes/intern/PAR_nodes/
branches/particles-2010/source/blender/nodes/intern/PAR_util.c
branches/particles-2010/source/blender/nodes/intern/PAR_util.h
branches/particles-2010/source/blender/nodes/intern/node_tree_composite.c
branches/particles-2010/source/blender/nodes/intern/node_tree_particles.c
branches/particles-2010/source/blender/nodes/intern/node_tree_shader.c
branches/particles-2010/source/blender/nodes/intern/node_tree_texture.c

Modified: branches/particles-2010/source/blender/blenkernel/BKE_node.h
===
--- branches/particles-2010/source/blender/blenkernel/BKE_node.h
2010-07-07 08:10:43 UTC (rev 30071)
+++ branches/particles-2010/source/blender/blenkernel/BKE_node.h
2010-07-07 09:29:11 UTC (rev 30072)
@@ -33,6 +33,8 @@
 #ifndef BKE_NODE_H
 #define BKE_NODE_H
 
+#include DNA_listBase.h
+
 /* not very important, but the stack solver likes to know a maximum */
 #define MAX_SOCKET 64
 
@@ -44,14 +46,16 @@
 struct bNodeStack;
 struct uiLayout;
 struct rctf;
-struct ListBase;
 struct RenderData;
 struct Scene;
 struct Main;
 struct Tex;
+struct MTex;
 struct GPUMaterial;
 struct GPUNode;
 struct GPUNodeStack;
+struct ParticleSimulationData;
+struct ParticleSystem;
 struct PointerRNA;
 struct bContext;
 
@@ -64,7 +68,7 @@
float min, max; /* default range for 
inputs */

/* after this line is used internal only */
-   struct bNodeSocket *sock;   /* used during verify_types */
+   struct ListBase verified;   /* used during 
verify_types */
struct bNodeSocket *internsock; /* group nodes, the internal socket 
counterpart */
int own_index;  /* verify group nodes */

@@ -91,7 +95,7 @@
void (*copystoragefunc)(struct bNode *, struct bNode *);

/* for use with dynamic typedefs */
-   ID *id;
+   struct ID *id;
void *pynode; /* holds pointer to python script */
void *pydict; /* holds pointer to python script dictionary (scope)*/
 
@@ -100,6 +104,23 @@
 
 } bNodeType;
 
+typedef void (*bNodeTreeCallback)(void *calldata, struct ID *owner_id, struct 
bNodeTree *ntree);
+typedef struct bNodeTreeTypeInfo
+{
+   int type;   /* type 
identifier */
+   char id_name[24];   /* id name for RNA 
identification */
+   
+   ListBase node_types;/* type definitions */
+   
+   /* callbacks */
+   void (*freeCache)(struct bNodeTree *ntree);
+   void (*freeNodeCache)(struct bNodeTree *ntree, struct bNode *node);
+   void (*foreachNodeTree)(void *calldata, bNodeTreeCallback func);
/* iteration over all node trees */
+   void (*beginExec)(struct bNodeTree *ntree);
+   void (*endExec)(struct bNodeTree *ntree);
+   void (*exec)(struct bNodeTree *ntree, void *callerdata, int thread);
+} bNodeTreeTypeInfo;
+
 /* node-exec, now in use for composites (#define for break is same as ready 
yes) */
 #define NODE_PROCESSING1
 #define NODE_READY 2

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30073] branches/render25/source/blender/ render/intern: Render Branch: code to check if ao/env/ indirect should be computed

2010-07-07 Thread Brecht Van Lommel
Revision: 30073
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30073
Author:   blendix
Date: 2010-07-07 13:13:34 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Render Branch: code to check if ao/env/indirect should be computed
was confusing and wrong in a few cases, with shadeless, ambient,
passes, etc, now added a single function for it.

Modified Paths:
--
branches/render25/source/blender/render/intern/include/material.h
branches/render25/source/blender/render/intern/include/shading.h
branches/render25/source/blender/render/intern/source/bake.c
branches/render25/source/blender/render/intern/source/cache.c
branches/render25/source/blender/render/intern/source/material.c
branches/render25/source/blender/render/intern/source/shadeoutput.c

Modified: branches/render25/source/blender/render/intern/include/material.h
===
--- branches/render25/source/blender/render/intern/include/material.h   
2010-07-07 09:29:11 UTC (rev 30072)
+++ branches/render25/source/blender/render/intern/include/material.h   
2010-07-07 11:13:34 UTC (rev 30073)
@@ -80,5 +80,9 @@
 
 void mat_displacement(struct Render *re, struct ShadeInput *shi, float 
displacement[3]);
 
+/* Queries */
+
+int mat_need_ao_env_indirect(struct Render *re, struct ShadeInput *shi);
+
 #endif /* __RENDER_MATERIAL_H__ */
 

Modified: branches/render25/source/blender/render/intern/include/shading.h
===
--- branches/render25/source/blender/render/intern/include/shading.h
2010-07-07 09:29:11 UTC (rev 30072)
+++ branches/render25/source/blender/render/intern/include/shading.h
2010-07-07 11:13:34 UTC (rev 30073)
@@ -103,7 +103,7 @@
 /* Utilities */
 void environment_lighting_apply(struct Render *re, struct ShadeInput *shi, 
struct ShadeResult *shr);
 
-void ambient_occlusion(struct Render *re, struct ShadeInput *shi);
+void shade_ao_env_indirect(struct Render *re, struct ShadeInput *shi);
 float fresnel_fac(float *view, float *vn, float fresnel, float fac);
 void shade_ray(struct Render *re, struct Isect *is, struct ShadeInput *shi, 
struct ShadeResult *shr);
 

Modified: branches/render25/source/blender/render/intern/source/bake.c
===
--- branches/render25/source/blender/render/intern/source/bake.c
2010-07-07 09:29:11 UTC (rev 30072)
+++ branches/render25/source/blender/render/intern/source/bake.c
2010-07-07 11:13:34 UTC (rev 30073)
@@ -196,7 +196,7 @@
VlakRen *vlr= shi-primitive.vlr;

if(bs-type==RE_BAKE_AO) {
-   ambient_occlusion(re, shi);
+   shade_ao_env_indirect(re, shi);
 
if(re-params.r.bake_flag  R_BAKE_NORMALIZE) {
copy_v3_v3(shr.combined, shi-shading.ao);

Modified: branches/render25/source/blender/render/intern/source/cache.c
===
--- branches/render25/source/blender/render/intern/source/cache.c   
2010-07-07 09:29:11 UTC (rev 30072)
+++ branches/render25/source/blender/render/intern/source/cache.c   
2010-07-07 11:13:34 UTC (rev 30073)
@@ -51,14 +51,12 @@
 
 / Utilities **/
 
-static int mat_need_cache(Render *re, Material *ma)
+static int mat_need_cache(Render *re, ShadeInput *shi)
 {
-   if(ma-mode  MA_SHLESS)
+   if(!mat_need_ao_env_indirect(re, shi))
return 0;
-   else if(ma-amb == 0.0f  !(ma-mapto  MAP_AMB))
+   else if(!re-db.sss_pass  mat_has_only_sss(shi-material.mat))
return 0;
-   else if(!re-db.sss_pass  mat_has_only_sss(ma))
-   return 0;

return 1;
 }
@@ -227,7 +225,7 @@
shade_samples_from_pixel(re, ssamp, row[0], x, y);
 
shi= ssamp-shi;
-   if(shi-primitive.vlr  mat_need_cache(re, 
shi-material.mat)) {
+   if(shi-primitive.vlr  mat_need_cache(re, shi)) {
disk_occlusion_sample_direct(re, shi);
 
copy_v3_v3(sample-co, shi-geometry.co);
@@ -1117,7 +1115,7 @@
float *indirect= 
(re-db.wrld.mode  WO_INDIRECT_LIGHT)? shi-shading.indirect: NULL;
int added;
 
-   if(!mat_need_cache(re, 
shi-material.mat))
+   if(!mat_need_cache(re, shi))
continue;
 
if(shi-primitive.strand) {

Modified: branches/render25/source/blender/render/intern/source/material.c

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30074] branches/soc-2010-aligorith-2: Bullet SoC - Assorted work on constraints

2010-07-07 Thread Joshua Leung
Revision: 30074
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30074
Author:   aligorith
Date: 2010-07-07 14:29:53 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Bullet SoC - Assorted work on constraints

* Silenced warning in console about Rigid Body Joint constraint
* Started implementing RigidBody constraints API (Bullet side). Still have to 
determine best way to setup most of the constraints...

Modified Paths:
--

branches/soc-2010-aligorith-2/release/scripts/ui/properties_object_constraint.py

branches/soc-2010-aligorith-2/source/blender/makesrna/intern/rna_constraint.c
branches/soc-2010-aligorith-2/source/blender/rigidbody/RBI_api.h
branches/soc-2010-aligorith-2/source/blender/rigidbody/rb_bullet_api.cpp

Modified: 
branches/soc-2010-aligorith-2/release/scripts/ui/properties_object_constraint.py
===
--- 
branches/soc-2010-aligorith-2/release/scripts/ui/properties_object_constraint.py
2010-07-07 11:13:34 UTC (rev 30073)
+++ 
branches/soc-2010-aligorith-2/release/scripts/ui/properties_object_constraint.py
2010-07-07 12:29:53 UTC (rev 30074)
@@ -580,7 +580,7 @@
 self.space_template(layout, con, wide_ui)
 
 def RIGID_BODY_JOINT(self, context, layout, con, wide_ui):
-self.target_template(layout, con, wide_ui)
+self.target_template(layout, con, wide_ui, subtargets=False)
 
 if wide_ui:
 layout.prop(con, pivot_type)

Modified: 
branches/soc-2010-aligorith-2/source/blender/makesrna/intern/rna_constraint.c
===
--- 
branches/soc-2010-aligorith-2/source/blender/makesrna/intern/rna_constraint.c   
2010-07-07 11:13:34 UTC (rev 30073)
+++ 
branches/soc-2010-aligorith-2/source/blender/makesrna/intern/rna_constraint.c   
2010-07-07 12:29:53 UTC (rev 30074)
@@ -1187,7 +1187,8 @@
srna= RNA_def_struct(brna, RigidBodyJointConstraint, Constraint);
RNA_def_struct_ui_text(srna, Rigid Body Joint Constraint, For use 
with the Game Engine);
RNA_def_struct_sdna_from(srna, bRigidBodyJointConstraint, data);
-
+   
+   // xxx: wtf is this used for?
prop= RNA_def_property(srna, target, PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, tar);
RNA_def_property_ui_text(prop, Target, Target Object);

Modified: branches/soc-2010-aligorith-2/source/blender/rigidbody/RBI_api.h
===
--- branches/soc-2010-aligorith-2/source/blender/rigidbody/RBI_api.h
2010-07-07 11:13:34 UTC (rev 30073)
+++ branches/soc-2010-aligorith-2/source/blender/rigidbody/RBI_api.h
2010-07-07 12:29:53 UTC (rev 30074)
@@ -59,8 +59,8 @@
 /* Collision Shape */
 typedef struct _rbCollisionShape rbCollisionShape;
 
-/* Motion States */
-// XXX: Bullet only?
+/* Constraint */
+typedef struct _rbConstraint rbConstraint;
 
 /* ** */
 /* Dynamics World Methods */
@@ -194,6 +194,7 @@
 
 /* Setup (Special Shapes)  */
 
+/* Convex Hull */
 extern rbCollisionShape *rbShapeNewConvexHull();
 extern void rbShapeAddVert(rbCollisionShape *cshape, const float co[3]);
 
@@ -203,11 +204,31 @@
 
 /* Settings --- */
 
+/* Collision Margin */
 extern float rbShapeGetMargin(rbCollisionShape *cshape);
 extern void rbShapeSetMargin(rbCollisionShape *cshape, float value);
 
 /* ** */
+/* Constraints */
 
+/* Setup - */
+
+/* Add Rigid Body Constraint to simulation world */
+extern void rbDWorldAddConstraint(rbDynamicsWorld *world, rbConstraint *con);
+
+/* Remove Rigid Body Constraint from simulation world */
+extern void rbDWorldRemoveConstraint(rbDynamicsWorld *world, rbConstraint 
*con);
+
+/*  */
+
+/* Cleanup --- */
+
+extern void rbConstraintDelete(rbConstraint *con);
+
+/* Settings --- */
+
+/* ** */
+
 #ifdef __cplusplus
 }
 #endif

Modified: 
branches/soc-2010-aligorith-2/source/blender/rigidbody/rb_bullet_api.cpp
===
--- branches/soc-2010-aligorith-2/source/blender/rigidbody/rb_bullet_api.cpp
2010-07-07 11:13:34 UTC (rev 30073)
+++ branches/soc-2010-aligorith-2/source/blender/rigidbody/rb_bullet_api.cpp
2010-07-07 12:29:53 UTC (rev 30074)
@@ -243,6 +243,15 @@
 void rbBodyDelete(rbRigidBody *object)
 {
btRigidBody *body = reinterpret_castbtRigidBody*(object);
+   
+   /* motion state */
+   btMotionState *ms = body-getMotionState();
+   if (ms)
+   btAlignedFree(ms);
+   
+   /* collision shape is done elsewhere... */
+   
+   /* body itself */
btAlignedFree(body);
 }
 
@@ -537,3 +546,38 @@
 }
 
 /* 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30075] trunk/blender/release/windows/ installer/00.sconsblender.nsi: === Windows Installer ===

2010-07-07 Thread Nathan Letwory
Revision: 30075
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30075
Author:   jesterking
Date: 2010-07-07 14:46:39 +0200 (Wed, 07 Jul 2010)

Log Message:
---
=== Windows Installer ===
* have nice image also in uninstaller
* ensure we can remove start menu links

Modified Paths:
--
trunk/blender/release/windows/installer/00.sconsblender.nsi

Modified: trunk/blender/release/windows/installer/00.sconsblender.nsi
===
--- trunk/blender/release/windows/installer/00.sconsblender.nsi 2010-07-07 
12:29:53 UTC (rev 30074)
+++ trunk/blender/release/windows/installer/00.sconsblender.nsi 2010-07-07 
12:46:39 UTC (rev 30075)
@@ -25,6 +25,7 @@
 !define MUI_COMPONENTSPAGE_SMALLDESC
 !define MUI_FINISHPAGE_RUN $INSTDIR\blender.exe
 !define MUI_CHECKBITMAP [RELDIR]\00.checked.bmp
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP [RELDIR]\01.installer.bmp
 
 !insertmacro MUI_PAGE_WELCOME
 !insertmacro MUI_PAGE_LICENSE [DISTDIR]\Copyright.txt
@@ -86,6 +87,7 @@
 Var HWND_HOMEDIR
 
 Function .onInit
+  ClearErrors
   StrCpy $SHORTVERSION [SHORTVERSION]
 FunctionEnd
 
@@ -162,7 +164,7 @@
 SectionEnd
 
 Section Add Start Menu shortcuts Section2
-  SetOutPath $INSTDIR
+  SetShellVarContext all
   CreateDirectory $SMPROGRAMS\Blender Foundation\Blender\
   CreateShortCut $SMPROGRAMS\Blender Foundation\Blender\Uninstall.lnk 
$INSTDIR\uninstall.exe  $INSTDIR\uninstall.exe 0
   CreateShortCut $SMPROGRAMS\Blender Foundation\Blender\Blender.lnk 
$INSTDIR\Blender.exe  $INSTDIR\blender.exe 0
@@ -173,14 +175,10 @@
 SectionEnd
 
 Section Add Desktop Blender-[VERSION] shortcut Section3
-  SetOutPath $INSTDIR
   CreateShortCut $DESKTOP\Blender.lnk $INSTDIR\blender.exe  
$INSTDIR\blender.exe 0
 SectionEnd
 
 Section Open .blend files with Blender-[VERSION] Section4
-  SetOutPath $INSTDIR
-  ;ExecShell open '$INSTDIR\blender.exe' -R -b
-  ;do it the manual way! ;)
   
   WriteRegStr HKCR .blend  blendfile
   WriteRegStr HKCR blendfile  Blender .blend File
@@ -199,6 +197,10 @@
   ReadRegStr $SHORTVERSION HKLM SOFTWARE\BlenderFoundation ShortVersion
   DeleteRegKey HKLM 
Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender
   DeleteRegKey HKLM SOFTWARE\BlenderFoundation
+  SetShellVarContext all
+
+  StrCpy $0 $SMPROGRAMS\Blender Foundation\
+  MessageBox MB_OK $0
   ; remove files
   [DELROOTDIRCONTS]
 
@@ -208,10 +210,9 @@
   RMDir /r $BLENDERHOME
 Next:
   ; remove shortcuts, if any.
-  Delete $SMPROGRAMS\Blender Foundation\Blender\*.*
   Delete $DESKTOP\Blender.lnk
   ; remove all link related directories and files
-  RMDir /r $SMPROGRAMS\Blender Foundation
+  RMDir /r $SMPROGRAMS\Blender Foundation\
   ; remove entire installation directory, including any file created by the 
user
   RMDir /r $INSTDIR
 SectionEnd


___
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 [30076] trunk/blender/release/windows/inno /: remove unused files.

2010-07-07 Thread Nathan Letwory
Revision: 30076
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30076
Author:   jesterking
Date: 2010-07-07 14:50:24 +0200 (Wed, 07 Jul 2010)

Log Message:
---
remove unused files.

Removed Paths:
-
trunk/blender/release/windows/inno/


___
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 [30077] trunk/blender/source/blender/ blenkernel/intern/sequencer.c: dont swap strip names when swapping strips, means they keep their fcurves

2010-07-07 Thread Campbell Barton
Revision: 30077
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30077
Author:   campbellbarton
Date: 2010-07-07 15:14:51 +0200 (Wed, 07 Jul 2010)

Log Message:
---
dont swap strip names when swapping strips, means they keep their fcurves

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/sequencer.c

Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c
===
--- trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
12:50:24 UTC (rev 30076)
+++ trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
13:14:51 UTC (rev 30077)
@@ -3799,6 +3799,8 @@
 
 int seq_swap(Sequence *seq_a, Sequence *seq_b)
 {
+   char name[sizeof(seq_a-name)];
+
if(seq_a-len != seq_b-len)
return 0;
 
@@ -3807,12 +3809,33 @@
if(seq_a-type == SEQ_SOUND || seq_b-type == SEQ_SOUND) {
return 0;
}
+
+   /* disallow effects to swap with non-effects strips */
+   if((seq_a-type  SEQ_EFFECT) != (seq_b-type  SEQ_EFFECT)) {
+   return 0;
+   }
+
+   if((seq_a-type  SEQ_EFFECT)  (seq_b-type  SEQ_EFFECT)) {
+   if(get_sequence_effect_num_inputs(seq_a-type) != 
get_sequence_effect_num_inputs(seq_b-type)) {
+   return 0;
+   }
+   }
}
 
SWAP(Sequence, *seq_a, *seq_b);
+
+   /* swap back names so animation fcurves dont get swapped */
+   strcpy(name, seq_a-name+2);
+   strcpy(seq_a-name+2, seq_b-name+2);
+   strcpy(seq_b-name+2, name);
+
+   /* swap back opacity, and overlay mode */
+   SWAP(int, seq_a-blend_mode, seq_b-blend_mode);
+   SWAP(float, seq_a-blend_opacity, seq_b-blend_opacity);
+
+
SWAP(void *, seq_a-prev, seq_b-prev);
SWAP(void *, seq_a-next, seq_b-next);
-
SWAP(int, seq_a-start, seq_b-start);
SWAP(int, seq_a-startofs, seq_b-startofs);
SWAP(int, seq_a-endofs, seq_b-endofs);


___
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 [30078] trunk/blender/source/blender: Constraint UI:

2010-07-07 Thread Thomas Dinges
Revision: 30078
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30078
Author:   dingto
Date: 2010-07-07 16:10:41 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Constraint UI:
* Some code cleaning.
* Removed icon and emboss for the enabled bool, use default checkbox now. 

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_templates.c
trunk/blender/source/blender/makesrna/intern/rna_constraint.c

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===
--- trunk/blender/source/blender/editors/interface/interface_templates.c
2010-07-07 13:14:51 UTC (rev 30077)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c
2010-07-07 14:10:41 UTC (rev 30078)
@@ -953,7 +953,7 @@
bPoseChannel *pchan= get_active_posechannel(ob);
bConstraintTypeInfo *cti;
uiBlock *block;
-   uiLayout *result= NULL, *col, *col1, *col2, *box, *row, *subrow, *split;
+   uiLayout *result= NULL, *col, *box, *row, *subrow;
PointerRNA ptr;
char typestr[32];
short proxy_protected, xco=0, yco=0;
@@ -988,37 +988,30 @@
uiLayoutSetContextPointer(col, constraint, ptr);
 
box= uiLayoutBox(col);
-   split = uiLayoutSplit(box, 0.35, 0);
-   
-   col1= uiLayoutColumn(split, 0);
-   col2= uiLayoutColumn(split, 0);
-   row = uiLayoutRow(col1, 0);
-   subrow = uiLayoutRow(col2, 0);
-
+   row = uiLayoutRow(box, 0);
block= uiLayoutGetBlock(box);
 
/* Draw constraint header */
-   uiBlockSetEmboss(block, UI_EMBOSSN);

/* rounded header */
rb_col= (con-flag  CONSTRAINT_ACTIVE)?50:20;
-   
+
/* open/close */
+   uiBlockSetEmboss(block, UI_EMBOSSN);
uiItemR(row, ptr, expanded, UI_ITEM_R_ICON_ONLY, , 0);
-   
-   /* name */  
uiBlockSetEmboss(block, UI_EMBOSS);

/* XXX if (con-flag  CONSTRAINT_DISABLE)
uiBlockSetCol(block, TH_REDALERT);*/

+   /* name */
uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 
18, NULL, 0.0, 0.0, 0.0, 0.0, ); 
 
if(proxy_protected == 0) {
-   uiItemR(subrow, ptr, name, 0, , 0);
+   uiItemR(row, ptr, name, 0, , 0);
}
else
-   uiItemL(subrow, con-name, 0);
+   uiItemL(row, con-name, 0);

/* proxy-protected constraints cannot be edited, so hide up/down + 
close buttons */
if (proxy_protected) {
@@ -1052,47 +1045,44 @@

show_upbut= ((prev_proxylock == 0)  (con-prev));
show_downbut= (con-next) ? 1 : 0;
-   
-   uiLayoutSetOperatorContext(subrow, WM_OP_INVOKE_DEFAULT);
-   
-   if (compact) {
-   /* Draw Delete Button in first row, before splitting 
*/
-   uiBlockSetEmboss(block, UI_EMBOSSN);
-   uiItemO(subrow, , ICON_X, CONSTRAINT_OT_delete);
-   uiBlockSetEmboss(block, UI_EMBOSS);
 
-   subrow = uiLayoutRow(col2, 0);
+   /* Code for compact Constraint UI */
+   if (compact) {
+   subrow = uiLayoutRow(box, 0);
}
+   else {
+   subrow = row;
+   }

+   uiLayoutSetOperatorContext(subrow, WM_OP_INVOKE_DEFAULT);
+   
+   /* up/down */
if (show_upbut || show_downbut) {
uiBlockBeginAlign(block);
-   uiBlockSetEmboss(block, UI_EMBOSS);
+   if (show_upbut)
+   uiItemO(subrow, , ICON_TRIA_UP, 
CONSTRAINT_OT_move_up);

-   if (show_upbut)
-   uiItemO(subrow, , ICON_TRIA_UP, 
CONSTRAINT_OT_move_up);
-   
-   if (show_downbut)
-   uiItemO(subrow, , ICON_TRIA_DOWN, 
CONSTRAINT_OT_move_down);
+   if (show_downbut)
+   uiItemO(subrow, , ICON_TRIA_DOWN, 
CONSTRAINT_OT_move_down);
uiBlockEndAlign(block);
}
-   
+   
+   /* enabled */
+   uiItemR(subrow, ptr, enabled, 0, , 0);
+   
+   uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT);
+   
/* Close 'button' - emboss calls here disable drawing of 
'button' behind X */
uiBlockSetEmboss(block, UI_EMBOSSN);
-   uiItemR(subrow, ptr, enabled, 0, , 0);
-   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30079] trunk/blender/source/blender: Fix #22354, #22727, #22501: image window not display correct

2010-07-07 Thread Brecht Van Lommel
Revision: 30079
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30079
Author:   blendix
Date: 2010-07-07 16:28:22 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Fix #22354, #22727, #22501: image window not display correct
renders with compositing and slots.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/image.c
trunk/blender/source/blender/render/extern/include/RE_pipeline.h
trunk/blender/source/blender/render/intern/source/pipeline.c

Modified: trunk/blender/source/blender/blenkernel/intern/image.c
===
--- trunk/blender/source/blender/blenkernel/intern/image.c  2010-07-07 
14:10:41 UTC (rev 30078)
+++ trunk/blender/source/blender/blenkernel/intern/image.c  2010-07-07 
14:28:22 UTC (rev 30079)
@@ -1827,10 +1827,13 @@
layer= (iuser)? iuser-layer: 0;
pass= (iuser)? iuser-pass: 0;
 
-   if(from_render)
+   if(from_render) {
RE_AcquireResultImage(re, rres);
-   else if(ima-renders[ima-render_slot])
+   }
+   else if(ima-renders[ima-render_slot]) {
rres= *(ima-renders[ima-render_slot]);
+   rres.have_combined= rres.rectf != NULL;
+   }
else
memset(rres, 0, sizeof(RenderResult));

@@ -1852,10 +1855,10 @@
rectz= rres.rectz;
dither= iuser-scene-r.dither_intensity;
 
-   /* get compo/seq result by default */
-   if(rres.compo_seq  layer==0);
+   /* combined layer gets added as first layer */
+   if(rres.have_combined  layer==0);
else if(rres.layers.first) {
-   RenderLayer *rl= BLI_findlink(rres.layers, 
layer-(rres.compo_seq?1:0));
+   RenderLayer *rl= BLI_findlink(rres.layers, 
layer-(rres.have_combined?1:0));
if(rl) {
RenderPass *rpass;
 

Modified: trunk/blender/source/blender/render/extern/include/RE_pipeline.h
===
--- trunk/blender/source/blender/render/extern/include/RE_pipeline.h
2010-07-07 14:10:41 UTC (rev 30078)
+++ trunk/blender/source/blender/render/extern/include/RE_pipeline.h
2010-07-07 14:28:22 UTC (rev 30079)
@@ -130,8 +130,8 @@
/* for render results in Image, verify validity for sequences */
int framenr;
 
-   /* for acquire image, to indicate if it is compo/seq result */
-   int compo_seq;
+   /* for acquire image, to indicate if it there is a combined layer */
+   int have_combined;
 
/* render info text */
char *text;

Modified: trunk/blender/source/blender/render/intern/source/pipeline.c
===
--- trunk/blender/source/blender/render/intern/source/pipeline.c
2010-07-07 14:10:41 UTC (rev 30078)
+++ trunk/blender/source/blender/render/intern/source/pipeline.c
2010-07-07 14:28:22 UTC (rev 30079)
@@ -1085,7 +1085,7 @@
rr-rectz= RE_RenderLayerGetPass(rl, 
SCE_PASS_Z);   
}
 
-   rr-compo_seq= (rr-rectf != NULL);
+   rr-have_combined= (re-result-rectf != NULL);
rr-layers= re-result-layers;
}
}


___
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 [30080] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30031 :30079

2010-07-07 Thread Brecht Van Lommel
Revision: 30080
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30080
Author:   blendix
Date: 2010-07-07 16:52:55 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Render Branch: svn merge 
https://svn.blender.org/svnroot/bf-blender/trunk/blender -r30031:30079

Modified Paths:
--
branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/render25/intern/ghost/intern/GHOST_WindowCocoa.mm
branches/render25/release/scripts/ui/space_view3d.py
branches/render25/release/windows/installer/00.sconsblender.nsi
branches/render25/source/blender/blenkernel/BKE_sequencer.h
branches/render25/source/blender/blenkernel/intern/image.c
branches/render25/source/blender/blenkernel/intern/sequencer.c
branches/render25/source/blender/blenlib/BLI_path_util.h
branches/render25/source/blender/editors/interface/interface_handlers.c
branches/render25/source/blender/editors/interface/interface_templates.c
branches/render25/source/blender/editors/mesh/editmesh_tools.c
branches/render25/source/blender/editors/mesh/mesh_intern.h
branches/render25/source/blender/editors/mesh/mesh_ops.c
branches/render25/source/blender/editors/mesh/meshtools.c
branches/render25/source/blender/editors/screen/screen_context.c
branches/render25/source/blender/editors/space_view3d/drawobject.c
branches/render25/source/blender/editors/space_view3d/view3d_edit.c
branches/render25/source/blender/makesrna/intern/rna_constraint.c
branches/render25/source/blender/makesrna/intern/rna_sequencer.c
branches/render25/source/blender/makesrna/rna_cleanup/rna_cleaner.py
branches/render25/source/blender/render/extern/include/RE_pipeline.h
branches/render25/source/blender/render/intern/source/result.c

Removed Paths:
-
branches/render25/release/windows/inno/

Modified: branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp
===
--- branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-07-07 
14:28:22 UTC (rev 30079)
+++ branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-07-07 
14:52:55 UTC (rev 30080)
@@ -37,6 +37,14 @@
 #include GHOST_SystemWin32.h
 #include GHOST_EventDragnDrop.h
 
+#define WIN32_LEAN_AND_MEAN
+#ifdef _WIN32_IE
+#undef _WIN32_IE
+#endif
+#define _WIN32_IE 0x0501
+#include windows.h
+#include shlobj.h
+
 // win64 doesn't define GWL_USERDATA
 #ifdef WIN32
 #ifndef GWL_USERDATA
@@ -88,8 +96,6 @@
 #include GHOST_WindowWin32.h
 #include GHOST_NDOFManager.h
 
-#include shlobj.h
-
 // Key code values not found in winuser.h
 #ifndef VK_MINUS
 #define VK_MINUS 0xBD
@@ -1129,4 +1135,4 @@
}
 
return NULL;
-}
\ No newline at end of file
+}

Modified: branches/render25/intern/ghost/intern/GHOST_WindowCocoa.mm
===
--- branches/render25/intern/ghost/intern/GHOST_WindowCocoa.mm  2010-07-07 
14:28:22 UTC (rev 30079)
+++ branches/render25/intern/ghost/intern/GHOST_WindowCocoa.mm  2010-07-07 
14:52:55 UTC (rev 30080)
@@ -732,7 +732,7 @@
 #ifdef MAC_OS_X_VERSION_10_6
//10.6 provides Cocoa functions to autoshow 
menu bar, and to change a window style
//Hide menu  dock if needed
-   if ([[m_window screen] isEqual:[NSScreen 
mainScreen]])
+   if ([[m_window screen] isEqual:[[NSScreen 
screens] objectAtIndex:0]])
{
[NSApp 
setPresentationOptions:(NSApplicationPresentationHideDock | 
NSApplicationPresentationAutoHideMenuBar)];
}
@@ -743,7 +743,7 @@
 #else
//With 10.5, we need to create a new window to 
change its style to borderless
//Hide menu  dock if needed
-   if ([[m_window screen] isEqual:[NSScreen 
mainScreen]])
+   if ([[m_window screen] isEqual:[[NSScreen 
screens] objectAtIndex:0]])
{
//Cocoa function in 10.5 does not allow 
to set the menu bar in auto-show mode [NSMenu setMenuBarVisible:NO];
//One of the very few 64bit compatible 
Carbon function

Modified: branches/render25/release/scripts/ui/space_view3d.py
===
--- branches/render25/release/scripts/ui/space_view3d.py2010-07-07 
14:28:22 UTC (rev 30079)
+++ branches/render25/release/scripts/ui/space_view3d.py2010-07-07 
14:52:55 UTC (rev 30080)
@@ -1550,6 +1550,7 @@
 layout.operator(mesh.fill)
 layout.operator(mesh.beautify_fill)
 layout.operator(mesh.solidify)
+layout.operator(mesh.sort_faces)
 
 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30081] trunk/blender/source/blender: fix for numeric problems for color balance in the sequencer ( same check as in compositor).

2010-07-07 Thread Campbell Barton
Revision: 30081
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30081
Author:   campbellbarton
Date: 2010-07-07 17:06:57 +0200 (Wed, 07 Jul 2010)

Log Message:
---
fix for numeric problems for color balance in the sequencer (same check as in 
compositor).
for optimized builds this gave crazy colors.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/sequencer.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c

Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c
===
--- trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
14:52:55 UTC (rev 30080)
+++ trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
15:06:57 UTC (rev 30081)
@@ -1536,9 +1536,14 @@
 }
 
 /* note: lift is actually 2-lift */
-MINLINE float color_balance_fl(float v, const float lift, const float gain, 
const float gamma, const float mul)
+MINLINE float color_balance_fl(float in, const float lift, const float gain, 
const float gamma, const float mul)
 {
-   return powfv - 1.0f) * lift) + 1.0f) * gain, gamma) * mul;
+   float x= (((in - 1.0f) * lift) + 1.0f) * gain;
+
+   /* prevent NaN */
+   if (x  0.f) x = 0.f;
+
+   return powf(x, gamma) * mul;
 }
 
 static void make_cb_table_byte(float lift, float gain, float gamma,

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2010-07-07 14:52:55 UTC (rev 30080)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2010-07-07 15:06:57 UTC (rev 30081)
@@ -369,17 +369,17 @@
 {
float x1, x2, y1, y2, pixely, a;
char col[3], blendcol[3];
-   View2D *v2d;
+   View2D *v2d= sseq-v2d;

if(seq-type = SEQ_EFFECT) return;
+   if(v2d-mask.ymax == v2d-mask.ymin) return; /* avoid divide by zero */
 
x1= seq-startdisp;
x2= seq-enddisp;

y1= seq-machine+SEQ_STRIP_OFSBOTTOM;
y2= seq-machine+SEQ_STRIP_OFSTOP;
-   
-   v2d = sseq-v2d;
+
pixely = (v2d-cur.ymax - v2d-cur.ymin)/(v2d-mask.ymax - 
v2d-mask.ymin);

blendcol[0] = blendcol[1] = blendcol[2] = 120;


___
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 [30082] branches/render25/source/blender: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/ blender -r30079:30081

2010-07-07 Thread Campbell Barton
Revision: 30082
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30082
Author:   campbellbarton
Date: 2010-07-07 17:09:35 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Render Branch: svn merge 
https://svn.blender.org/svnroot/bf-blender/trunk/blender  -r30079:30081

Modified Paths:
--
branches/render25/source/blender/blenkernel/intern/sequencer.c
branches/render25/source/blender/editors/space_sequencer/sequencer_draw.c

Modified: branches/render25/source/blender/blenkernel/intern/sequencer.c
===
--- branches/render25/source/blender/blenkernel/intern/sequencer.c  
2010-07-07 15:06:57 UTC (rev 30081)
+++ branches/render25/source/blender/blenkernel/intern/sequencer.c  
2010-07-07 15:09:35 UTC (rev 30082)
@@ -1536,9 +1536,14 @@
 }
 
 /* note: lift is actually 2-lift */
-MINLINE float color_balance_fl(float v, const float lift, const float gain, 
const float gamma, const float mul)
+MINLINE float color_balance_fl(float in, const float lift, const float gain, 
const float gamma, const float mul)
 {
-   return powfv - 1.0f) * lift) + 1.0f) * gain, gamma) * mul;
+   float x= (((in - 1.0f) * lift) + 1.0f) * gain;
+
+   /* prevent NaN */
+   if (x  0.f) x = 0.f;
+
+   return powf(x, gamma) * mul;
 }
 
 static void make_cb_table_byte(float lift, float gain, float gamma,

Modified: 
branches/render25/source/blender/editors/space_sequencer/sequencer_draw.c
===
--- branches/render25/source/blender/editors/space_sequencer/sequencer_draw.c   
2010-07-07 15:06:57 UTC (rev 30081)
+++ branches/render25/source/blender/editors/space_sequencer/sequencer_draw.c   
2010-07-07 15:09:35 UTC (rev 30082)
@@ -369,17 +369,17 @@
 {
float x1, x2, y1, y2, pixely, a;
char col[3], blendcol[3];
-   View2D *v2d;
+   View2D *v2d= sseq-v2d;

if(seq-type = SEQ_EFFECT) return;
+   if(v2d-mask.ymax == v2d-mask.ymin) return; /* avoid divide by zero */
 
x1= seq-startdisp;
x2= seq-enddisp;

y1= seq-machine+SEQ_STRIP_OFSBOTTOM;
y2= seq-machine+SEQ_STRIP_OFSTOP;
-   
-   v2d = sseq-v2d;
+
pixely = (v2d-cur.ymax - v2d-cur.ymin)/(v2d-mask.ymax - 
v2d-mask.ymin);

blendcol[0] = blendcol[1] = blendcol[2] = 120;


___
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 [30083] trunk/blender: Fix #22219: compile error with videotexture/libavutil and recent gcc,

2010-07-07 Thread Brecht Van Lommel
Revision: 30083
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30083
Author:   blendix
Date: 2010-07-07 17:24:06 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Fix #22219: compile error with videotexture/libavutil and recent gcc,
need __STDC_CONSTANT_MACROS defined.

Modified Paths:
--
trunk/blender/CMakeLists.txt
trunk/blender/config/linux2-config.py

Modified: trunk/blender/CMakeLists.txt
===
--- trunk/blender/CMakeLists.txt2010-07-07 15:09:35 UTC (rev 30082)
+++ trunk/blender/CMakeLists.txt2010-07-07 15:24:06 UTC (rev 30083)
@@ -261,6 +261,7 @@
SET(FFMPEG_INC ${FFMPEG}/include)
SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE 
STRING FFMPEG Libraries)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+   SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} 
-D__STDC_CONSTANT_MACROS)
ENDIF(WITH_FFMPEG)
 
IF(WITH_FFTW3)
@@ -736,6 +737,7 @@
SET(FFMPEG_INC ${FFMPEG}/include)
SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale 
x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+   SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} 
-D__STDC_CONSTANT_MACROS)
ENDIF(WITH_FFMPEG)
 
SET(LIBSAMPLERATE ${LIBDIR}/samplerate)

Modified: trunk/blender/config/linux2-config.py
===
--- trunk/blender/config/linux2-config.py   2010-07-07 15:09:35 UTC (rev 
30082)
+++ trunk/blender/config/linux2-config.py   2010-07-07 15:24:06 UTC (rev 
30083)
@@ -181,6 +181,9 @@
 
 CPPFLAGS = []
 CXXFLAGS = 
['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE',
 '-D_FILE_OFFSET_BITS=64']
+if WITH_BF_FFMPEG:
+  # libavutil needs UINT64_C()
+  CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
 REL_CFLAGS = ['-O2']
 REL_CCFLAGS = ['-O2']
 ##BF_DEPEND = True


___
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 [30084] trunk/blender: Fix #22772: remove unnecessary -fpascal-strings flag on OS X, only

2010-07-07 Thread Brecht Van Lommel
Revision: 30084
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30084
Author:   blendix
Date: 2010-07-07 17:26:02 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Fix #22772: remove unnecessary -fpascal-strings flag on OS X, only
some debug code in webplugin needed it.

Modified Paths:
--
trunk/blender/config/darwin-config.py
trunk/blender/source/gameengine/GamePlayer/netscape/common/npmac.cpp
trunk/blender/source/gameengine/Rasterizer/Makefile
trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile
trunk/blender/source/nan_compile.mk

Modified: trunk/blender/config/darwin-config.py
===
--- trunk/blender/config/darwin-config.py   2010-07-07 15:24:06 UTC (rev 
30083)
+++ trunk/blender/config/darwin-config.py   2010-07-07 15:26:02 UTC (rev 
30084)
@@ -279,9 +279,9 @@
 
 CFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 
-CPPFLAGS = ['-fpascal-strings']+ARCH_FLAGS
-CCFLAGS = ['-pipe','-funsigned-char','-fpascal-strings']+ARCH_FLAGS
-CXXFLAGS = ['-pipe','-funsigned-char', '-fpascal-strings']+ARCH_FLAGS
+CPPFLAGS = []+ARCH_FLAGS
+CCFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
+CXXFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 
 if WITH_GHOST_COCOA==True:
PLATFORM_LINKFLAGS = 
['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS

Modified: trunk/blender/source/gameengine/GamePlayer/netscape/common/npmac.cpp
===
--- trunk/blender/source/gameengine/GamePlayer/netscape/common/npmac.cpp
2010-07-07 15:24:06 UTC (rev 30083)
+++ trunk/blender/source/gameengine/GamePlayer/netscape/common/npmac.cpp
2010-07-07 15:26:02 UTC (rev 30084)
@@ -85,7 +85,7 @@
 #define PLUGIN_TRACE 0
 
 #if PLUGIN_TRACE
-#define PLUGINDEBUGSTR(msg)::DebugStr(msg)
+#define PLUGINDEBUGSTR(msg)fprintf(stderr, msg)
 #else
 #define PLUGINDEBUGSTR
 #endif
@@ -293,7 +293,7 @@
 {
NPError err;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pInitialize;g;);
+   PLUGINDEBUGSTR(Initialize;g;);
err = NPP_Initialize();
ExitCodeResource();
return err;
@@ -302,7 +302,7 @@
 void Private_Shutdown(void)
 {
EnterCodeResource();
-   PLUGINDEBUGSTR(\pShutdown;g;);
+   PLUGINDEBUGSTR(Shutdown;g;);
NPP_Shutdown();
ExitCodeResource();
 }
@@ -312,7 +312,7 @@
 {
EnterCodeResource();
NPError ret = NPP_New(pluginType, instance, mode, argc, argn, argv, 
saved);
-   PLUGINDEBUGSTR(\pNew;g;);
+   PLUGINDEBUGSTR(New;g;);
ExitCodeResource();
return ret; 
 }
@@ -321,7 +321,7 @@
 {
NPError err;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pDestroy;g;);
+   PLUGINDEBUGSTR(Destroy;g;);
err = NPP_Destroy(instance, save);
ExitCodeResource();
return err;
@@ -331,7 +331,7 @@
 {
NPError err;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pSetWindow;g;);
+   PLUGINDEBUGSTR(SetWindow;g;);
err = NPP_SetWindow(instance, window);
ExitCodeResource();
return err;
@@ -341,7 +341,7 @@
 {
NPError err;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pNewStream;g;);
+   PLUGINDEBUGSTR(NewStream;g;);
err = NPP_NewStream(instance, type, stream, seekable, stype);
ExitCodeResource();
return err;
@@ -351,7 +351,7 @@
 {
int32 result;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pWriteReady;g;);
+   PLUGINDEBUGSTR(WriteReady;g;);
result = NPP_WriteReady(instance, stream);
ExitCodeResource();
return result;
@@ -361,7 +361,7 @@
 {
int32 result;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pWrite;g;);
+   PLUGINDEBUGSTR(Write;g;);
result = NPP_Write(instance, stream, offset, len, buffer);
ExitCodeResource();
return result;
@@ -370,7 +370,7 @@
 void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
 {
EnterCodeResource();
-   PLUGINDEBUGSTR(\pStreamAsFile;g;);
+   PLUGINDEBUGSTR(StreamAsFile;g;);
NPP_StreamAsFile(instance, stream, fname);
ExitCodeResource();
 }
@@ -380,7 +380,7 @@
 {
NPError err;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pDestroyStream;g;);
+   PLUGINDEBUGSTR(DestroyStream;g;);
err = NPP_DestroyStream(instance, stream, reason);
ExitCodeResource();
return err;
@@ -390,7 +390,7 @@
 {
int16 result;
EnterCodeResource();
-   PLUGINDEBUGSTR(\pHandleEvent;g;);
+   PLUGINDEBUGSTR(HandleEvent;g;);
result = NPP_HandleEvent(instance, event);

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30085] trunk/blender/source/blender: duplicating a sequence strip now duplicates its fcurves

2010-07-07 Thread Campbell Barton
Revision: 30085
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30085
Author:   campbellbarton
Date: 2010-07-07 18:17:18 +0200 (Wed, 07 Jul 2010)

Log Message:
---
duplicating a sequence strip now duplicates its fcurves

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_sequencer.h
trunk/blender/source/blender/blenkernel/intern/sequencer.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
trunk/blender/source/blender/makesrna/intern/rna_sequencer.c

Modified: trunk/blender/source/blender/blenkernel/BKE_sequencer.h
===
--- trunk/blender/source/blender/blenkernel/BKE_sequencer.h 2010-07-07 
15:26:02 UTC (rev 30084)
+++ trunk/blender/source/blender/blenkernel/BKE_sequencer.h 2010-07-07 
16:17:18 UTC (rev 30085)
@@ -187,6 +187,7 @@
 int seq_test_overlap(struct ListBase * seqbasep, struct Sequence *test);
 struct ListBase *seq_seqbase(struct ListBase *seqbase, struct Sequence *seq);
 void seq_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
+void seq_dupe_animdata(struct Scene *scene, char *name_from, char *name_to);
 int shuffle_seq(struct ListBase * seqbasep, struct Sequence *test, struct 
Scene *evil_scene);
 int shuffle_seq_time(ListBase * seqbasep, struct Scene *evil_scene);
 int seqbase_isolated_sel_check(struct ListBase *seqbase);
@@ -232,6 +233,7 @@
 /* seq_dupli' flags */
 #define SEQ_DUPE_UNIQUE_NAME   10
 #define SEQ_DUPE_CONTEXT   11
+#define SEQ_DUPE_ANIM  12
 
 /* use as an api function */
 typedef struct Sequence *(*SeqLoadFunc)(struct bContext *, ListBase *, struct 
SeqLoadInfo *);

Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c
===
--- trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
15:26:02 UTC (rev 30084)
+++ trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
16:17:18 UTC (rev 30085)
@@ -40,6 +40,7 @@
 #include DNA_anim_types.h
 #include DNA_object_types.h
 
+#include BKE_animsys.h
 #include BKE_global.h
 #include BKE_image.h
 #include BKE_main.h
@@ -3877,6 +3878,37 @@
}
 }
 
+void seq_dupe_animdata(Scene *scene, char *name_from, char *name_to)
+{
+   char str_from[32];
+   char str_to[32];
+   FCurve *fcu;
+   FCurve *fcu_last;
+   FCurve *fcu_cpy;
+   ListBase lb= {NULL, NULL};
+
+   if(scene-adt==NULL || scene-adt-action==NULL)
+   return;
+
+   sprintf(str_from, [\%s\], name_from);
+   sprintf(str_to, [\%s\], name_to);
+
+   fcu_last= scene-adt-action-curves.last;
+
+   for (fcu= scene-adt-action-curves.first; fcu  fcu-prev != 
fcu_last; fcu= fcu-next) {
+   if(strstr(fcu-rna_path, sequence_editor.sequences_all[)  
strstr(fcu-rna_path, str_from)) {
+   fcu_cpy= copy_fcurve(fcu);
+   BLI_addtail(lb, fcu_cpy);
+   }
+   }
+
+   /* notice validate is 0, keep this because the seq may not be added to 
the scene yet */
+   BKE_animdata_fix_paths_rename(scene-id, scene-adt, 
sequence_editor.sequences_all, name_from, name_to, 0, 0, 0);
+
+   /* add the original fcurves back */
+   addlisttolist(scene-adt-action-curves, lb);
+}
+
 /* XXX - hackish function needed to remove all fcurves belonging to a 
sequencer strip */
 static void seq_free_animdata(Scene *scene, Sequence *seq)
 {
@@ -4233,9 +4265,14 @@
 now...\n);
}
 
-   if(dupe_flag  SEQ_DUPE_UNIQUE_NAME)
+   if(dupe_flag  SEQ_DUPE_UNIQUE_NAME) {
seqbase_unique_name_recursive(scene-ed-seqbase, seqn);
+   printf(%s %s\n, seqn-name+2, seq-name+2);
+   }
 
+   if(dupe_flag  SEQ_DUPE_ANIM)
+   seq_dupe_animdata(scene, seq-name+2, seqn-name+2);
+
return seqn;
 }
 

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2010-07-07 15:26:02 UTC (rev 30084)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2010-07-07 16:17:18 UTC (rev 30085)
@@ -792,7 +792,7 @@
 
if (!skip_dup) {
/* Duplicate AFTER the first change */
-   seqn = seq_dupli_recursive(scene, seq, SEQ_DUPE_UNIQUE_NAME);
+   seqn = seq_dupli_recursive(scene, seq, SEQ_DUPE_UNIQUE_NAME | 
SEQ_DUPE_ANIM);
}

if (seqn) { 
@@ -881,7 +881,7 @@
 
if (!skip_dup) {
/* Duplicate AFTER the first change */
-   seqn = seq_dupli_recursive(scene, seq, SEQ_DUPE_UNIQUE_NAME);
+   seqn = seq_dupli_recursive(scene, seq, SEQ_DUPE_UNIQUE_NAME | 
SEQ_DUPE_ANIM);
 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30086] trunk/blender/source/blender/ editors/mesh/editmesh_tools.c: Fix #22776: merge and remove doubles don' t recalculate normals.

2010-07-07 Thread Brecht Van Lommel
Revision: 30086
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30086
Author:   blendix
Date: 2010-07-07 18:23:38 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Fix #22776: merge and remove doubles don't recalculate normals.

Modified Paths:
--
trunk/blender/source/blender/editors/mesh/editmesh_tools.c

Modified: trunk/blender/source/blender/editors/mesh/editmesh_tools.c
===
--- trunk/blender/source/blender/editors/mesh/editmesh_tools.c  2010-07-07 
16:17:18 UTC (rev 30085)
+++ trunk/blender/source/blender/editors/mesh/editmesh_tools.c  2010-07-07 
16:23:38 UTC (rev 30086)
@@ -485,9 +485,13 @@
 
int count = removedoublesflag(em,1,0,RNA_float_get(op-ptr, limit));

-   if(count)
-   BKE_reportf(op-reports, RPT_INFO, Removed %d vertices, 
count);
+   if(!count)
+   return OPERATOR_CANCELLED;
 
+   recalc_editnormals(em);
+
+   BKE_reportf(op-reports, RPT_INFO, Removed %d vertices, count);
+
DAG_id_flush_update(obedit-data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit-data);
 
@@ -5860,6 +5864,7 @@
if(!count)
return OPERATOR_CANCELLED;
 
+   recalc_editnormals(em);

BKE_reportf(op-reports, RPT_INFO, Removed %d vert%s., count, 
(count==1)?ex:ices);
 
@@ -7116,7 +7121,7 @@
 {
RegionView3D *rv3d= ED_view3d_context_rv3d(C);
View3D *v3d= CTX_wm_view3d(C);
-   Object *ob= CTX_data_active_object(C);
+   Object *ob= CTX_data_edit_object(C);
Scene *scene= CTX_data_scene(C);
Mesh *me;
CustomDataLayer *layer;
@@ -7125,9 +7130,7 @@
float reverse = 1;
// XXX int ctrl= 0;

-   if(!ob) return OPERATOR_FINISHED;
-   if(ob-type!=OB_MESH) return OPERATOR_FINISHED;
-   if (!v3d) return OPERATOR_FINISHED;
+   if (!v3d) return OPERATOR_CANCELLED;
 
/* This operator work in Object Mode, not in edit mode.
 * After talk with Cambell we agree that there is no point to port this 
to EditMesh right now.
@@ -7227,6 +7230,8 @@
 
/* Return to editmode. */
ED_object_enter_editmode(C, 0);
+
+   return OPERATOR_FINISHED;
 }
 
 void MESH_OT_sort_faces(wmOperatorType *ot)


___
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 [30087] trunk/blender/source/blender: fix for duplicating metastrips, unique names and animation data.

2010-07-07 Thread Campbell Barton
Revision: 30087
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30087
Author:   campbellbarton
Date: 2010-07-07 18:37:41 +0200 (Wed, 07 Jul 2010)

Log Message:
---
fix for duplicating metastrips, unique names and animation data.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/sequencer.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c

Modified: trunk/blender/source/blender/blenkernel/intern/sequencer.c
===
--- trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
16:23:38 UTC (rev 30086)
+++ trunk/blender/source/blender/blenkernel/intern/sequencer.c  2010-07-07 
16:37:41 UTC (rev 30087)
@@ -3881,7 +3881,6 @@
 void seq_dupe_animdata(Scene *scene, char *name_from, char *name_to)
 {
char str_from[32];
-   char str_to[32];
FCurve *fcu;
FCurve *fcu_last;
FCurve *fcu_cpy;
@@ -3891,7 +3890,6 @@
return;
 
sprintf(str_from, [\%s\], name_from);
-   sprintf(str_to, [\%s\], name_to);
 
fcu_last= scene-adt-action-curves.last;
 
@@ -4265,10 +4263,8 @@
 now...\n);
}
 
-   if(dupe_flag  SEQ_DUPE_UNIQUE_NAME) {
+   if(dupe_flag  SEQ_DUPE_UNIQUE_NAME)
seqbase_unique_name_recursive(scene-ed-seqbase, seqn);
-   printf(%s %s\n, seqn-name+2, seq-name+2);
-   }
 
if(dupe_flag  SEQ_DUPE_ANIM)
seq_dupe_animdata(scene, seq-name+2, seqn-name+2);

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2010-07-07 16:23:38 UTC (rev 30086)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2010-07-07 16:37:41 UTC (rev 30087)
@@ -1588,6 +1588,18 @@
 }
 
 /* duplicate operator */
+static int apply_unique_name_cb(Sequence *seq, void *arg_pt)
+{
+   Scene *scene= (Scene *)arg_pt;
+   char name[sizeof(seq-name)-2];
+
+   strcpy(name, seq-name+2);
+   seqbase_unique_name_recursive(scene-ed-seqbase, seq);
+   seq_dupe_animdata(scene, name, seq-name+2);
+   return 1;
+
+}
+
 static int sequencer_add_duplicate_exec(bContext *C, wmOperator *op)
 {
Scene *scene= CTX_data_scene(C);
@@ -1605,12 +1617,8 @@
/* rely on the nseqbase list being added at the end */
addlisttolist(ed-seqbasep, nseqbase);
 
-   for( ; seq; seq= seq-next) {
-   char name[sizeof(seq-name)-2];
-   strcpy(name, seq-name+2);
-   seqbase_unique_name_recursive(ed-seqbase, seq);
-   seq_dupe_animdata(scene, name, seq-name+2);
-   }
+   for( ; seq; seq= seq-next)
+   seq_recursive_apply(seq, apply_unique_name_cb, scene);
 
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
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 [30088] trunk/blender/source/blender/ blenkernel/intern/depsgraph.c: Fix #21540: depsgraph problem on load, meshes on non-visible layers

2010-07-07 Thread Brecht Van Lommel
Revision: 30088
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30088
Author:   blendix
Date: 2010-07-07 19:08:20 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Fix #21540: depsgraph problem on load, meshes on non-visible layers
were not created when objects on visible layers depended on them, now
it uses the flushed layer to determine if the object data should be
recalculated.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/depsgraph.c

Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c  2010-07-07 
16:37:41 UTC (rev 30087)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c  2010-07-07 
17:08:20 UTC (rev 30088)
@@ -1877,26 +1877,19 @@
}
 }
 
-/* flushes all recalc flags in objects down the dependency tree */
-void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
+/* flush layer flags to dependencies */
+static void dag_scene_flush_layers(Scene *sce, int lay)
 {
-   DagNode *firstnode, *node;
+   DagNode *node, *firstnode;
DagAdjList *itA;
-   Object *ob;
Base *base;
int lasttime;
-   
-   if(sce-theDag==NULL) {
-   printf(DAG zero... not allowed to happen!\n);
-   DAG_scene_sort(sce);
-   }
-   
+
firstnode= sce-theDag-DagNode.first;  // always scene node
 
for(itA = firstnode-child; itA; itA= itA-next)
itA-lay= 0;
-   
-   /* first we flush the layer flags */
+
sce-theDag-time++;// so we know which nodes were accessed
lasttime= sce-theDag-time;
 
@@ -1930,7 +1923,26 @@
for(itA = firstnode-child; itA; itA= itA-next)
if(itA-node-lasttime!=lasttime  itA-node-type==ID_OB) 
flush_layer_node(sce, itA-node, lasttime);
+}
+
+/* flushes all recalc flags in objects down the dependency tree */
+void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
+{
+   DagNode *firstnode;
+   DagAdjList *itA;
+   Object *ob;
+   int lasttime;

+   if(sce-theDag==NULL) {
+   printf(DAG zero... not allowed to happen!\n);
+   DAG_scene_sort(sce);
+   }
+   
+   firstnode= sce-theDag-DagNode.first;  // always scene node
+
+   /* first we flush the layer flags */
+   dag_scene_flush_layers(sce, lay);
+
/* then we use the relationships + layer info to flush update events */
sce-theDag-time++;// so we know which nodes were accessed
lasttime= sce-theDag-time;
@@ -2231,7 +2243,8 @@
Object *ob;
Group *group;
GroupObject *go;
-   unsigned int lay;
+   DagNode *node;
+   unsigned int lay, oblay;
 
dag_current_scene_layers(bmain, scene, lay);
 
@@ -2240,10 +2253,14 @@
   remade, tag them so they get remade in the scene update loop,
   note armature poses or object matrices are preserved and do 
not
   require updates, so we skip those */
+   dag_scene_flush_layers(scene, lay);
+
for(SETLOOPER(scene, base)) {
ob= base-object;
+   node= (sce-theDag)? dag_get_node(sce-theDag, ob): 
NULL;
+   oblay= (node)? node-lay: ob-lay;
 
-   if(base-lay  lay) {
+   if(oblay  lay) {
if(ELEM5(ob-type, OB_MESH, OB_CURVE, OB_SURF, 
OB_FONT, OB_MBALL))
ob-recalc |= OB_RECALC_DATA;
if(ob-dup_group) 


___
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 [30089] trunk/blender/source/blender/ editors/object/object_vgroup.c: Fix for bug #22763, Blender 2. 52 Crashes with the default scene when in weight

2010-07-07 Thread Nicholas Bishop
Revision: 30089
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30089
Author:   nicholasbishop
Date: 2010-07-07 19:32:50 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Fix for bug #22763, Blender 2.52 Crashes with the default scene when in weight 
paint mode clicking the Levels option

* Add a `return 0' to ED_vgroup_give_parray to avoid falling through from mesh 
to lattice

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 2010-07-07 
17:08:20 UTC (rev 30088)
+++ trunk/blender/source/blender/editors/object/object_vgroup.c 2010-07-07 
17:32:50 UTC (rev 30089)
@@ -166,6 +166,8 @@
 
return 1;
}
+   else
+   return 0;
}
case ID_LT:
{


___
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 [30090] branches/soc-2010-leifandersen/ tests/render: 1.

2010-07-07 Thread Leif Andersen
Revision: 30090
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30090
Author:   leifandersen
Date: 2010-07-07 20:06:52 +0200 (Wed, 07 Jul 2010)

Log Message:
---
1.  Split up the image and render test cases after realizing I was doing it 
anyway (making it easier, as ID no longer needs to be kept track of).

2.  Finished the animation comparison class, not bug tested though.

3.  Rendered a sample animation, will be the first to use the animation 
comparison test.

Modified Paths:
--
branches/soc-2010-leifandersen/tests/render/run.py

Added Paths:
---
branches/soc-2010-leifandersen/tests/render/anim/cubesphere/

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0001.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0002.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0003.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0004.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0005.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0006.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0007.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0008.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0009.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0010.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0011.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0012.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0013.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0014.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0015.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0016.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0017.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0018.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0019.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0020.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0021.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0022.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0023.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0024.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0025.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0026.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0027.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0028.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0029.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0030.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0031.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0032.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0033.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0034.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0035.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0036.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0037.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0038.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0039.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0040.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0041.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0042.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0043.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0044.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0045.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0046.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0047.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0048.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0049.png

branches/soc-2010-leifandersen/tests/render/anim/cubesphere/cubesphere_0050.png


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30091] trunk/blender/source/blender/ makesrna/intern/rna_nodetree.c: Nodes:

2010-07-07 Thread Thomas Dinges
Revision: 30091
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30091
Author:   dingto
Date: 2010-07-07 20:39:08 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Nodes:
* Tooltips for the Blur Node

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2010-07-07 
18:06:52 UTC (rev 30090)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2010-07-07 
18:39:08 UTC (rev 30091)
@@ -865,7 +865,7 @@
 
prop = RNA_def_property(srna, relative, PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, relative, 1);
-   RNA_def_property_ui_text(prop, Relative, );
+   RNA_def_property_ui_text(prop, Relative, Use relative (percent) 
values to define blur radius);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);

prop = RNA_def_property(srna, factor, PROP_FLOAT, PROP_NONE);
@@ -894,12 +894,12 @@

prop = RNA_def_property(srna, bokeh, PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, bokeh, 1);
-   RNA_def_property_ui_text(prop, Bokeh, );
+   RNA_def_property_ui_text(prop, Bokeh, Uses circular filter 
(slower));
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);

prop = RNA_def_property(srna, gamma, PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, gamma, 1);
-   RNA_def_property_ui_text(prop, Gamma, );
+   RNA_def_property_ui_text(prop, Gamma, Applies filter on gamma 
corrected values);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);

 }


___
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 [30092] trunk/blender/source/blender/ blenkernel/intern/object.c: Fix #22340: sintel appears in seemingly random poses on load.

2010-07-07 Thread Brecht Van Lommel
Revision: 30092
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30092
Author:   blendix
Date: 2010-07-07 20:47:49 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Fix #22340: sintel appears in seemingly random poses on load.

Pose proxy synchronization happened after drivers were already evaluated,
now moved to start of object_handle_update.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/object.c

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===
--- trunk/blender/source/blender/blenkernel/intern/object.c 2010-07-07 
18:39:08 UTC (rev 30091)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2010-07-07 
18:47:49 UTC (rev 30092)
@@ -2479,6 +2479,17 @@
if(ob-pose)
make_pose_channels_hash(ob-pose);
 
+   if(ob-recalc  OB_RECALC_DATA) {
+   if(ob-type==OB_ARMATURE) {
+   /* this happens for reading old files and to 
match library armatures
+  with poses we do it ahead of where_is_object 
to ensure animation
+  is evaluated on the rebuilt pose, otherwise 
we get incorrect poses
+  on file load */
+   if(ob-pose==NULL || (ob-pose-flag  
POSE_RECALC))
+   armature_rebuild_pose(ob, ob-data);
+   }
+   }
+
/* XXX new animsys warning: depsgraph tag OB_RECALC_DATA should 
not skip drivers, 
   which is only in where_is_object now */
// XXX: should this case be OB_RECALC_OB instead?
@@ -2541,11 +2552,6 @@
lattice_calc_modifiers(scene, ob);
}
else if(ob-type==OB_ARMATURE) {
-   /* this happens for reading old files and to 
match library armatures with poses */
-   // XXX this won't screw up the pose set 
already...
-   if(ob-pose==NULL || (ob-pose-flag  
POSE_RECALC))
-   armature_rebuild_pose(ob, ob-data);
-   
/* evaluate drivers */
BKE_animsys_evaluate_animdata(data_id, adt, 
ctime, ADT_RECALC_DRIVERS);



___
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 [30093] branches/soc-2010-nicolasbishop/ source/blender: Some preparation for accelerating other paint modes than sculpt

2010-07-07 Thread Nicholas Bishop
Revision: 30093
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30093
Author:   nicholasbishop
Date: 2010-07-07 21:11:55 +0200 (Wed, 07 Jul 2010)

Log Message:
---
Some preparation for accelerating other paint modes than sculpt

* Replaced Object.sculpt with Object.paint. This new PaintSession type for now 
just contains the PBVH so it can be built more or less the same for different 
paint modes. It also contains the old SculptSession data.
* Removed a couple of unused fields from SculptSession.
* Changed a lot of sculpt functions to pass around the Object rather than 
SculptSession; made sense anyway because we added an Object field to 
SculptSession to work around that problem.
* There should be no visible changes from this commit.

Modified Paths:
--
branches/soc-2010-nicolasbishop/source/blender/blenkernel/BKE_paint.h

branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c

branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/multires.c
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/object.c
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/paint.c

branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2010-nicolasbishop/source/blender/blenloader/intern/readfile.c

branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_mask.c
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c

branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt_intern.h

branches/soc-2010-nicolasbishop/source/blender/editors/space_view3d/drawobject.c
branches/soc-2010-nicolasbishop/source/blender/makesdna/DNA_object_types.h

branches/soc-2010-nicolasbishop/source/blender/modifiers/intern/MOD_multires.c

Modified: branches/soc-2010-nicolasbishop/source/blender/blenkernel/BKE_paint.h
===
--- branches/soc-2010-nicolasbishop/source/blender/blenkernel/BKE_paint.h   
2010-07-07 18:47:49 UTC (rev 30092)
+++ branches/soc-2010-nicolasbishop/source/blender/blenkernel/BKE_paint.h   
2010-07-07 19:11:55 UTC (rev 30093)
@@ -60,32 +60,18 @@
 
 void paint_refresh_mask_display(struct Object *ob);
 
-/* Session data (mode-specific) */
-
 typedef struct SculptSession {
-   struct ProjVert *projverts;
-
/* Mesh data (not copied) can come either directly from a Mesh, or from 
a MultiresDM */
struct MultiresModifierData *multires; /* Special handling for multires 
meshes */
struct MVert *mvert;
struct MFace *mface;
int totvert, totface;
float *face_normals;
-   struct Object *ob;
struct KeyBlock *kb;

/* Mesh connectivity */
struct ListBase *fmap;
 
-   /* PBVH acceleration structure */
-   struct PBVH *pbvh;
-
-   /* Used temporarily per-stroke */
-   float *vertexcosnos;
-
-   /* Partial redraw */
-   int partial_redraw;
-
/* Area hiding */
ListBase hidden_areas;

@@ -98,11 +84,21 @@
struct SculptStroke *stroke;
struct StrokeCache *cache;
 
-   struct GPUDrawObject *drawobject;
-
int modifiers_active;
 } SculptSession;
 
-void free_sculptsession(struct Object *ob);
+typedef struct PaintSession {
+   /* mode-specific data (just sculpt for now */
+   SculptSession *sculpt;
 
+   /* PBVH acceleration structure */
+   struct PBVH *pbvh;
+
+   /* Partial redraw */
+   int partial_redraw;
+} PaintSession;
+
+void create_paintsession(struct Object *ob);
+void free_paintsession(struct Object *ob);
+
 #endif

Modified: 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c
===
--- 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c  
2010-07-07 18:47:49 UTC (rev 30092)
+++ 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c  
2010-07-07 19:11:55 UTC (rev 30093)
@@ -2182,13 +2182,13 @@
ob-derivedDeform-release(ob-derivedDeform);
ob-derivedDeform= NULL;
}
-   /* we free pbvh on changes, except during sculpt since it can't deal 
with
+   /* we free pbvh on changes, except during paint since it can't deal with
   changing PVBH node organization, we hope topology does not change in
   the meantime .. weak */
-   if(ob-sculpt  ob-sculpt-pbvh) {
-   if(!ob-sculpt-cache) {
-   BLI_pbvh_free(ob-sculpt-pbvh);
-   ob-sculpt-pbvh= NULL;
+   if(ob-paint  ob-paint-pbvh) {
+   if(!ob-paint-sculpt-cache) {
+   BLI_pbvh_free(ob-paint-pbvh);

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30094] branches/soc-2010-leifandersen/ tests/render/run.py: 1.

2010-07-07 Thread Leif Andersen
Revision: 30094
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30094
Author:   leifandersen
Date: 2010-07-07 21:35:39 +0200 (Wed, 07 Jul 2010)

Log Message:
---
1.  The -v (vorbose) flag actually works, making the output look much nicer.

Modified Paths:
--
branches/soc-2010-leifandersen/tests/render/run.py

Modified: branches/soc-2010-leifandersen/tests/render/run.py
===
--- branches/soc-2010-leifandersen/tests/render/run.py  2010-07-07 19:11:55 UTC 
(rev 30093)
+++ branches/soc-2010-leifandersen/tests/render/run.py  2010-07-07 19:35:39 UTC 
(rev 30094)
@@ -5,7 +5,11 @@
 import os
 import sys
 import string
+import subprocess
 
+from subprocess import Popen, PIPE
+
+
 BLENDER_BIN = blender
 RUN_ANIMATIONS = False
 RUN_IMAGES = True
@@ -56,8 +60,16 @@
 def render_test(self):
 '''Renders a single image of the first frame of the blend file.
 Also changes output_path slightly'''
-command = BLENDER_BIN +  -b  + self.blend_path +  -o  + 
self.test_path + _ -F PNG -x 1 -f 1
-os.system(command)
+
+# The old way of running the command: TODO, remove when certain 
Popen() works.
+# command = BLENDER_BIN +  -b  + self.blend_path +  -o  + 
self.test_path + _ -F PNG -x 1 -f 1
+# os.system(command)
+
+p = Popen([BLENDER_BIN, '-b', self.blend_path, '-o', self.test_path + 
'_', '-F', 'PNG', '-x', '1', '-f', '1'], stdout=PIPE, stderr=PIPE, 
stdin=PIPE)
+p.wait()
+if VERBOSE:
+print p.communicate()[0]
+
 self.test_path += '_0001.png'
 try:
 self.test_image = Image.open(self.test_path)
@@ -120,6 +132,7 @@
 message = 
 
 def __init__(self, blend_path, good_path, test_path):
+''
 self.name = os.path.split(blend_path)[1]
 self.blend_path = blend_path
 self.good_path = []
@@ -144,9 +157,15 @@
 
 def render_test(self):
 ''
-command = BLENDER_BIN +  -b  + self.blend_path +  -o  + 
string.replace(self.test_path[0], '_0001.png', '') + _ -F PNG -x 1 -a
-os.system(command)
+# The old way, TODO, remove when certain Popen() works.
+# command = BLENDER_BIN +  -b  + self.blend_path +  -o  + 
string.replace(self.test_path[0], '_0001.png', '') + _ -F PNG -x 1 -a
+# os.system(command)
 
+p = Popen([BLENDER_BIN, '-b', self.blend_path, '-o', 
string.replace(self.test_path[0], '_0001.png', '') + '_', '-F', 'PNG', 
'-x', '1', '-a'], stdout=PIPE, stderr=PIPE, stdin=PIPE)
+p.wait()
+if VERBOSE:
+print p.communicate()[0]
+
 try:
 self.test_image = []
 for imagename in self.test_path:
@@ -163,6 +182,7 @@
 self.message = Failed to render
 
 def setup_test(self):
+''
 if self.test_image != None:
 self.passed_arr = []
 self.diff_sum = []
@@ -204,6 +224,7 @@
 self.passed = False
 
 def save_diff(self, output_path):
+''
 if self.diff_image != None:
 self.diff_path = []
 (diff_directory, diff_file) = os.path.split(output_path)
@@ -216,6 +237,7 @@
 def get_cases(folder):
 '''Returns all of the blend files in the folder'''
 cases = []
+print ''
 for filename in os.listdir(sys.path[0]):
 if filename.find('.blend') != -1:
 blend_path = os.path.join(sys.path[0],filename)
@@ -362,15 +384,14 @@
 
 # Run cases
 for test_case in cases:
-print test_case.name
-if not VERBOSE:
-sys.stdout = LOG
+print test_case.name + '...',
 test_case.render_test()
 test_case.setup_test()
 test_case.save_diff(os.path.join(HTML_OUTPUT, 'output', 
string.replace(test_case.name, '.blend', '_diff.png')))
-if not VERBOSE:
-sys.stdout = SAVEOUT
-print test_case.passed
+if test_case.passed:
+print 'OK'
+else:
+print 'FAILED'
 
 # Output Result
 console_output(cases)


___
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 [30096] branches/soc-2010-nicolasbishop/ source/blender: Some more changes for improving non-sculpt paint modes:

2010-07-07 Thread Nicholas Bishop
Revision: 30096
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30096
Author:   nicholasbishop
Date: 2010-07-08 00:55:57 +0200 (Thu, 08 Jul 2010)

Log Message:
---
Some more changes for improving non-sculpt paint modes:

?\226?\128?\162 Add face customdata to the pbvh
?\226?\128?\162 Return more data from BLI_pbvh_node_get_faces
?\226?\128?\162 Add some drawing flags for the pbvh/VBO drawing code
?\226?\128?\162 Some initial support for drawing mesh colors (not used yet)
?\226?\128?\162 Abstracted sculpt's get_location a bit so it can be used for 
other types of paint strokes
?\226?\128?\162 Moved and renamed unproject_brush_radius so other paint modes 
can use it
?\226?\128?\162 There should be no visible changes from this commit

Modified Paths:
--

branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c

branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/cdderivedmesh.c

branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2010-nicolasbishop/source/blender/blenlib/BLI_pbvh.h
branches/soc-2010-nicolasbishop/source/blender/blenlib/intern/pbvh.c

branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_intern.h

branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_mask.c

branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_stroke.c

branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/paint_utils.c
branches/soc-2010-nicolasbishop/source/blender/editors/sculpt_paint/sculpt.c

branches/soc-2010-nicolasbishop/source/blender/editors/space_view3d/drawobject.c
branches/soc-2010-nicolasbishop/source/blender/gpu/gpu_buffers.h
branches/soc-2010-nicolasbishop/source/blender/gpu/intern/gpu_buffers.c

Modified: 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c
===
--- 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c  
2010-07-07 21:57:57 UTC (rev 30095)
+++ 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/DerivedMesh.c  
2010-07-07 22:55:57 UTC (rev 30096)
@@ -2186,7 +2186,7 @@
   changing PVBH node organization, we hope topology does not change in
   the meantime .. weak */
if(ob-paint  ob-paint-pbvh) {
-   if(!ob-paint-sculpt-cache) {
+   if(!ob-paint-sculpt || !ob-paint-sculpt-cache) {
BLI_pbvh_free(ob-paint-pbvh);
ob-paint-pbvh= NULL;
}

Modified: 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/cdderivedmesh.c
===
--- 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/cdderivedmesh.c
2010-07-07 21:57:57 UTC (rev 30095)
+++ 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/cdderivedmesh.c
2010-07-07 22:55:57 UTC (rev 30096)
@@ -223,7 +223,8 @@
cddm-pbvh = BLI_pbvh_new();
cddm-pbvh_draw = can_pbvh_draw(ob, dm);
BLI_pbvh_build_mesh(cddm-pbvh, me-mface, me-mvert,
-   me-vdata, me-totface, me-totvert,
+   me-vdata, me-fdata, me-totface,
+   me-totvert,
ss ? ss-hidden_areas : NULL);
}
 
@@ -439,15 +440,16 @@
 
if(cddm-pbvh  cddm-pbvh_draw) {
if(dm-numFaceData) {
+   GPUDrawFlags drawflags = 0;
float (*face_nors)[3] = 
CustomData_get_layer(dm-faceData, CD_NORMAL);
 
/* should be per face */
if(!setMaterial(mface-mat_nr+1, NULL))
return;
+   if(mface-flag  ME_SMOOTH)
+   drawflags |= GPU_DRAW_SMOOTH;
 
-   glShadeModel((mface-flag  ME_SMOOTH)? GL_SMOOTH: 
GL_FLAT);
-   BLI_pbvh_draw(cddm-pbvh, partial_redraw_planes, 
face_nors, (mface-flag  ME_SMOOTH));
-   glShadeModel(GL_FLAT);
+   BLI_pbvh_draw(cddm-pbvh, partial_redraw_planes, 
face_nors, drawflags);
}
 
return;

Modified: 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/subsurf_ccg.c
===
--- 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/subsurf_ccg.c  
2010-07-07 21:57:57 UTC (rev 30095)
+++ 
branches/soc-2010-nicolasbishop/source/blender/blenkernel/intern/subsurf_ccg.c  
2010-07-07 22:55:57 UTC (rev 30096)
@@ -60,6 +60,7 @@
 #include BIF_gl.h
 #include BIF_glutil.h
 
+#include gpu_buffers.h
 #include GPU_draw.h
 #include 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30097] branches/soc-2010-leifandersen: 1.

2010-07-07 Thread Leif Andersen
Revision: 30097
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30097
Author:   leifandersen
Date: 2010-07-08 02:01:16 +0200 (Thu, 08 Jul 2010)

Log Message:
---
1.  Made the final changes so that ImageTestCase and AnimationTestCase can both 
work as ImageTestCases (like an interface in java, image a duck, and a duck 
(ImageTestCase), and a duck plus super powers (animation test case)).

2.  Set up the AnimationTestCase to be ran with the images.

3.  Fixed all of the bugs in the AnimationTestCase class (I think, at least it 
works fine when I ran it), note that the rendered HTML pages still needs work.

4.  Because Popen seems to get stuck when doing animations, I went back to 
os.system(), which means the output is back to being displayed (regardless of 
-v), note that this is only for animations.  I think it has something to do 
with PIPE becoming full, but supposedly p.communicaate() was supposed to take 
care of that.

Modified Paths:
--
branches/soc-2010-leifandersen/release/scripts/op/tests_render.py
branches/soc-2010-leifandersen/tests/render/run.py

Modified: branches/soc-2010-leifandersen/release/scripts/op/tests_render.py
===
--- branches/soc-2010-leifandersen/release/scripts/op/tests_render.py   
2010-07-07 22:55:57 UTC (rev 30096)
+++ branches/soc-2010-leifandersen/release/scripts/op/tests_render.py   
2010-07-08 00:01:16 UTC (rev 30097)
@@ -4,15 +4,9 @@
 from bpy.props import *
 
 BLENDER_BIN = sys.argv[0]
-BLENDER_FLAG = --blender-intern
 PYTHON_BIN = python
 PILTEST_PY = run.py
 
-# Probably will be rewritten in C
-def compare_image(image1, image2, directory):
-command = PYTHON_BIN +   + os.path.join(directory, PILTEST_PY) +   + 
BLENDER_FLAG +   + image1 +   + image2
-print(os.system(command))
-
 def render(path):
 (directory, filename) = os.path.split(path)
 command = BLENDER_BIN +  -b  + path +  -o  + os.path.join(directory, 
output, (filename + _)) +  -F PNG -x 1 -f 1
@@ -41,7 +35,8 @@
 (directory, filename) = os.path.split(self.properties.filepath)
 image1 = os.path.join(directory,render,(filename + .png))
 image2 = render(self.properties.filepath)
-compare_image(image1, image2, directory)
+command = PYTHON_BIN +   + os.path.join(directory, PILTEST_PY) +  
--image  + self.properties.filepath
+print(os.system(command))
 return {'FINISHED'}
 
 def invoke(self, context, event):

Modified: branches/soc-2010-leifandersen/tests/render/run.py
===
--- branches/soc-2010-leifandersen/tests/render/run.py  2010-07-07 22:55:57 UTC 
(rev 30096)
+++ branches/soc-2010-leifandersen/tests/render/run.py  2010-07-08 00:01:16 UTC 
(rev 30097)
@@ -40,6 +40,7 @@
 pixel_range = None
 difference = None
 message = 
+ID = 'Image'
 
 def __init__(self, blend_path, good_path, test_path):
 '''Sets up a test case, with the blend_path, the known good path, and 
the test path
@@ -54,7 +55,7 @@
 def format_frame(self, num):
 frame_num = str(num)
 while len(frame_num)  4:
-frame_num+='0'
+frame_num = '0' + frame_num
 return frame_num
 
 def render_test(self):
@@ -116,61 +117,73 @@
 
 name = None
 passed = None
-passed_arr = None
+passed_arr = []
 good_path = None
+good_path_arr = []
 blend_path = None
 test_path = None
+test_path_arr = []
 diff_path = None
+diff_path_arr = []
 bad_pixels = None
+bad_pixels_arr = []
 pixel_count = None
+pixel_count_arr = []
 diff_sum = None
+diff_sum_arr = []
 good_image = None
+good_image_arr = []
 test_image = None
+test_image_arr = []
 diff_image = None
+diff_image_arr = []
 pixel_range = None
+pixel_range_arr = []
 difference = None
+diffference_arr = []
 message = 
+ID = 'Animation'
 
 def __init__(self, blend_path, good_path, test_path):
 ''
 self.name = os.path.split(blend_path)[1]
+i=1
+for imagename in os.listdir(good_path):
+if imagename.find('.png') != -1:
+self.good_path_arr.append(os.path.join(good_path, imagename))
+im = Image.open(self.good_path_arr[i-1])
+self.good_image_arr.append(im)
+self.test_path_arr.append(os.path.join(test_path, 
string.replace(self.name, '.blend', '_' + self.format_frame(i) + '.png')))
+i+=1
+
 self.blend_path = blend_path
-self.good_path = []
-self.good_image = []
-self.test_path = []
+self.good_path = self.good_path_arr[0]
+self.good_image = self.good_image_arr[0]
+self.test_path = self.test_path_arr[0]
 
-(good_directory, good_file) = os.path.split(blend_path)
-

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30098] branches/soc-2010-merwin/intern/ ghost/intern: added filtered event dispatch for lo-fi mouse/pen input

2010-07-07 Thread Mike Erwin
Revision: 30098
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=revroot=bf-blenderrevision=30098
Author:   merwin
Date: 2010-07-08 03:53:36 +0200 (Thu, 08 Jul 2010)

Log Message:
---
added filtered event dispatch for lo-fi mouse/pen input

Modified Paths:
--
branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.cpp
branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.h
branches/soc-2010-merwin/intern/ghost/intern/GHOST_System.cpp
branches/soc-2010-merwin/intern/ghost/intern/GHOST_System.h

Modified: branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.cpp
===
--- branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.cpp 
2010-07-08 00:01:16 UTC (rev 30097)
+++ branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.cpp 
2010-07-08 01:53:36 UTC (rev 30098)
@@ -38,6 +38,10 @@
 #include algorithm
 #include GHOST_Debug.h
 
+// for testing lo-fi
+#include GHOST_EventPrinter.h
+#include iostream
+using namespace std;
 
 GHOST_EventManager::GHOST_EventManager()
 {
@@ -81,7 +85,7 @@
 GHOST_IEvent* GHOST_EventManager::peekEvent()
 {
GHOST_IEvent* event = 0;
-   if (m_events.size()  0) {
+   if (!m_events.empty()) {
event = m_events.back();
}
return event;
@@ -105,6 +109,24 @@
 
 bool GHOST_EventManager::dispatchEvent(GHOST_IEvent* event)
 {
+   // [mce] this variant switches the handled flag to work as described 
in the header
+   //   it also stops after the first consumer has handled the event
+   bool handled = false;
+   if (event) {
+   TConsumerVector::iterator iter;
+   for (iter = m_consumers.begin(); iter != m_consumers.end(); 
iter++) {
+   if ((*iter)-processEvent(event)) {
+   handled = true;
+   // break;
+   }
+   }
+   }
+   return handled;
+}
+
+#if 0 // disable to test a variant
+bool GHOST_EventManager::dispatchEvent_original(GHOST_IEvent* event)
+{
bool handled;
if (event) {
handled = true;
@@ -120,8 +142,8 @@
}
return handled;
 }
+#endif
 
-
 bool GHOST_EventManager::dispatchEvent()
 {
GHOST_IEvent* event = popEvent(); 
@@ -152,6 +174,51 @@
 }
 
 
+bool GHOST_EventManager::dispatchEvents_lo_fi()
+{
+   if (m_events.empty())
+   return false;
+
+   bool allHandled = true;
+   GHOST_IEvent* cursorMove = NULL;
+   GHOST_IEvent* event = NULL;
+
+   GHOST_EventPrinter printer;
+
+   // when Pen gets its own event type, track it alongside mouse moves
+   // they probably won't both be active, but you never know
+
+   cout  \n--- lo-fi dispatch ---;
+   cout  \ndiscard:;
+   while ((event = popEvent()) != NULL) {
+   if (event-getType() == GHOST_kEventCursorMove) {
+   // just a simple (x,y) pair, nothing much to adjust
+   // discard the older event and keep the latest
+   if (cursorMove) {
+   printer.processEvent(cursorMove);
+   delete cursorMove;
+   }
+   cursorMove = event;
+   }
+   else // not a cursor move event
+   if (!dispatchEvent(event))
+   allHandled = false;
+   }
+   
+   // finally dispatch the single cursor update
+   if (cursorMove) {
+   cout  \nsend:;
+   printer.processEvent(cursorMove);
+   if (!dispatchEvent(cursorMove))
+   allHandled = false;
+   }
+
+   cout  endl;
+
+   return allHandled;
+}
+
+
 GHOST_TSuccess GHOST_EventManager::addConsumer(GHOST_IEventConsumer* consumer)
 {
GHOST_TSuccess success;

Modified: branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.h
===
--- branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.h   
2010-07-08 00:01:16 UTC (rev 30097)
+++ branches/soc-2010-merwin/intern/ghost/intern/GHOST_EventManager.h   
2010-07-08 01:53:36 UTC (rev 30098)
@@ -109,6 +109,14 @@
virtual bool dispatchEvents();
 
/**
+* Dispatches most events on the stack, consolidating cursor moves into 
a single move.
+* The event stack will be empty afterwards.
+* @return Indicates whether all events were handled by some consumer.
+*/
+   bool dispatchEvents_lo_fi();
+
+
+   /**
 * Adds a consumer to the list of event consumers.
 * @param consumer The consumer added to the list.
 * @return Indication as to whether addition has succeeded.

Modified: