[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23297] trunk/blender: rna function api was overwriting useful errors with keyword errors.

2009-09-16 Thread Campbell Barton
Revision: 23297
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23297
Author:   campbellbarton
Date: 2009-09-17 02:14:47 +0200 (Thu, 17 Sep 2009)

Log Message:
---
rna function api was overwriting useful errors with keyword errors.
fix some missing checks in the python interface.

Modified Paths:
--
trunk/blender/release/ui/buttons_data_mesh.py
trunk/blender/release/ui/buttons_material.py
trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/release/ui/buttons_data_mesh.py
===
--- trunk/blender/release/ui/buttons_data_mesh.py   2009-09-16 22:27:27 UTC 
(rev 23296)
+++ trunk/blender/release/ui/buttons_data_mesh.py   2009-09-17 00:14:47 UTC 
(rev 23297)
@@ -102,7 +102,8 @@
kb = ob.active_shape_key
 
row = layout.row()
-   row.template_list(key, "keys", ob, "active_shape_key_index", 
rows=2)
+   if key: # XXX - looks crappy
+   row.template_list(key, "keys", ob, 
"active_shape_key_index", rows=2)
 
col = row.column()
 

Modified: trunk/blender/release/ui/buttons_material.py
===
--- trunk/blender/release/ui/buttons_material.py2009-09-16 22:27:27 UTC 
(rev 23296)
+++ trunk/blender/release/ui/buttons_material.py2009-09-17 00:14:47 UTC 
(rev 23297)
@@ -65,8 +65,9 @@
elif mat:
split.template_ID(space, "pin_id")
split.itemS()
-
-   layout.itemR(mat, "type", expand=True)
+   
+   if mat:
+   layout.itemR(mat, "type", expand=True)

 class MATERIAL_PT_shading(MaterialButtonsPanel):
__label__ = "Shading"

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===
--- trunk/blender/source/blender/python/intern/bpy_rna.c2009-09-16 
22:27:27 UTC (rev 23296)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c2009-09-17 
00:14:47 UTC (rev 23297)
@@ -1994,8 +1994,10 @@
 
/* Check if we gave args that dont exist in the function
 * printing the error is slow but it should only happen when developing.
-* the if below is quick, checking if it passed less keyword args then 
we gave */
-   if(kw && (PyDict_Size(kw) > kw_tot)) {
+* the if below is quick, checking if it passed less keyword args then 
we gave.
+* (Dont overwrite the error if we have one, otherwise can skip 
important messages and confuse with args)
+*/
+   if(err == 0 && kw && (PyDict_Size(kw) > kw_tot)) {
PyObject *key, *value;
Py_ssize_t pos = 0;
 


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23296] trunk/blender/intern/ghost/intern/ GHOST_SystemCarbon.cpp: * fix compilation on osx

2009-09-16 Thread Matt Ebb
Revision: 23296
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23296
Author:   broken
Date: 2009-09-17 00:27:27 +0200 (Thu, 17 Sep 2009)

Log Message:
---
* fix compilation on osx

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp
===
--- trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp2009-09-16 
22:27:22 UTC (rev 23295)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCarbon.cpp2009-09-16 
22:27:27 UTC (rev 23296)
@@ -788,21 +788,21 @@

switch(tabletProximityRecord.pointerType)
{
case 1: /* stylus */
-   ct.Active = 1;
+   ct.Active = 
GHOST_kTabletModeStylus;
break;
case 2: /* puck, not supported 
so far */
-   ct.Active = 0;
+   ct.Active = 
GHOST_kTabletModeNone;
break;
case 3: /* eraser */
-   ct.Active = 2;
+   ct.Active = 
GHOST_kTabletModeEraser;
break;
default:
-   ct.Active = 0;
+   ct.Active = 
GHOST_kTabletModeNone;
break;
}
} else {
// pointer is leaving - return to mouse
-   ct.Active = 0;
+   ct.Active = GHOST_kTabletModeNone;
}
}
}


___
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 [23295] branches/bmesh/blender/source/ blender/editors/mesh: forgot this file

2009-09-16 Thread Joseph Eagar
Revision: 23295
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23295
Author:   joeedh
Date: 2009-09-17 00:27:22 +0200 (Thu, 17 Sep 2009)

Log Message:
---
forgot this file

Modified Paths:
--
branches/bmesh/blender/source/blender/editors/mesh/bmeshutils.c

Added Paths:
---
branches/bmesh/blender/source/blender/editors/mesh/loopcut.c

Modified: branches/bmesh/blender/source/blender/editors/mesh/bmeshutils.c
===
--- branches/bmesh/blender/source/blender/editors/mesh/bmeshutils.c 
2009-09-16 22:13:48 UTC (rev 23294)
+++ branches/bmesh/blender/source/blender/editors/mesh/bmeshutils.c 
2009-09-16 22:27:22 UTC (rev 23295)
@@ -503,7 +503,6 @@
}
 }
 
-
 void EDBM_set_flag_all(BMEditMesh *em, int flag)
 {
BMIter iter;

Added: branches/bmesh/blender/source/blender/editors/mesh/loopcut.c
===
--- branches/bmesh/blender/source/blender/editors/mesh/loopcut.c
(rev 0)
+++ branches/bmesh/blender/source/blender/editors/mesh/loopcut.c
2009-09-16 22:27:22 UTC (rev 23295)
@@ -0,0 +1,457 @@
+/**
+ * $Id:
+ *
+ * * BEGIN GPL LICENSE BLOCK *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Joseph Eagar, Joshua Leung
+ *
+ * * END GPL LICENSE BLOCK *
+ */
+
+#include 
+#define _USE_MATH_DEFINES
+#include 
+#include 
+#include 
+#include 
+
+#include "DNA_ID.h"
+#include "DNA_screen_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_windowmanager_types.h"
+#include "DNA_object_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "PIL_time.h"
+
+#include "BLI_blenlib.h"
+#include "BLI_dynstr.h" /*for WM_operator_pystring */
+#include "BLI_editVert.h"
+
+#include "BKE_blender.h"
+#include "BKE_context.h"
+#include "BKE_scene.h"
+#include "BKE_utildefines.h"
+#include "BKE_mesh.h"
+#include "BKE_tessmesh.h"
+#include "BKE_depsgraph.h"
+
+#include "BIF_gl.h"
+#include "BIF_glutil.h" /* for paint cursor */
+
+#include "IMB_imbuf_types.h"
+
+#include "ED_screen.h"
+#include "ED_util.h"
+#include "ED_space_api.h"
+#include "ED_view3d.h"
+#include "ED_mesh.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "mesh_intern.h"
+
+/* ringsel operator */
+
+/* struct for properties used while drawing */
+typedef struct tringselOpData {
+   ARegion *ar;/* region that ringsel was activated in */
+   void *draw_handle;  /* for drawing preview loop */
+   
+   float (*edges)[2][3];
+   int totedge;
+
+   ViewContext vc;
+
+   Object *ob;
+   BMEditMesh *em;
+   BMEdge *eed;
+
+   int extend;
+   int do_cut;
+} tringselOpData;
+
+/* modal loop selection drawing callback */
+static void ringsel_draw(const bContext *C, ARegion *ar, void *arg)
+{
+   int i;
+   tringselOpData *lcd = arg;
+   
+   glDisable(GL_DEPTH_TEST);
+
+   glPushMatrix();
+   glMultMatrixf(lcd->ob->obmat);
+
+   glColor3ub(255, 0, 255);
+   glBegin(GL_LINES);
+   for (i=0; itotedge; i++) {
+   glVertex3fv(lcd->edges[i][0]);
+   glVertex3fv(lcd->edges[i][1]);
+   }
+   glEnd();
+
+   glPopMatrix();
+   glEnable(GL_DEPTH_TEST);
+}
+
+static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
+{
+   BMEditMesh *em = lcd->em;
+   BMEdge *startedge = lcd->eed;
+   BMEdge *eed, *lasteed;
+   BMVert *v[2][2];
+   BMWalker walker;
+   float (*edges)[2][3] = NULL;
+   V_DYNDECLARE(edges);
+   float co[2][3];
+   int looking=1, i, j=0, tot=0;
+   
+   if (!startedge)
+   return;
+
+   if (lcd->edges) {
+   MEM_freeN(lcd->edges);
+   lcd->edges = NULL;
+   lcd->totedge = 0;
+   }
+
+   if (!lcd->extend) {
+   EDBM_clear_flag_all(lcd->em, BM_SELECT);
+   }
+
+   if (select) {
+ 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23294] branches/blender2.4/source/blender : bugfix for LineIntersectLine()

2009-09-16 Thread Remigiusz Fiedler
Revision: 23294
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23294
Author:   migius
Date: 2009-09-17 00:13:48 +0200 (Thu, 17 Sep 2009)

Log Message:
---
bugfix for LineIntersectLine()
- was imperfect calculation for points marking shortest distance for 
non-crossing lines in 3d

Modified Paths:
--
branches/blender2.4/source/blender/blenlib/intern/arithb.c
branches/blender2.4/source/blender/python/api2_2x/Mathutils.c

Modified: branches/blender2.4/source/blender/blenlib/intern/arithb.c
===
--- branches/blender2.4/source/blender/blenlib/intern/arithb.c  2009-09-16 
22:12:23 UTC (rev 23293)
+++ branches/blender2.4/source/blender/blenlib/intern/arithb.c  2009-09-16 
22:13:48 UTC (rev 23294)
@@ -4316,7 +4316,7 @@

VecSubf(c, v3t, v1);
VecSubf(a, v2, v1);
-   VecSubf(b, v4t, v3);
+   VecSubf(b, v4t, v3t);
 
Crossf(ab, a, b);
Crossf(cb, c, b);

Modified: branches/blender2.4/source/blender/python/api2_2x/Mathutils.c
===
--- branches/blender2.4/source/blender/python/api2_2x/Mathutils.c   
2009-09-16 22:12:23 UTC (rev 23293)
+++ branches/blender2.4/source/blender/python/api2_2x/Mathutils.c   
2009-09-16 22:13:48 UTC (rev 23294)
@@ -1360,7 +1360,7 @@
PyErr_SetString( PyExc_TypeError, "expected 4 vector types\n" );
return NULL;
}
-   if( vec1->size != vec2->size || vec1->size != vec3->size || vec1->size 
!= vec2->size) {
+   if( vec1->size != vec2->size || vec1->size != vec3->size || vec3->size 
!= vec2->size) {
PyErr_SetString( PyExc_TypeError,"vectors must be of the same 
size\n" );
return NULL;
}


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23293] trunk/blender/source/blender: bugfix for LineIntersectLine()

2009-09-16 Thread Remigiusz Fiedler
Revision: 23293
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23293
Author:   migius
Date: 2009-09-17 00:12:23 +0200 (Thu, 17 Sep 2009)

Log Message:
---
bugfix for LineIntersectLine()
- was imperfect calculation for points marking shortest distance for 
non-crossing lines in 3d

Modified Paths:
--
trunk/blender/source/blender/blenlib/intern/arithb.c
trunk/blender/source/blender/python/generic/Mathutils.c

Modified: trunk/blender/source/blender/blenlib/intern/arithb.c
===
--- trunk/blender/source/blender/blenlib/intern/arithb.c2009-09-16 
20:07:05 UTC (rev 23292)
+++ trunk/blender/source/blender/blenlib/intern/arithb.c2009-09-16 
22:12:23 UTC (rev 23293)
@@ -4715,7 +4715,7 @@

VecSubf(c, v3t, v1);
VecSubf(a, v2, v1);
-   VecSubf(b, v4t, v3);
+   VecSubf(b, v4t, v3t);
 
Crossf(ab, a, b);
Crossf(cb, c, b);

Modified: trunk/blender/source/blender/python/generic/Mathutils.c
===
--- trunk/blender/source/blender/python/generic/Mathutils.c 2009-09-16 
20:07:05 UTC (rev 23292)
+++ trunk/blender/source/blender/python/generic/Mathutils.c 2009-09-16 
22:12:23 UTC (rev 23293)
@@ -912,7 +912,7 @@
PyErr_SetString( PyExc_TypeError, "expected 4 vector types\n" );
return NULL;
}
-   if( vec1->size != vec2->size || vec1->size != vec3->size || vec1->size 
!= vec2->size) {
+   if( vec1->size != vec2->size || vec1->size != vec3->size || vec3->size 
!= vec2->size) {
PyErr_SetString( PyExc_TypeError,"vectors must be of the same 
size\n" );
return NULL;
}


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23292] trunk/blender/source/blender/ editors/space_node/drawnode.c: 2.5:

2009-09-16 Thread Thomas Dinges
Revision: 23292
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23292
Author:   dingto
Date: 2009-09-16 22:07:05 +0200 (Wed, 16 Sep 2009)

Log Message:
---
2.5:
Test Commit, converted Filter Composite Node to use layout engine. :)
Will do other Nodes in the next few days. 

Modified Paths:
--
trunk/blender/source/blender/editors/space_node/drawnode.c

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2009-09-16 
19:58:01 UTC (rev 23291)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2009-09-16 
20:07:05 UTC (rev 23292)
@@ -1449,16 +1449,7 @@
 
 static void node_composit_buts_filter(uiLayout *layout, PointerRNA *ptr)
 {
-   uiBlock *block= uiLayoutFreeBlock(layout);
-   bNode *node= ptr->data;
-   rctf *butr= &node->butr;
-   uiBut *bt;
-   
-   /* blend type */
-   bt=uiDefButS(block, MENU, B_NODE_EXEC, "Soften %x0|Sharpen %x1|Laplace 
%x2|Sobel %x3|Prewitt %x4|Kirsch %x5|Shadow %x6",
-butr->xmin, butr->ymin, butr->xmax-butr->xmin, 
20, 
-&node->custom1, 0, 0, 0, 0, "");
-   uiButSetFunc(bt, node_but_title_cb, node, bt);
+   uiItemR(layout, "", 0, ptr, "filter_type", 0);
 }
 
 static void node_composit_buts_flip(uiLayout *layout, PointerRNA *ptr)


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23291] trunk/blender/source/blender: *Changed image field order property to enum, making it consistent with the corresponding render option

2009-09-16 Thread William Reynish
Revision: 23291
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23291
Author:   billrey
Date: 2009-09-16 21:58:01 +0200 (Wed, 16 Sep 2009)

Log Message:
---
*Changed image field order property to enum, making it consistent with the 
corresponding render option
*Tiny edit to image panel.

Modified Paths:
--
trunk/blender/source/blender/editors/space_image/image_buttons.c
trunk/blender/source/blender/makesrna/intern/rna_image.c

Modified: trunk/blender/source/blender/editors/space_image/image_buttons.c
===
--- trunk/blender/source/blender/editors/space_image/image_buttons.c
2009-09-16 19:47:58 UTC (rev 23290)
+++ trunk/blender/source/blender/editors/space_image/image_buttons.c
2009-09-16 19:58:01 UTC (rev 23291)
@@ -1014,13 +1014,31 @@
image_info(ima, ibuf, str);
uiItemL(layout, str, 0);
}
-   
+   
+   if(ima->source != IMA_SRC_GENERATED) {
+   uiItemS(layout);
+
+   split= uiLayoutSplit(layout, 0);
+
+   col= uiLayoutColumn(split, 0);
+   uiItemR(col, NULL, 0, &imaptr, "fields", 0);
+   row= uiLayoutRow(col, 0);
+   uiItemR(row, NULL, 0, &imaptr, "field_order", 
UI_ITEM_R_EXPAND);
+   uiLayoutSetActive(row, RNA_boolean_get(&imaptr, 
"fields"));
+
+   col= uiLayoutColumn(split, 0);
+   uiItemR(col, NULL, 0, &imaptr, "antialias", 0);
+   uiItemR(col, NULL, 0, &imaptr, "premultiply", 
0);
+   }
+
if(ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
+   uiItemS(layout);
+   
split= uiLayoutSplit(layout, 0);
 
col= uiLayoutColumn(split, 0);
 
-   sprintf(str, "(%d) Frames:", iuser->framenr);
+   sprintf(str, "(%d) Frames", iuser->framenr);
row= uiLayoutRow(col, 1);
uiItemR(col, str, 0, userptr, "frames", 0);
if(ima->anim) {
@@ -1048,23 +1066,8 @@
uiItemR(col, NULL, 0, &imaptr, 
"generated_type", UI_ITEM_R_EXPAND);
}
 
-   if(ima->source != IMA_SRC_GENERATED) {
-   uiItemS(layout);
+   }
 
-   split= uiLayoutSplit(layout, 0);
-
-   col= uiLayoutColumn(split, 0);
-   uiItemR(col, NULL, 0, &imaptr, "fields", 0);
-   row= uiLayoutRow(col, 0);
-   uiItemR(row, "Odd", 0, &imaptr, "odd_fields", 
0);
-   uiLayoutSetActive(row, RNA_boolean_get(&imaptr, 
"fields"));
-
-   col= uiLayoutColumn(split, 0);
-   uiItemR(col, NULL, 0, &imaptr, "antialias", 0);
-   uiItemR(col, NULL, 0, &imaptr, "premultiply", 
0);
-   }
-   }
-
uiBlockSetNFunc(block, NULL, NULL, NULL);
}
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_image.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_image.c2009-09-16 
19:47:58 UTC (rev 23290)
+++ trunk/blender/source/blender/makesrna/intern/rna_image.c2009-09-16 
19:58:01 UTC (rev 23291)
@@ -217,6 +217,10 @@
{0, "UV", 0, "UV Coordinates", "Use UV coordinates for mapping 
the image"},
{IMA_REFLECT, "REFLECTION", 0, "Reflection", "Use reflection 
mapping for mapping the image"},
{0, NULL, 0, NULL, NULL}};
+   static const EnumPropertyItem prop_field_order_items[]= {
+   {0, "EVEN", 0, "Even", "Even Fields first"},
+   {IMA_STD_FIELD, "Odd", 0, "Odd", "Odd Fields first"},
+   {0, NULL, 0, NULL, NULL}};
 
srna= RNA_def_struct(brna, "Image", "ID");
RNA_def_struct_ui_text(srna, "Image", "Image datablock referencing an 
external or packed image.");
@@ -242,18 +246,19 @@
prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
-
+   
+   prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
+   RNA_de

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23290] trunk/blender/release/io/netrender : fix bugs with file transfer

2009-09-16 Thread Martin Poirier
Revision: 23290
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23290
Author:   theeth
Date: 2009-09-16 21:47:58 +0200 (Wed, 16 Sep 2009)

Log Message:
---
fix bugs with file transfer

Modified Paths:
--
trunk/blender/release/io/netrender/master.py
trunk/blender/release/io/netrender/slave.py
trunk/blender/release/io/netrender/utils.py

Modified: trunk/blender/release/io/netrender/master.py
===
--- trunk/blender/release/io/netrender/master.py2009-09-16 19:36:17 UTC 
(rev 23289)
+++ trunk/blender/release/io/netrender/master.py2009-09-16 19:47:58 UTC 
(rev 23290)
@@ -323,8 +323,9 @@

if render_file:
self.server.stats("", "Sending 
file to render node")
-   f = open(render_file.path, 'rb')
+   f = open(render_file.filepath, 
'rb')

+   self.send_head()
shutil.copyfileobj(f, 
self.wfile)

f.close()
@@ -444,7 +445,7 @@
render_file = job.files_map.get(job_file, None)

if render_file:
-   main_file = job.files[0]
+   main_file = job.files[0][0] # filename 
of the first file

main_path, main_name = 
os.path.split(main_file)

@@ -462,12 +463,12 @@
f.close()
del buf

-   render_file.path = file_path # set the 
new path
+   render_file.filepath = file_path # set 
the new path

if job.testStart():
-   self.send_head(headers=headers)
+   self.send_head(http.client.OK)
else:
-   
self.send_head(http.client.ACCEPTED, headers=headers)
+   
self.send_head(http.client.ACCEPTED)
else: # invalid file
self.send_head(http.client.NO_CONTENT)
else: # job not found

Modified: trunk/blender/release/io/netrender/slave.py
===
--- trunk/blender/release/io/netrender/slave.py 2009-09-16 19:36:17 UTC (rev 
23289)
+++ trunk/blender/release/io/netrender/slave.py 2009-09-16 19:47:58 UTC (rev 
23290)
@@ -26,12 +26,12 @@
else:
return False
 
-def testFile(conn, JOB_PREFIX, file_path, main_path = None):
+def testFile(conn, job_id, slave_id, JOB_PREFIX, file_path, main_path = None):
job_full_path = prefixPath(JOB_PREFIX, file_path, main_path)

if not os.path.exists(job_full_path):
temp_path = JOB_PREFIX + "slave.temp.blend"
-   conn.request("GET", "file", headers={"job-id": job.id, 
"slave-id":slave_id, "job-file":file_path})
+   conn.request("GET", "file", headers={"job-id": job_id, 
"slave-id":slave_id, "job-file":file_path})
response = conn.getresponse()

if response.status != http.client.OK:
@@ -86,14 +86,14 @@
job_path = job.files[0][0] # data in files have 
format (path, start, end)
main_path, main_file = os.path.split(job_path)

-   job_full_path = testFile(conn, JOB_PREFIX, 
job_path)
+   job_full_path = testFile(conn, job.id, 
slave_id, JOB_PREFIX, job_path)
print("Fullpath", job_full_path)
print("File:", main_file, "and %i other files" 
% (len(job.files) - 1,))
engine.update_stats("", "Render File", 
main_file, "for job", job.id)

for file_path, start, end in job.files[1:]:
print("\t", file_path)
-   testFile(conn, JOB_PREFIX, file_path, 
main_path)
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23289] trunk/blender/source/blender/ editors: UI

2009-09-16 Thread Brecht Van Lommel
Revision: 23289
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23289
Author:   blendix
Date: 2009-09-16 21:36:17 +0200 (Wed, 16 Sep 2009)

Log Message:
---
UI

* Removed some legacy code which is not needed anymore now.
* Move some test_*poin_but functions to logic space code,
  since that's the only place using it still.
* uiIconFromID now uses RNA info to lookup the icon, to avoid
  code duplication, and means it works for more ID types.

Modified Paths:
--
trunk/blender/source/blender/editors/include/UI_interface.h
trunk/blender/source/blender/editors/interface/interface_templates.c
trunk/blender/source/blender/editors/interface/interface_utils.c
trunk/blender/source/blender/editors/space_buttons/space_buttons.c
trunk/blender/source/blender/editors/space_graph/graph_buttons.c
trunk/blender/source/blender/editors/space_logic/logic_window.c

Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===
--- trunk/blender/source/blender/editors/include/UI_interface.h 2009-09-16 
19:27:23 UTC (rev 23288)
+++ trunk/blender/source/blender/editors/include/UI_interface.h 2009-09-16 
19:36:17 UTC (rev 23289)
@@ -418,7 +418,6 @@
 
 uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, 
int retval, char *str,
short x1, short y1, short x2, 
short y2, void *idpp, char *tip);
-int uiDefIDPoinButs(uiBlock *block, struct Main *main, struct ID *parid, 
struct ID *id, int id_code, short *pin_p, int x, int y, uiIDPoinFunc func, int 
events);
 
 int uiIconFromID(struct ID *id);
 
@@ -531,29 +530,6 @@
 void UI_add_area_handlers(struct ListBase *handlers);
 void UI_add_popup_handlers(struct bContext *C, struct ListBase *handlers, 
uiPopupBlockHandle *menu);
 
-/* Legacy code
- * Callbacks and utils to get 2.48 work */
-
-void test_idbutton_cb(struct bContext *C, void *namev, void *arg2);
-void test_scriptpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_actionpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_obpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_meshobpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_meshpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_matpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_scenepoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_grouppoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_texpoin_but(struct bContext *C, char *name, struct ID **idpp);
-void test_imapoin_but(struct bContext *C, char *name, struct ID **idpp);
-void autocomplete_bone(struct bContext *C, char *str, void *arg_v);
-void autocomplete_vgroup(struct bContext *C, char *str, void *arg_v);
-
-struct rctf;
-void curvemap_buttons(uiBlock *block, struct CurveMapping *cumap, char 
labeltype, short event, short redraw, struct rctf *rect);
-void curvemap_layout(uiLayout *layout, struct CurveMapping *cumap, char 
labeltype, short event, short redraw, struct rctf *rect);
-void colorband_buttons(uiBlock *block, struct ColorBand *coba, struct rctf 
*rect, int small);
-
-
 /* Module
  *
  * init and exit should be called before using this module. init_userdef must

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===
--- trunk/blender/source/blender/editors/interface/interface_templates.c
2009-09-16 19:27:23 UTC (rev 23288)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c
2009-09-16 19:36:17 UTC (rev 23289)
@@ -762,6 +762,22 @@
}
 }
 
+static void test_obpoin_but(bContext *C, char *name, ID **idpp)
+{
+   ID *id;
+   
+   id= CTX_data_main(C)->object.first;
+   while(id) {
+   if( strcmp(name, id->name+2)==0 ) {
+   *idpp= id;
+   id_lib_extern(id);  /* checks lib data, sets 
correct flag for saving then */
+   return;
+   }
+   id= id->next;
+   }
+   *idpp= NULL;
+}
+
 /* draw panel showing settings for a constraint */
 static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint 
*con)
 {
@@ -956,11 +972,11 @@
/* subtarget */
if 
(is_armature_target(ct->tar)) {
but= 
uiDefBut(block, TEX, B_CONSTRAINT_CHANGETARGET, "BO:", xco+120, 
yco-(66+yoffset),150,18, &ct->subtarget, 0, 24, 0, 0, "Subtarget Bone");
-   
uiButSetCompleteFunc(but, autocomplete_bone, (void *)ct->tar);
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23288] trunk/blender/release/ui/ space_view3d_toolbar.py: Tiny fix for mistake in toolbar.

2009-09-16 Thread William Reynish
Revision: 23288
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23288
Author:   billrey
Date: 2009-09-16 21:27:23 +0200 (Wed, 16 Sep 2009)

Log Message:
---
Tiny fix for mistake in toolbar.

Modified Paths:
--
trunk/blender/release/ui/space_view3d_toolbar.py

Modified: trunk/blender/release/ui/space_view3d_toolbar.py
===
--- trunk/blender/release/ui/space_view3d_toolbar.py2009-09-16 19:27:08 UTC 
(rev 23287)
+++ trunk/blender/release/ui/space_view3d_toolbar.py2009-09-16 19:27:23 UTC 
(rev 23288)
@@ -67,9 +67,12 @@
col = layout.column(align=True)
col.itemL(text="Modeling:")
col.itemO("mesh.extrude")
+   col.itemO("mesh.extrude_repeat", text="Extrude Repeat")
col.itemO("mesh.subdivide")
col.itemO("mesh.spin")
col.itemO("mesh.screw")
+   col.itemO("mesh.merge")
+   col.itemO("mesh.rip_move")

col = layout.column(align=True)
col.itemL(text="Shading:")
@@ -288,7 +291,7 @@
col.itemO("pose.reveal", text="Reveal")

col = layout.column(align=True)
-   layout.itemL(text="Keyframes:")
+   col.itemL(text="Keyframes:")
col.itemO("anim.insert_keyframe_menu", text="Insert")
col.itemO("anim.delete_keyframe_v3d", text="Remove")



___
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 [23287] trunk/blender: Image Panels

2009-09-16 Thread Brecht Van Lommel
Revision: 23287
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23287
Author:   blendix
Date: 2009-09-16 21:27:08 +0200 (Wed, 16 Sep 2009)

Log Message:
---
Image Panels

* The image panels in the image editor and texture buttons
  should be more complete now, with working new/open,
  refreshes, and using the layout engine.
* Paint panels in image editor are now consistent with the
  ones in the 3d view toolbar.
* Curves panel also uses layout engine, and doesn't look
  squashed anymore.

Modified Paths:
--
trunk/blender/release/ui/space_image.py
trunk/blender/source/blender/blenkernel/intern/image.c
trunk/blender/source/blender/blenkernel/intern/paint.c
trunk/blender/source/blender/editors/include/ED_image.h
trunk/blender/source/blender/editors/interface/interface_templates.c
trunk/blender/source/blender/editors/space_image/image_buttons.c
trunk/blender/source/blender/editors/space_image/image_ops.c
trunk/blender/source/blender/editors/uvedit/uvedit_ops.c
trunk/blender/source/blender/makesrna/intern/rna_color.c
trunk/blender/source/blender/makesrna/intern/rna_image.c
trunk/blender/source/blender/makesrna/intern/rna_space.c
trunk/blender/source/blender/makesrna/intern/rna_texture.c
trunk/blender/source/blender/makesrna/intern/rna_ui_api.c

Modified: trunk/blender/release/ui/space_image.py
===
--- trunk/blender/release/ui/space_image.py 2009-09-16 18:59:13 UTC (rev 
23286)
+++ trunk/blender/release/ui/space_image.py 2009-09-16 19:27:08 UTC (rev 
23287)
@@ -277,6 +277,24 @@
if show_uvedit or sima.image_painting:
layout.itemR(sima, "update_automatically", text="")
 
+class IMAGE_PT_image_properties(bpy.types.Panel):
+   __space_type__ = 'IMAGE_EDITOR'
+   __region_type__ = 'UI'
+   __label__ = "Image"
+
+   def poll(self, context):
+   sima = context.space_data
+   return (sima.image)
+
+   def draw(self, context):
+   layout = self.layout
+
+   sima = context.space_data
+   ima = sima.image
+   iuser = sima.image_user
+
+   layout.template_image(sima, "image", iuser, compact=True)
+
 class IMAGE_PT_game_properties(bpy.types.Panel):
__space_type__ = 'IMAGE_EDITOR'
__region_type__ = 'UI'
@@ -368,6 +386,92 @@
#col.itemR(uvedit, "draw_edges")
#col.itemR(uvedit, "draw_faces")
 
+class IMAGE_PT_paint(bpy.types.Panel):
+   __space_type__ = 'IMAGE_EDITOR'
+   __region_type__ = 'UI'
+   __label__ = "Paint"
+
+   def poll(self, context):
+   sima = context.space_data
+   return sima.show_paint
+
+   def draw(self, context):
+   layout = self.layout
+   
+   settings = context.tool_settings.image_paint
+   brush = settings.brush
+
+   col = layout.split().column()
+   row = col.row()
+   row.template_list(settings, "brushes", settings, 
"active_brush_index", rows=2)
+   
+   col.template_ID(settings, "brush", new="brush.add")
+
+   row = layout.row(align=True)
+   row.item_enumR(settings, "tool", 'DRAW')
+   row.item_enumR(settings, "tool", 'SOFTEN')
+   row.item_enumR(settings, "tool", 'CLONE')
+   row.item_enumR(settings, "tool", 'SMEAR')
+   
+   col = layout.column()
+   col.itemR(brush, "color", text="")
+
+   row = col.row(align=True)
+   row.itemR(brush, "size", slider=True)
+   row.itemR(brush, "size_pressure", toggle=True, text="")
+   
+   row = col.row(align=True)
+   row.itemR(brush, "strength", slider=True)
+   row.itemR(brush, "strength_pressure", toggle=True, text="")
+   
+   col.itemR(brush, "blend", text="Blend")
+
+class IMAGE_PT_paint_stroke(bpy.types.Panel):
+   __space_type__ = 'IMAGE_EDITOR'
+   __region_type__ = 'UI'
+   __label__ = "Paint Stroke"
+   __default_closed__ = True
+
+   def poll(self, context):
+   sima = context.space_data
+   return sima.show_paint
+
+   def draw(self, context):
+   layout = self.layout
+   
+   settings = context.tool_settings.image_paint
+   brush = settings.brush
+
+   layout.itemR(brush, "airbrush")
+   col = layout.column()
+   col.active = brush.airbrush
+   col.itemR(brush, "rate", slider=True)
+
+   layout.itemR(brush, "space")
+   row = layout.row(align=True)
+   row.active = brush.space
+ 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23286] trunk/blender/source/blender: UI

2009-09-16 Thread Brecht Van Lommel
Revision: 23286
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23286
Author:   blendix
Date: 2009-09-16 20:59:13 +0200 (Wed, 16 Sep 2009)

Log Message:
---
UI

* Node buttons can now use the layout engine. a few simple
  ones are converted. We'll keep this code in C for now,
  python wouldn't help much here.
* For node buttons not using the layout engine, manually
  computing the button height is not longer needed.
* Node inputs are still not RNA wrapped, would be good to
  have these available as well for keying, but makesrna does
  not have access to the bNodeTypes.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_node.h
trunk/blender/source/blender/editors/include/ED_node.h
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/editors/space_node/node_draw.c
trunk/blender/source/blender/makesdna/DNA_node_types.h
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
trunk/blender/source/blenderplayer/bad_level_call_stubs/stubs.c

Modified: trunk/blender/source/blender/blenkernel/BKE_node.h
===
--- trunk/blender/source/blender/blenkernel/BKE_node.h  2009-09-16 18:47:42 UTC 
(rev 23285)
+++ trunk/blender/source/blender/blenkernel/BKE_node.h  2009-09-16 18:59:13 UTC 
(rev 23286)
@@ -42,7 +42,7 @@
 struct bNodeLink;
 struct bNodeSocket;
 struct bNodeStack;
-struct uiBlock;
+struct uiLayout;
 struct rctf;
 struct ListBase;
 struct RenderData;
@@ -52,6 +52,7 @@
 struct GPUMaterial;
 struct GPUNode;
 struct GPUNodeStack;
+struct PointerRNA;
 
 /* ** NODE TYPE DEFINITIONS * */
 
@@ -82,7 +83,7 @@
void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, 
struct bNodeStack **);

/* this line is set on startup of blender */
-   int (*butfunc)(struct uiBlock *, struct bNodeTree *, struct bNode *, 
struct rctf *);
+   void (*uifunc)(struct uiLayout *, struct PointerRNA *ptr);
 
void (*initfunc)(struct bNode *);
void (*freestoragefunc)(struct bNode *);

Modified: trunk/blender/source/blender/editors/include/ED_node.h
===
--- trunk/blender/source/blender/editors/include/ED_node.h  2009-09-16 
18:47:42 UTC (rev 23285)
+++ trunk/blender/source/blender/editors/include/ED_node.h  2009-09-16 
18:59:13 UTC (rev 23286)
@@ -31,10 +31,15 @@
 struct Material;
 struct Scene;
 struct Tex;
+struct bContext;
+struct bNode;
 
 /* drawnode.c */
 void ED_init_node_butfuncs(void);
 
+/* node_draw.c */
+void ED_node_changed_update(struct bContext *C, struct bNode *node);
+
 /* node_edit.c */
 void ED_node_shader_default(struct Material *ma);
 void ED_node_composit_default(struct Scene *sce);

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2009-09-16 
18:47:42 UTC (rev 23285)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2009-09-16 
18:59:13 UTC (rev 23286)
@@ -170,9 +170,13 @@
 
 /* ** BUTTON CALLBACKS FOR ALL TREES * */
 
-static int node_buts_group(uiBlock *block, bNodeTree *ntree, bNode *node, rctf 
*butr)
+static void node_buts_group(uiLayout *layout, PointerRNA *ptr)
 {
-   if(block && node->id) {
+   uiBlock *block= uiLayoutFreeBlock(layout);
+   bNode *node= ptr->data;
+   rctf *butr= &node->butr;
+
+   if(node->id) {
uiBut *bt;
short width;

@@ -197,112 +201,95 @@

uiBlockEndAlign(block);
}   
-   return 19;
 }
 #endif
 
-static int node_buts_value(uiBlock *block, bNodeTree *ntree, bNode *node, rctf 
*butr)
+static void node_buts_value(uiLayout *layout, PointerRNA *ptr)
 {
-   if(block) {
-   bNodeSocket *sock= node->outputs.first; /* first socket 
stores value */
-   
-   uiDefButF(block, NUM, B_NODE_EXEC, "", 
- (short)butr->xmin, (short)butr->ymin, 
butr->xmax-butr->xmin, 20, 
- sock->ns.vec, sock->ns.min, sock->ns.max, 10, 
2, "");
-   
-   }
-   return 20;
+   uiBlock *block= uiLayoutFreeBlock(layout);
+   bNode *node= ptr->data;
+   rctf *butr= &node->butr;
+   bNodeSocket *sock= node->outputs.first; /* first socket stores 
value */
+   
+   uiDefButF(block, NUM, B_NODE_EXEC, "", 
+ (short)butr->xmin, (short)butr->ymin, 
butr->xmax-butr->xmin, 20, 
+ sock->ns.vec, sock->ns.min, sock->ns.max, 10, 2, "");
 }
 
-static int node_buts_rgb(uiBlock *block, bNodeTree *ntree, bNode *node, rctf 
*butr)
+static void node_buts_rgb(uiLayout *layout, Poi

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23285] trunk/blender: UI

2009-09-16 Thread Brecht Van Lommel
Revision: 23285
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23285
Author:   blendix
Date: 2009-09-16 20:47:42 +0200 (Wed, 16 Sep 2009)

Log Message:
---
UI
* Fix problem with curve mapping / color ramps not updating
  things like previews propertly. Now it uses the RNA update
  of the pointer from the material/texture/.. so each of those
  can define their own update, but still share the RNA struct.
* Code for these templates is now in interface_templates.c
* Fix exception for "axis" property, now it always shows normal
  widget with the PROP_DIRECTION subtype.
* Remove context from uiBlockLayoutResolve, no longer needed.

Modified Paths:
--
trunk/blender/release/ui/buttons_data_lamp.py
trunk/blender/release/ui/buttons_material.py
trunk/blender/release/ui/buttons_scene.py
trunk/blender/release/ui/buttons_texture.py
trunk/blender/release/ui/space_userpref.py
trunk/blender/release/ui/space_view3d_toolbar.py
trunk/blender/source/blender/editors/include/UI_interface.h
trunk/blender/source/blender/editors/interface/interface.c
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/editors/interface/interface_intern.h
trunk/blender/source/blender/editors/interface/interface_layout.c
trunk/blender/source/blender/editors/interface/interface_regions.c
trunk/blender/source/blender/editors/interface/interface_templates.c
trunk/blender/source/blender/editors/screen/area.c
trunk/blender/source/blender/editors/space_action/action_header.c
trunk/blender/source/blender/makesrna/intern/rna_ui_api.c

Modified: trunk/blender/release/ui/buttons_data_lamp.py
===
--- trunk/blender/release/ui/buttons_data_lamp.py   2009-09-16 18:32:10 UTC 
(rev 23284)
+++ trunk/blender/release/ui/buttons_data_lamp.py   2009-09-16 18:47:42 UTC 
(rev 23285)
@@ -301,7 +301,7 @@
def draw(self, context):
lamp = context.lamp
 
-   self.layout.template_curve_mapping(lamp.falloff_curve)
+   self.layout.template_curve_mapping(lamp, "falloff_curve")
 
 bpy.types.register(DATA_PT_context_lamp)
 bpy.types.register(DATA_PT_preview)

Modified: trunk/blender/release/ui/buttons_material.py
===
--- trunk/blender/release/ui/buttons_material.py2009-09-16 18:32:10 UTC 
(rev 23284)
+++ trunk/blender/release/ui/buttons_material.py2009-09-16 18:47:42 UTC 
(rev 23285)
@@ -28,7 +28,7 @@
# this manages materials for all engine types

engine = context.scene.render_data.engine
-   return (context.object) and (engine in self.COMPAT_ENGINES)
+   return (context.material or context.object) and (engine in 
self.COMPAT_ENGINES)
 
def draw(self, context):
layout = self.layout
@@ -282,7 +282,7 @@

if mat.use_diffuse_ramp:
layout.itemS()
-   layout.template_color_ramp(mat.diffuse_ramp, 
expand=True)
+   layout.template_color_ramp(mat, "diffuse_ramp", 
expand=True)
layout.itemS()
row = layout.row()
split = row.split(percentage=0.3)
@@ -334,7 +334,7 @@

if mat.use_specular_ramp:
layout.itemS()
-   layout.template_color_ramp(mat.specular_ramp, 
expand=True)
+   layout.template_color_ramp(mat, "specular_ramp", 
expand=True)
layout.itemS()
row = layout.row()
split = row.split(percentage=0.3)

Modified: trunk/blender/release/ui/buttons_scene.py
===
--- trunk/blender/release/ui/buttons_scene.py   2009-09-16 18:32:10 UTC (rev 
23284)
+++ trunk/blender/release/ui/buttons_scene.py   2009-09-16 18:47:42 UTC (rev 
23285)
@@ -240,7 +240,8 @@
split = layout.split()

col = split.column()
-   col.itemR(rd, "exr_codec")
+   col.itemL(text="Codec:")
+   col.itemR(rd, "exr_codec", text="")
 
subsplit = split.split()
col = subsplit.column()

Modified: trunk/blender/release/ui/buttons_texture.py
===
--- trunk/blender/release/ui/buttons_texture.py 2009-09-16 18:32:10 UTC (rev 
23284)
+++ trunk/blender/release/ui/buttons_texture.py 2009-09-16 18:47:42 UTC (rev 
23285)
@@ -96,7 +96,7 @@
 
layout.itemR(tex, "use_color_ramp", text="Ramp")
if tex.use_color_ramp:
-

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23284] trunk/blender/source/blender: UI: action editor header now also uses template for browsing action

2009-09-16 Thread Brecht Van Lommel
Revision: 23284
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23284
Author:   blendix
Date: 2009-09-16 20:32:10 +0200 (Wed, 16 Sep 2009)

Log Message:
---
UI: action editor header now also uses template for browsing action
datablocks, was last place using deprecated uiDefIDPoinButs.

Modified Paths:
--
trunk/blender/source/blender/editors/space_action/action_edit.c
trunk/blender/source/blender/editors/space_action/action_header.c
trunk/blender/source/blender/editors/space_action/action_intern.h
trunk/blender/source/blender/editors/space_action/action_ops.c
trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/source/blender/editors/space_action/action_edit.c
===
--- trunk/blender/source/blender/editors/space_action/action_edit.c 
2009-09-16 18:32:03 UTC (rev 23283)
+++ trunk/blender/source/blender/editors/space_action/action_edit.c 
2009-09-16 18:32:10 UTC (rev 23284)
@@ -1331,4 +1331,38 @@
RNA_def_enum(ot->srna, "type", prop_actkeys_mirror_types, 0, "Type", 
"");
 }
 
+/*  New Action Operator *** */
+
+static int act_new_exec(bContext *C, wmOperator *op)
+{
+   bAction *action;
+
+   // XXX need to restore behaviour to copy old actions...
+   action= add_empty_action("Action");
+
+   /* combined with RNA property, this will assign & increase user,
+  so decrease here to compensate for that */
+   action->id.us--;
+   
+   /* set notifier that keyframes have changed */
+   WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
+   
+   return OPERATOR_FINISHED;
+}
+ 
+void ACT_OT_new (wmOperatorType *ot)
+{
+   /* identifiers */
+   ot->name= "New";
+   ot->idname= "ACT_OT_new";
+   ot->description= "Create new action.";
+   
+   /* api callbacks */
+   ot->exec= act_new_exec;
+   ot->poll= ED_operator_action_active;
+   
+   /* flags */
+   ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
 /* ** 
*/

Modified: trunk/blender/source/blender/editors/space_action/action_header.c
===
--- trunk/blender/source/blender/editors/space_action/action_header.c   
2009-09-16 18:32:03 UTC (rev 23283)
+++ trunk/blender/source/blender/editors/space_action/action_header.c   
2009-09-16 18:32:10 UTC (rev 23284)
@@ -260,61 +260,6 @@
}
 }
 
-static void saction_idpoin_handle(bContext *C, ID *id, int event)
-{
-   SpaceAction *saction= CTX_wm_space_action(C);
-   Object *obact= CTX_data_active_object(C);
-   
-   printf("actedit do id: \n");
-   
-   switch (event) {
-   case UI_ID_BROWSE:
-   printf("browse \n");
-   case UI_ID_DELETE:
-   printf("browse or delete \n");
-   saction->action= (bAction*)id;
-   
-   /* we must set this action to be the one used by active 
object (if not pinned) */
-   if (saction->pin == 0) {
-   AnimData *adt= BKE_id_add_animdata(&obact->id); 
/* this only adds if non-existant */
-   
-   /* set action */
-   printf("\tset action \n");
-   adt->action= saction->action;
-   adt->action->id.us++;
-   }
-   
-   ED_area_tag_redraw(CTX_wm_area(C));
-   ED_undo_push(C, "Assign Action");
-   break;
-   case UI_ID_RENAME:
-   printf("actedit rename \n");
-   break;
-   case UI_ID_ADD_NEW:
-   printf("actedit addnew \n");
-   if (saction->pin == 0) {
-   AnimData *adt= BKE_id_add_animdata(&obact->id); 
/* this only adds if non-existant */
-   
-   /* set new action */
-   // XXX need to restore behaviour to copy old 
actions...
-   printf("\tset new action \n");
-   adt->action= saction->action= 
add_empty_action("Action");
-   }
-   break;
-   case UI_ID_OPEN:
-   printf("actedit open \n");
-   /* XXX not implemented */
-   break;
-   case UI_ID_ALONE:
-   printf("actedit alone \n");
-   /* XXX not implemented */
-   break;
-   case UI_ID_

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23283] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: Fixed Resolution and Aspect Ratio Notifier for camera mode in 3D View.

2009-09-16 Thread Thomas Dinges
Revision: 23283
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23283
Author:   dingto
Date: 2009-09-16 20:32:03 +0200 (Wed, 16 Sep 2009)

Log Message:
---
Fixed Resolution and Aspect Ratio Notifier for camera mode in 3D View.
NC_OBJECT, won't do it alone, added ND_DRAW. 

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

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c2009-09-16 
18:22:53 UTC (rev 23282)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2009-09-16 
18:32:03 UTC (rev 23283)
@@ -1308,13 +1308,13 @@
RNA_def_property_int_sdna(prop, NULL, "xsch");
RNA_def_property_range(prop, 4, 1);
RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal 
pixels in the rendered image.");
-   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, 
NULL);
+   RNA_def_property_update(prop, 
NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);

prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ysch");
RNA_def_property_range(prop, 4, 1);
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical 
pixels in the rendered image.");
-   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, 
NULL);
+   RNA_def_property_update(prop, 
NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);

prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, 
PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "size");
@@ -1338,13 +1338,13 @@
RNA_def_property_float_sdna(prop, NULL, "xasp");
RNA_def_property_range(prop, 1.0f, 200.0f);
RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect 
ratio - for anamorphic or non-square pixel output");
-   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, 
NULL);
+   RNA_def_property_update(prop, 
NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);

prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yasp");
RNA_def_property_range(prop, 1.0f, 200.0f);
RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio 
- for anamorphic or non-square pixel output");
-   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT, 
NULL);
+   RNA_def_property_update(prop, 
NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, NULL);

/* JPEG and AVI JPEG */



___
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 [23282] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: #19317:

2009-09-16 Thread Thomas Dinges
Revision: 23282
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23282
Author:   dingto
Date: 2009-09-16 20:22:53 +0200 (Wed, 16 Sep 2009)

Log Message:
---
#19317:

Some more missing notifiers for the "2 open properties windows" scenario. Scene 
Buttons should be fine now. 

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

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c2009-09-16 
18:07:49 UTC (rev 23281)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2009-09-16 
18:22:53 UTC (rev 23282)
@@ -1302,7 +1302,8 @@
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
RNA_def_property_enum_items(prop, color_mode_items);
RNA_def_property_ui_text(prop, "Color Mode", "Choose BW for saving 
greyscale images, RGB for saving red, green and blue channels, AND RGBA for 
saving red, green, blue + alpha channels");
-   
+   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xsch");
RNA_def_property_range(prop, 4, 1);
@@ -1319,6 +1320,7 @@
RNA_def_property_int_sdna(prop, NULL, "size");
RNA_def_property_ui_range(prop, 1, 100, 10, 1);
RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for 
render resolution");
+   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);

prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xparts");
@@ -1574,6 +1576,7 @@
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, field_order_items);
RNA_def_property_ui_text(prop, "Field Order", "Order of video fields. 
Select which lines get rendered first, to create smooth motion for TV output");
+   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);

prop= RNA_def_property(srna, "fields_still", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
@@ -1643,6 +1646,7 @@
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, threads_mode_items);
RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of 
render threads used");
+   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);

prop= RNA_def_property(srna, "motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
@@ -1726,6 +1730,7 @@
RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display", "Select where rendered images 
will be displayed");
+   RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);

prop= RNA_def_property(srna, "output_path", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "pic");


___
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 [23281] trunk/blender/source/blender/ editors/space_file: File Browser

2009-09-16 Thread Brecht Van Lommel
Revision: 23281
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23281
Author:   blendix
Date: 2009-09-16 20:07:49 +0200 (Wed, 16 Sep 2009)

Log Message:
---
File Browser

* Fix warning for non-existing "relative_paths" property.
* Fix problem where the image browser would keep trying to
  load images it failed opening.

Modified Paths:
--
trunk/blender/source/blender/editors/space_file/file_ops.c
trunk/blender/source/blender/editors/space_file/filelist.c

Modified: trunk/blender/source/blender/editors/space_file/file_ops.c
===
--- trunk/blender/source/blender/editors/space_file/file_ops.c  2009-09-16 
18:05:28 UTC (rev 23280)
+++ trunk/blender/source/blender/editors/space_file/file_ops.c  2009-09-16 
18:07:49 UTC (rev 23281)
@@ -531,9 +531,10 @@
RNA_string_set(op->ptr, "directory", name);
strcat(name, sfile->params->file);
 
-   if ( RNA_boolean_get(op->ptr, "relative_paths") ) {
-   BLI_makestringcode(G.sce, name);
-   }
+   if(RNA_struct_find_property(op->ptr, "relative_paths"))
+   if(RNA_boolean_get(op->ptr, "relative_paths"))
+   BLI_makestringcode(G.sce, name);
+
RNA_string_set(op->ptr, "path", name);

/* some ops have multiple files to select */

Modified: trunk/blender/source/blender/editors/space_file/filelist.c
===
--- trunk/blender/source/blender/editors/space_file/filelist.c  2009-09-16 
18:05:28 UTC (rev 23280)
+++ trunk/blender/source/blender/editors/space_file/filelist.c  2009-09-16 
18:07:49 UTC (rev 23281)
@@ -592,10 +592,12 @@
}
if (limg->done) {
FileImage *oimg = limg;
+   BLI_remove_thread(&filelist->threads, oimg);
+   /* brecht: keep failed images in the list, otherwise
+  it keeps trying to load them over and over?
BLI_remlink(&filelist->loadimages, oimg);
-   BLI_remove_thread(&filelist->threads, oimg);
+   MEM_freeN(oimg);*/
limg = oimg->next;
-   MEM_freeN(oimg);
refresh = 1;
} else {
limg= limg->next;


___
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 [23280] trunk/blender/source/blender/ editors/screen/screen_edit.c: UI: fix region edges cursor to show the right direction,

2009-09-16 Thread Brecht Van Lommel
Revision: 23280
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23280
Author:   blendix
Date: 2009-09-16 20:05:28 +0200 (Wed, 16 Sep 2009)

Log Message:
---
UI: fix region edges cursor to show the right direction,
was always vertical now.

Modified Paths:
--
trunk/blender/source/blender/editors/screen/screen_edit.c

Modified: trunk/blender/source/blender/editors/screen/screen_edit.c
===
--- trunk/blender/source/blender/editors/screen/screen_edit.c   2009-09-16 
18:04:01 UTC (rev 23279)
+++ trunk/blender/source/blender/editors/screen/screen_edit.c   2009-09-16 
18:05:28 UTC (rev 23280)
@@ -1140,7 +1140,7 @@
if(az->type==AZONE_AREA)
WM_cursor_set(win, CURSOR_EDIT);
else if(az->type==AZONE_REGION) {
-   if(az->x1==az->x2)
+   if(az->edge == 'l' || az->edge == 'r')
WM_cursor_set(win, CURSOR_X_MOVE);
else
WM_cursor_set(win, CURSOR_Y_MOVE);


___
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 [23279] trunk/blender/source/blender: RNA

2009-09-16 Thread Brecht Van Lommel
Revision: 23279
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23279
Author:   blendix
Date: 2009-09-16 20:04:01 +0200 (Wed, 16 Sep 2009)

Log Message:
---
RNA

* PROP_NEVER_NULL is now a flag instead of a subtype.
* It works for function parameters too now, so setting
  this flag can help avoid NULL checks in the function.
* Renamed LocalLamp to PointLamp, making it consistent
  with the UI name.
* Set icons for the different lamp struct types.

Modified Paths:
--
trunk/blender/source/blender/makesrna/RNA_access.h
trunk/blender/source/blender/makesrna/RNA_types.h
trunk/blender/source/blender/makesrna/intern/makesrna.c
trunk/blender/source/blender/makesrna/intern/rna_access.c
trunk/blender/source/blender/makesrna/intern/rna_brush.c
trunk/blender/source/blender/makesrna/intern/rna_define.c
trunk/blender/source/blender/makesrna/intern/rna_key.c
trunk/blender/source/blender/makesrna/intern/rna_lamp.c
trunk/blender/source/blender/makesrna/intern/rna_material.c
trunk/blender/source/blender/makesrna/intern/rna_modifier.c
trunk/blender/source/blender/makesrna/intern/rna_object.c
trunk/blender/source/blender/makesrna/intern/rna_particle.c
trunk/blender/source/blender/makesrna/intern/rna_pose.c
trunk/blender/source/blender/makesrna/intern/rna_rna.c
trunk/blender/source/blender/makesrna/intern/rna_scene.c
trunk/blender/source/blender/makesrna/intern/rna_screen.c
trunk/blender/source/blender/makesrna/intern/rna_smoke.c
trunk/blender/source/blender/makesrna/intern/rna_space.c
trunk/blender/source/blender/makesrna/intern/rna_text.c
trunk/blender/source/blender/makesrna/intern/rna_ui_api.c
trunk/blender/source/blender/makesrna/intern/rna_userdef.c
trunk/blender/source/blender/makesrna/intern/rna_wm.c
trunk/blender/source/blender/makesrna/intern/rna_world.c
trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/source/blender/makesrna/RNA_access.h
===
--- trunk/blender/source/blender/makesrna/RNA_access.h  2009-09-16 17:43:09 UTC 
(rev 23278)
+++ trunk/blender/source/blender/makesrna/RNA_access.h  2009-09-16 18:04:01 UTC 
(rev 23279)
@@ -249,7 +249,6 @@
 extern StructRNA RNA_LimitLocationConstraint;
 extern StructRNA RNA_LimitRotationConstraint;
 extern StructRNA RNA_LimitScaleConstraint;
-extern StructRNA RNA_LocalLamp;
 extern StructRNA RNA_LockedTrackConstraint;
 extern StructRNA RNA_MagicTexture;
 extern StructRNA RNA_Main;
@@ -329,6 +328,7 @@
 extern StructRNA RNA_PointDensity;
 extern StructRNA RNA_PointDensityTexture;
 extern StructRNA RNA_PointerProperty;
+extern StructRNA RNA_PointLamp;
 extern StructRNA RNA_Pose;
 extern StructRNA RNA_PoseChannel;
 extern StructRNA RNA_Property;

Modified: trunk/blender/source/blender/makesrna/RNA_types.h
===
--- trunk/blender/source/blender/makesrna/RNA_types.h   2009-09-16 17:43:09 UTC 
(rev 23278)
+++ trunk/blender/source/blender/makesrna/RNA_types.h   2009-09-16 18:04:01 UTC 
(rev 23279)
@@ -110,9 +110,6 @@
PROP_XYZ = 28,
PROP_RGB = 29,
 
-   /* pointers */
-   PROP_NEVER_NULL = 30,
-
/* booleans */
PROP_LAYER = 40,
PROP_LAYER_MEMBER = 41
@@ -149,6 +146,7 @@
 
/* pointers */
PROP_ID_REFCOUNT = 64,
+   PROP_NEVER_NULL = 262144,
 
/* internal flags */
PROP_BUILTIN = 128,

Modified: trunk/blender/source/blender/makesrna/intern/makesrna.c
===
--- trunk/blender/source/blender/makesrna/intern/makesrna.c 2009-09-16 
17:43:09 UTC (rev 23278)
+++ trunk/blender/source/blender/makesrna/intern/makesrna.c 2009-09-16 
18:04:01 UTC (rev 23279)
@@ -1419,7 +1419,6 @@
case PROP_ACCELERATION: return "PROP_ACCELERATION";
case PROP_XYZ: return "PROP_XYZ";
case PROP_RGB: return "PROP_RGB";
-   case PROP_NEVER_NULL: return "PROP_NEVER_NULL";
case PROP_LAYER: return "PROP_LAYER";
case PROP_LAYER_MEMBER: return "PROP_LAYER_MEMBER";
default: {

Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_access.c   2009-09-16 
17:43:09 UTC (rev 23278)
+++ trunk/blender/source/blender/makesrna/intern/rna_access.c   2009-09-16 
18:04:01 UTC (rev 23279)
@@ -1409,10 +1409,17 @@
 
 void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA 
ptr_value)
 {
-   PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+   IDProperty *idprop;
 
-   if(pprop->set)
-   pprop->set(ptr, ptr_value);
+   if((idprop=rna_idproperty_check(&prop, ptr))) {
+   /* 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23277] trunk/blender/intern/ghost/intern/ GHOST_WindowWin32.cpp: 2.5 Ghost Compile Fix for windows.

2009-09-16 Thread Thomas Dinges
Revision: 23277
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23277
Author:   dingto
Date: 2009-09-16 19:13:03 +0200 (Wed, 16 Sep 2009)

Log Message:
---
2.5 Ghost Compile Fix for windows. Patch by b333rt. Thanks! 

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2009-09-16 
17:05:32 UTC (rev 23276)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2009-09-16 
17:13:03 UTC (rev 23277)
@@ -720,15 +720,15 @@
switch (pkt.pkCursor) {
case 0: /* first device */
case 3: /* second device */
-   m_tabletData->Active = 
0; /* puck - not yet supported */
+   m_tabletData->Active = 
GHOST_kTabletModeNone; /* puck - not yet supported */
break;
case 1:
case 4:
-   m_tabletData->Active = 
1; /* stylus */
+   m_tabletData->Active = 
GHOST_kTabletModeStylus; /* stylus */
break;
case 2:
case 5:
-   m_tabletData->Active = 
2; /* eraser */
+   m_tabletData->Active = 
GHOST_kTabletModeEraser; /* eraser */
break;
}
if (m_maxPressure > 0) {


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23276] trunk/blender/source/blender/ makesrna/intern/rna_text_api.c: SVN maintenance.

2009-09-16 Thread gsr b3d
Revision: 23276
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23276
Author:   gsrb3d
Date: 2009-09-16 19:05:32 +0200 (Wed, 16 Sep 2009)

Log Message:
---
SVN maintenance.

Property Changed:

trunk/blender/source/blender/makesrna/intern/rna_text_api.c


Property changes on: trunk/blender/source/blender/makesrna/intern/rna_text_api.c
___
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native


___
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 [23275] trunk/blender: - bpy.data. sounds was a collection of ID's rather then Sounds

2009-09-16 Thread Campbell Barton
Revision: 23275
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23275
Author:   campbellbarton
Date: 2009-09-16 17:55:00 +0200 (Wed, 16 Sep 2009)

Log Message:
---
- bpy.data.sounds was a collection of ID's rather then Sounds
- last commit, missed include for rna_object_api.c & bad args to 
find_basis_mball
- use enum for GHOST tablet type None/Stylus/Eraser, had duplicate definition 
for these in C. Only tested X11, may need to cast to an int for other OS's.

Modified Paths:
--
trunk/blender/intern/ghost/GHOST_Types.h
trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp
trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/makesrna/intern/rna_main.c
trunk/blender/source/blender/makesrna/intern/rna_object_api.c
trunk/blender/source/blender/windowmanager/WM_types.h
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
trunk/blender/source/blender/windowmanager/wm_event_types.h

Modified: trunk/blender/intern/ghost/GHOST_Types.h
===
--- trunk/blender/intern/ghost/GHOST_Types.h2009-09-16 15:00:35 UTC (rev 
23274)
+++ trunk/blender/intern/ghost/GHOST_Types.h2009-09-16 15:55:00 UTC (rev 
23275)
@@ -64,8 +64,14 @@
  * the pen's angle in 3D space vertically downwards on to the XY plane
  * --Matt
  */
+typedef enum {
+   GHOST_kTabletModeNone = 0,
+   GHOST_kTabletModeStylus,
+   GHOST_kTabletModeEraser
+} GHOST_TTabletMode;
+
 typedef struct GHOST_TabletData {
-   char Active; /* 0=None, 1=Stylus, 2=Eraser */
+   GHOST_TTabletMode Active; /* 0=None, 1=Stylus, 2=Eraser */
float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
float Xtilt;/* range 0.0 (upright) to 1.0 (tilted fully against the 
tablet surface) */
float Ytilt;/* as above */

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
===
--- trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp   2009-09-16 
15:00:35 UTC (rev 23274)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp   2009-09-16 
15:55:00 UTC (rev 23275)
@@ -684,12 +684,12 @@
{
XProximityNotifyEvent* data = 
(XProximityNotifyEvent*)xe;
if(data->deviceid == 
window->GetXTablet().StylusID)
-   window->GetXTablet().CommonData.Active= 
1;
+   window->GetXTablet().CommonData.Active= 
GHOST_kTabletModeStylus;
else if(data->deviceid == 
window->GetXTablet().EraserID)
-   window->GetXTablet().CommonData.Active= 
2;
+   window->GetXTablet().CommonData.Active= 
GHOST_kTabletModeEraser;
}
else if(xe->type == window->GetXTablet().ProxOutEvent)
-   window->GetXTablet().CommonData.Active= 0;
+   window->GetXTablet().CommonData.Active= 
GHOST_kTabletModeNone;
 
break;
}

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp2009-09-16 
15:00:35 UTC (rev 23274)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCarbon.cpp2009-09-16 
15:55:00 UTC (rev 23275)
@@ -183,7 +183,7 @@
 updateDrawingContext();
 activateDrawingContext();
 
-   m_tablet.Active = 0;
+   m_tablet.Active = GHOST_kTabletModeNone;
 }
 }
 

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2009-09-16 
15:00:35 UTC (rev 23274)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2009-09-16 
15:55:00 UTC (rev 23275)
@@ -244,7 +244,7 @@
m_tablet = fpWTOpen( m_hWnd, &lc, TRUE );
if (m_tablet) {
m_tabletData = new GHOST_TabletData();
-   m_tabletData->Active = 0;
+   m_tabletData->Active = 
GHOST_kTabletModeNone;
}
}
}
@@ -704,7 +704,7 @@
}
}
 
-   m_tabletData->Active = 0;
+   m_tabletData->Active = GHOST

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23274] trunk/blender/release/io/netrender /ui.py: netrender: default temp path on windows to something more useful

2009-09-16 Thread Martin Poirier
Revision: 23274
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23274
Author:   theeth
Date: 2009-09-16 17:00:35 +0200 (Wed, 16 Sep 2009)

Log Message:
---
netrender: default temp path on windows to something more useful

Modified Paths:
--
trunk/blender/release/io/netrender/ui.py

Modified: trunk/blender/release/io/netrender/ui.py
===
--- trunk/blender/release/io/netrender/ui.py2009-09-16 14:45:10 UTC (rev 
23273)
+++ trunk/blender/release/io/netrender/ui.py2009-09-16 15:00:35 UTC (rev 
23274)
@@ -213,11 +213,18 @@
description="broadcast server address on local 
network",
default = True)
 
-NetRenderSettings.StringProperty( attr="path",
-   name="Path",
-   description="Path for temporary files",
-   maxlen = 128,
-   default = "/tmp/")
+if os.name == 'nt':
+   NetRenderSettings.StringProperty( attr="path",
+   name="Path",
+   description="Path for temporary files",
+   maxlen = 128,
+   default = "C:/tmp/")
+else:
+   NetRenderSettings.StringProperty( attr="path",
+   name="Path",
+   description="Path for temporary files",
+   maxlen = 128,
+   default = "/tmp/")
 
 NetRenderSettings.StringProperty( attr="job_name",
name="Job name",


___
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 [23273] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_levels.c: 2.5: fix bug in Levels node, giving NULL pointer free warnings.

2009-09-16 Thread Brecht Van Lommel
Revision: 23273
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23273
Author:   blendix
Date: 2009-09-16 16:45:10 +0200 (Wed, 16 Sep 2009)

Log Message:
---
2.5: fix bug in Levels node, giving NULL pointer free warnings.

Modified Paths:
--
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_levels.c

Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
===
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
2009-09-16 14:02:01 UTC (rev 23272)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
2009-09-16 14:45:10 UTC (rev 23273)
@@ -329,8 +329,8 @@
/* execfunc*/   node_composit_exec_view_levels,
/* butfunc */   NULL,
/* initfunc*/   node_composit_init_view_levels,
-   /* freestoragefunc*/node_free_standard_storage,
-   /* copystoragefunc*/node_copy_standard_storage,
+   /* freestoragefunc*/NULL,
+   /* copystoragefunc*/NULL,
/* id  */   NULL

 };


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23272] trunk/blender/release/io/netrender /slave.py: use platform.uname instead of os.uname ( suggested by Carsten on the ml), it's more portable

2009-09-16 Thread Martin Poirier
Revision: 23272
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23272
Author:   theeth
Date: 2009-09-16 16:02:01 +0200 (Wed, 16 Sep 2009)

Log Message:
---
use platform.uname instead of os.uname (suggested by Carsten on the ml), it's 
more portable

Modified Paths:
--
trunk/blender/release/io/netrender/slave.py

Modified: trunk/blender/release/io/netrender/slave.py
===
--- trunk/blender/release/io/netrender/slave.py 2009-09-16 10:09:57 UTC (rev 
23271)
+++ trunk/blender/release/io/netrender/slave.py 2009-09-16 14:02:01 UTC (rev 
23272)
@@ -1,4 +1,4 @@
-import sys, os
+import sys, os, platform
 import http, http.client, http.server, urllib
 import subprocess, time
 
@@ -10,10 +10,10 @@
 INCREMENT_TIMEOUT = 1
 
 def slave_Info():
-   sysname, nodename, release, version, machine = os.uname()
+   sysname, nodename, release, version, machine, processor = 
platform.uname()
slave = netrender.model.RenderSlave()
slave.name = nodename
-   slave.stats = sysname + " " + release + " " + machine
+   slave.stats = sysname + " " + release + " " + machine + " " + processor
return slave
 
 def testCancel(conn, job_id):


___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23271] trunk/blender: - rna/ python api object.create_render_mesh(...) support for getting a mesh from metaballs and curves (bevel, surface, text etc

2009-09-16 Thread Campbell Barton
Revision: 23271
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23271
Author:   campbellbarton
Date: 2009-09-16 12:09:57 +0200 (Wed, 16 Sep 2009)

Log Message:
---
- rna/python api object.create_render_mesh(...) support for getting a mesh from 
metaballs and curves (bevel, surface, text etc).
- povray converts curves to meshes on export, (metaballs don't need meshing).
- use 'extend' bool rather then 'seltype' enum for object_select operators for 
consistency.

Modified Paths:
--
trunk/blender/release/io/engine_render_pov.py
trunk/blender/source/blender/editors/object/object_select.c
trunk/blender/source/blender/editors/space_node/node_select.c
trunk/blender/source/blender/editors/space_view3d/view3d_select.c
trunk/blender/source/blender/makesrna/intern/rna_object_api.c

Modified: trunk/blender/release/io/engine_render_pov.py
===
--- trunk/blender/release/io/engine_render_pov.py   2009-09-16 09:55:06 UTC 
(rev 23270)
+++ trunk/blender/release/io/engine_render_pov.py   2009-09-16 10:09:57 UTC 
(rev 23271)
@@ -275,7 +275,7 @@
for ob in sel:
ob_num+= 1

-   if ob.type in ('LAMP', 'CAMERA', 'EMPTY'):
+   if ob.type in ('LAMP', 'CAMERA', 'EMPTY', 'META'):
continue

me = ob.data

Modified: trunk/blender/source/blender/editors/object/object_select.c
===
--- trunk/blender/source/blender/editors/object/object_select.c 2009-09-16 
09:55:06 UTC (rev 23270)
+++ trunk/blender/source/blender/editors/object/object_select.c 2009-09-16 
10:09:57 UTC (rev 23271)
@@ -53,6 +53,7 @@
 #include "BKE_property.h"
 #include "BKE_report.h"
 #include "BKE_scene.h"
+#include "BKE_utildefines.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -117,22 +118,16 @@
 
 /** Selection Operators **/
 
-static EnumPropertyItem prop_select_types[] = {
-   {0, "EXCLUSIVE", 0, "Exclusive", ""},
-   {1, "EXTEND", 0, "Extend", ""},
-   {0, NULL, 0, NULL, NULL}
-};
-
 / Select by Type */
 
 static int object_select_by_type_exec(bContext *C, wmOperator *op)
 {
-   short obtype, seltype;
+   short obtype, extend;

obtype = RNA_enum_get(op->ptr, "type");
-   seltype = RNA_enum_get(op->ptr, "seltype");
+   extend= RNA_boolean_get(op->ptr, "extend");

-   if (seltype == 0) {
+   if (extend == 0) {
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
ED_base_object_select(base, BA_DESELECT);
}
@@ -166,9 +161,9 @@
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;

-   RNA_def_enum(ot->srna, "seltype", prop_select_types, 0, "Selection", 
"Extend selection or clear selection then select");
+   /* properties */
+   RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection 
instead of deselecting everything first.");
RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", "");
-
 }
 
 /*** Selection by Links */
@@ -192,7 +187,7 @@
Tex *tex=0;
int a, b;
int nr = RNA_enum_get(op->ptr, "type");
-   short changed = 0, seltype;
+   short changed = 0, extend;
/* events (nr):
 * Object Ipo: 1
 * ObData: 2
@@ -202,9 +197,9 @@
 * PSys: 6
 */
 
-   seltype = RNA_enum_get(op->ptr, "seltype");
+   extend= RNA_boolean_get(op->ptr, "extend");

-   if (seltype == 0) {
+   if (extend == 0) {
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
ED_base_object_select(base, BA_DESELECT);
}
@@ -327,9 +322,9 @@
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;

+   /* properties */
+   RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection 
instead of deselecting everything first.");
RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", "");
-   RNA_def_enum(ot->srna, "seltype", prop_select_types, 1, "Selection", 
"Extend selection or clear selection then select");
-
 }
 
 /*** Selected Grouped /
@@ -575,11 +570,11 @@
Scene *scene= CTX_data_scene(C);
Object *ob;
int nr = RNA_enum_get(op->ptr, "type");
-   short changed = 0, seltype;
+   short changed = 0, extend;
 
-   seltype = RNA_enum_get(op->ptr, "seltype");
+   extend= RNA_boolean_get(op->ptr, "extend");

-   if (seltype == 0) {
+   if (extend == 0) {
CTX_DATA_BEGIN(C, Base*, base, visi

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23270] trunk/blender/source/blender/ editors/mesh: loopcut tool.

2009-09-16 Thread Joseph Eagar
Revision: 23270
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23270
Author:   joeedh
Date: 2009-09-16 11:55:06 +0200 (Wed, 16 Sep 2009)

Log Message:
---
loopcut tool.  hold down ctrl-r, then leftclick.  due to current limitations on 
operator design, there isn't any built-in edge sliding to this tool.

Modified Paths:
--
trunk/blender/source/blender/editors/mesh/loopcut.c
trunk/blender/source/blender/editors/mesh/mesh_intern.h
trunk/blender/source/blender/editors/mesh/mesh_ops.c

Modified: trunk/blender/source/blender/editors/mesh/loopcut.c
===
--- trunk/blender/source/blender/editors/mesh/loopcut.c 2009-09-16 06:02:56 UTC 
(rev 23269)
+++ trunk/blender/source/blender/editors/mesh/loopcut.c 2009-09-16 09:55:06 UTC 
(rev 23270)
@@ -93,6 +93,7 @@
EditEdge *eed;
 
int extend;
+   int do_cut;
 } tringselOpData;
 
 /* modal loop selection drawing callback */
@@ -258,8 +259,14 @@
 {
tringselOpData *lcd= op->customdata;
 
-   if (lcd->eed);
+   if (lcd->eed) {
edgering_sel(lcd, 0, 1);
+   if (lcd->do_cut) {
+   EditMesh *em = BKE_mesh_get_editmesh(lcd->ob->data);
+   esubdivideflag(lcd->ob, em, SELECT, 0.0f, 
+  0.0f, 0, 1, SUBDIV_SELECT_LOOPCUT);
+   }
+   }
 }
 
 /* called when modal loop selection is done... */
@@ -281,7 +288,7 @@
 }
 
 /* called when modal loop selection gets set up... */
-static int ringsel_init (bContext *C, wmOperator *op)
+static int ringsel_init (bContext *C, wmOperator *op, int do_cut)
 {
tringselOpData *lcd;

@@ -293,7 +300,8 @@
lcd->draw_handle= ED_region_draw_cb_activate(lcd->ar->type, 
ringsel_draw, lcd, REGION_DRAW_POST);
lcd->ob = CTX_data_edit_object(C);
lcd->em= BKE_mesh_get_editmesh((Mesh *)lcd->ob->data);
-   lcd->extend = RNA_boolean_get(op->ptr, "extend");
+   lcd->extend = do_cut ? 0 : RNA_boolean_get(op->ptr, "extend");
+   lcd->do_cut = do_cut;
em_setup_viewcontext(C, &lcd->vc);
 
ED_region_tag_redraw(lcd->ar);
@@ -317,7 +325,7 @@
 
view3d_operator_needs_opengl(C);
 
-   if (!ringsel_init(C, op))
+   if (!ringsel_init(C, op, 0))
return OPERATOR_CANCELLED;

/* add a modal handler for this operator - handles loop selection */
@@ -336,6 +344,35 @@
return OPERATOR_RUNNING_MODAL;
 }
 
+
+static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
+{
+   ScrArea *sa = CTX_wm_area(C);
+   tringselOpData *lcd;
+   EditEdge *edge;
+   int dist = 75;
+
+   view3d_operator_needs_opengl(C);
+
+   if (!ringsel_init(C, op, 1))
+   return OPERATOR_CANCELLED;
+   
+   /* add a modal handler for this operator - handles loop selection */
+   WM_event_add_modal_handler(C, &CTX_wm_window(C)->handlers, op);
+
+   lcd = op->customdata;
+   lcd->vc.mval[0] = evt->mval[0];
+   lcd->vc.mval[1] = evt->mval[1];
+   
+   edge = findnearestedge(&lcd->vc, &dist);
+   if (edge != lcd->eed) {
+   lcd->eed = edge;
+   ringsel_find_edge(lcd, C, lcd->ar);
+   }
+
+   return OPERATOR_RUNNING_MODAL;
+}
+
 static int ringsel_modal (bContext *C, wmOperator *op, wmEvent *event)
 {
tringselOpData *lcd= op->customdata;
@@ -379,13 +416,12 @@
return OPERATOR_RUNNING_MODAL;
 }
 
-// naming is whatever this should use...
 void MESH_OT_edgering_select (wmOperatorType *ot)
 {
/* description */
-   ot->name= "Loop Cut";
+   ot->name= "Edge Ring Select";
ot->idname= "MESH_OT_edgering_select";
-   ot->description= "Add a new loop between existing loops.";
+   ot->description= "Select an edge ring";

/* callbacks */
ot->invoke= ringsel_invoke;
@@ -398,3 +434,20 @@
 
RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the 
selection");
 }
+
+void MESH_OT_loopcut (wmOperatorType *ot)
+{
+   /* description */
+   ot->name= "Loop Cut";
+   ot->idname= "MESH_OT_loopcut";
+   ot->description= "Add a new loop between existing loops.";
+   
+   /* callbacks */
+   ot->invoke= ringcut_invoke;
+   ot->modal= ringsel_modal;
+   ot->cancel= ringsel_cancel;
+   ot->poll= ED_operator_editmesh;
+   
+   /* flags */
+   ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
+}

Modified: trunk/blender/source/blender/editors/mesh/mesh_intern.h
===
--- trunk/blender/source/blender/editors/mesh/mesh_intern.h 2009-09-16 
06:02:56 UTC (rev 23269)
+++ trunk/blender/source/blender/editors/mesh/mesh_intern.h 2009-09-16 
09:55:06 UTC (rev 23270)
@@ -243,6 +243,7 @@
 void MESH_OT_sticky_remove(struct wmOp