[Bf-blender-cvs] [51b796ff152] blender2.8: Remove Blender Internal and legacy viewport from Blender 2.8.

2018-04-19 Thread Ton Roosendaal
Commit: 51b796ff1528c52cc8b4079fab1003671652a4d9
Author: Ton Roosendaal
Date:   Thu Apr 19 17:34:44 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB51b796ff1528c52cc8b4079fab1003671652a4d9

Remove Blender Internal and legacy viewport from Blender 2.8.

Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!

* Point density, voxel data, ocean, environment map textures were removed,
  as these only worked within BI rendering. Note that the ocean modifier
  and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
  with BI. If we ever wanted to support this again probably it should go
  through the baking API.
* GPU shader export through the Python API was removed. This only worked
  for the old BI GLSL shaders, which no longer exists. Doing something
  similar for Eevee would be significantly more complicated because it
  uses a lot of multiplass rendering and logic outside the shader, it's
  probably impractical.
* Collada material import / export code is mostly gone, as it only worked
  for BI materials. We need to add Cycles / Eevee material support at some
  point.
* The mesh noise operator was removed since it only worked with BI
  material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
  for BI material texture slots. Could be added back with node support.

* Not all legacy viewport features are supported in the new viewport, but
  their code was removed. If we need to bring anything back we can look at
  older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
  that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
  used anywhere now. We may eventually use this to replace the texture
  nodes with Cycles / Eevee shader nodes.

* The Cycles Bake panel now includes settings for baking multires normal
  and displacement maps. The underlying code needs to be merged properly,
  and we plan to add back support for multires AO baking and add support
  to Cycles baking for features like vertex color, displacement, and other
  missing baking features.

* This commit removes DNA and the Python API for BI material, lamp, world
  and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
  are reusing some old BI properties but the names are not really correct
  anymore.
* Texture slots for materials, lamps and world were removed. They remain
  for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
  other renderers use this to find all panels to show, minus a few panels
  that they have their own replacement for.

===

M   doc/python_api/rst/gpu.rst
M   intern/cycles/blender/addon/ui.py
M   release/scripts/freestyle/modules/parameter_editor.py
M   release/scripts/startup/bl_operators/object_quick_effects.py
M   release/scripts/startup/bl_operators/presets.py
M   release/scripts/startup/bl_ui/properties_data_lamp.py
M   release/scripts/startup/bl_ui/properties_data_mesh.py
M   release/scripts/startup/bl_ui/properties_data_modifier.py
M   release/scripts/startup/bl_ui/properties_freestyle.py
M   release/scripts/startup/bl_ui/properties_material.py
M   release/scripts/startup/bl_ui/properties_particle.py
M   release/scripts/startup/bl_ui/properties_physics_cloth.py
M   release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
M   release/scripts/startup/bl_ui/properties_physics_fluid.py
M   release/scripts/startup/bl_ui/properties_physics_rigidbody.py
M   release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
M   release/scripts/startup/bl_ui/properties_physics_softbody.py
M   release/scripts/startup/bl_ui/properties_render.py
M   release/scripts/startup/bl_ui/properties_scene.py
M   release/scripts/startup/bl_ui/properties_texture.py
M   release/scripts/startup/bl_ui/properties_world.py
M   release/scripts/startup/bl_ui/space_node.py
M   release/scripts/startup/bl_ui/space_sequencer.py
M   release/scripts/startup/bl_ui/space_view3d.py
M   release/scripts/startup/bl_ui/space_view3d_toolbar.py
M   release/scripts/startup/nodeitems_builtins.py
M   release/scripts/templates_py/ui_list_simple.py
M   source/blender/alembic/intern/abc_hair.cc
M   source/blender/blenkernel/BKE_DerivedMesh.h
M   source/blender/blenkernel/BKE_blender_version.h
M   source/blender/blenkernel/BKE_camera.h
M   source/blender/blenkernel/BKE_material.h
M   source/blender/blenkernel/BKE_node.h
M   source/blender/blenkernel/BKE_particle.h
M  

[Bf-blender-cvs] [2deeec9e28b] blender-v2.79-release: This copyright text (copied to binary distros) had a confusing statement about scripts being "Artwork" which is your sole property and free to lic

2017-09-04 Thread Ton Roosendaal
Commit: 2deeec9e28bdd4d95f4160e641b16d7a5680a8e7
Author: Ton Roosendaal
Date:   Fri Aug 25 11:11:19 2017 +0200
Branches: blender-v2.79-release
https://developer.blender.org/rB2deeec9e28bdd4d95f4160e641b16d7a5680a8e7

This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.

I've removed the reference to scripts in this text.

This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.

For more information; check the FAQ or consult foundat...@blender.org
https://www.blender.org/support/faq/

===

M   release/text/copyright.txt

===

diff --git a/release/text/copyright.txt b/release/text/copyright.txt
index 207d6f54ea8..d0490b9ca91 100644
--- a/release/text/copyright.txt
+++ b/release/text/copyright.txt
@@ -21,7 +21,7 @@
   Subject to the provisions of the GNU GPL license, BF grants You a
   non-exclusive right to use the Software at any computer You own or use. 
   Artwork you create with the Software - whether it is images, movies, 
-  scripts, exported 3d files or the .blend files themselves - is your sole 
+  exported 3d files or the .blend files themselves - is your sole 
   property, and can be licensed or sold under any conditions you prefer. 
 
   2. Permitted copying and electronic distribution of Software

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


[Bf-blender-cvs] [2d5935a9c09] master: This copyright text (copied to binary distros) had a confusing statement about scripts being "Artwork" which is your sole property and free to license.

2017-08-25 Thread Ton Roosendaal
Commit: 2d5935a9c095fc8abae844571e72923027c40725
Author: Ton Roosendaal
Date:   Fri Aug 25 11:11:19 2017 +0200
Branches: master
https://developer.blender.org/rB2d5935a9c095fc8abae844571e72923027c40725

This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.

I've removed the reference to scripts in this text.

This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.

For more information; check the FAQ or consult foundat...@blender.org
https://www.blender.org/support/faq/

===

M   release/text/copyright.txt

===

diff --git a/release/text/copyright.txt b/release/text/copyright.txt
index 207d6f54ea8..d0490b9ca91 100644
--- a/release/text/copyright.txt
+++ b/release/text/copyright.txt
@@ -21,7 +21,7 @@
   Subject to the provisions of the GNU GPL license, BF grants You a
   non-exclusive right to use the Software at any computer You own or use. 
   Artwork you create with the Software - whether it is images, movies, 
-  scripts, exported 3d files or the .blend files themselves - is your sole 
+  exported 3d files or the .blend files themselves - is your sole 
   property, and can be licensed or sold under any conditions you prefer. 
 
   2. Permitted copying and electronic distribution of Software

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


[Bf-blender-cvs] Missing commit mails

2017-08-17 Thread Ton Roosendaal
Hi,

The lists server had a much needed upgrade yesterday. For that reason a couple 
of mails didn't get delivered to subscribers, but you can find it in the web UI.
https://lists.blender.org/pipermail/bf-blender-cvs/2017-August/date.html

The following commit mails got lost:

[84d33023ab4] blender2.8: Merge branch 'master' into blender2.8   Brecht Van 
Lommel
[b68b26c265d] blender2.8: Attempt to fix GLSL   errors on Blender startup.   
Brecht Van Lommel
[87c7d4d2a30] greasepencil-object: New options to copy colors attenuated   
Antonio Vazquez
[342793ef756] soc-2017-normal-tools: Fixed bugs in copy and made UI changes   
Rohan Rathi
[78b3061c32c] fracture_modifier: fix attempt for avoiding incorrect inner 
collisions between constrained objects   Martin Felke
[1b462e5a514] blender2.8: Pass EvaluationContext instead of bContext   Campbell 
Barton
[4f97be617c8] blender2.8: Gawain: add ownership flag to Gwn_Batch   Campbell 
Barton
[dbd300ab208] blender2.8: DwM: use gawain ownership flags for mesh drawing   
Campbell Barton
 SVN commit: /data/svn/repos/bf-blender [61921] trunk/lib/tests/layers: Update 
layer unittests   Dalai Felinto
[18ce2bfac63] blender2.8: Depsgraph/Layers: Keep original visibility when doing 
full scene copy   Dalai Felinto

-Ton-

--------
Ton Roosendaal  -  t...@blender.org   -   www.blender.org
Chairman Blender Foundation, Director Blender Institute
Entrepotdok 57A, 1018 AD, Amsterdam, the Netherlands

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


[Bf-blender-cvs] [c72dc45] master: And here is the first git (testing) commit by me! Welcome to a brave new GPL3 world... well if commit works :)

2013-11-16 Thread Ton Roosendaal
Commit: c72dc45bcb7de371934b9ad741d1938c5827b165
Author: Ton Roosendaal
Date:   Sat Nov 16 11:57:40 2013 +0100
http://developer.blender.org/rBc72dc45bcb7de371934b9ad741d1938c5827b165

And here is the first git (testing) commit by me!
Welcome to a brave new GPL3 world... well if commit works :)

===

A   doc/license/GPL3-license.txt

===

diff --git a/doc/license/GPL3-license.txt b/doc/license/GPL3-license.txt
new file mode 100644
index 000..94a9ed0
--- /dev/null
+++ b/doc/license/GPL3-license.txt
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion req

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59835] trunk/blender: Bugfix #35920

2013-09-05 Thread Ton Roosendaal
Revision: 59835
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59835
Author:   ton
Date: 2013-09-05 13:03:03 + (Thu, 05 Sep 2013)
Log Message:
---
Bugfix #35920

Adding a new node in Node Editor failed for "High DPI" (Only Mac retina now).

- Py script for adding nodes was doing dpi magic, which it shouldn't. It has 
  been replaced with a (temporary) API call to set the correct cursor location.
  (Thanks to Lukas T for helping here)

- The SpaceNode->cursor[2] property now is *only* storing the coordinate
  in "adding new node space". Use of this has been removed from the code where
  possible, with as only exception the code to draw noodles while adding them.

Special coder note: Nodes should respect the DPI value, and draw larger with
larger buttons if you increase this size. The hack here is that this can only
work nice if also the node positions are scaled accordingly.

A better fix could be to check on scaling the node view itself for it. That
then would also remove this Python API call that was added in this commit.
However, that again might fight with how buttons layout code works now...
needs some careful checking.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_operators/node.py
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/editors/space_node/node_add.c
trunk/blender/source/blender/editors/space_node/node_draw.c
trunk/blender/source/blender/editors/space_node/node_edit.c
trunk/blender/source/blender/editors/space_node/node_intern.h
trunk/blender/source/blender/editors/space_node/node_relationships.c
trunk/blender/source/blender/editors/space_node/node_select.c
trunk/blender/source/blender/editors/space_node/space_node.c
trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/release/scripts/startup/bl_operators/node.py
===
--- trunk/blender/release/scripts/startup/bl_operators/node.py  2013-09-05 
12:23:33 UTC (rev 59834)
+++ trunk/blender/release/scripts/startup/bl_operators/node.py  2013-09-05 
13:03:03 UTC (rev 59835)
@@ -66,12 +66,8 @@
 
 # convert mouse position to the View2D for later node placement
 if context.region.type == 'WINDOW':
-# XXX, temp fix for [#35920], still fails for (U.pixelsize != 1)
-dpi_fac = context.user_preferences.system.dpi / 72.0
-space.cursor_location = v2d.region_to_view(event.mouse_region_x,
-   event.mouse_region_y)
-space.cursor_location /= dpi_fac
-
+# convert mouse position to the View2D for later node placement
+space.cursor_location_from_region(event.mouse_region_x, 
event.mouse_region_y) 
 else:
 space.cursor_location = tree.view_center
 

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2013-09-05 
12:23:33 UTC (rev 59834)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2013-09-05 
13:03:03 UTC (rev 59835)
@@ -3075,7 +3075,16 @@
 {
float dist, vec[4][2];
float deltax, deltay;
+   float cursor[2] = {0.0f, 0.0f};
int toreroute, fromreroute;
+   
+   /* this function can be called with snode null (via 
cut_links_intersect) */
+   /* XXX map snode->cursor back to view space */
+   if (snode) {
+   cursor[0] = snode->cursor[0] * UI_DPI_FAC;
+   cursor[1] = snode->cursor[1] * UI_DPI_FAC;
+   }
+   
/* in v0 and v3 we put begin/end points */
if (link->fromsock) {
vec[0][0] = link->fromsock->locx;
@@ -3084,7 +3093,7 @@
}
else {
if (snode == NULL) return 0;
-   copy_v2_v2(vec[0], snode->cursor);
+   copy_v2_v2(vec[0], cursor);
fromreroute = 0;
}
if (link->tosock) {
@@ -3094,7 +3103,7 @@
}
else {
if (snode == NULL) return 0;
-   copy_v2_v2(vec[3], snode->cursor);
+   copy_v2_v2(vec[3], cursor);
toreroute = 0;
}
 

Modified: trunk/blender/source/blender/editors/space_node/node_add.c
===
--- trunk/blender/source/blender/editors/space_node/node_add.c  2013-09-05 
12:23:33 UTC (rev 59834)
+++ trunk/blender/source/blender/editors/space_node/node_add.c  2013-09-05 
13:03:03 UTC (rev 59835)
@@ -84,10 +84,6 @@
node->locy = locy + 60.0f; /* arbitrary... so its visible, (0,0) is 
top of node */
nodeSetSelected(node, TRUE);

-   /* node location is mapped */
-   locx /= UI_DPI_FAC;
-   locy /= UI_DPI_FAC;
-   
node->locx 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59511] trunk/blender/source/blender/ editors/interface/interface_widgets.c: Bugfix #36324

2013-08-26 Thread Ton Roosendaal
Revision: 59511
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59511
Author:   ton
Date: 2013-08-26 09:59:51 + (Mon, 26 Aug 2013)
Log Message:
---
Bugfix #36324

Commit 57760, June this year, broke Theme colors for Label Buttons.
All labels, in every editor or region, now were using same color.

These colors have to be derived from the Editor settings. Code for
this was mistakingly removed.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_widgets.c

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-08-26 09:37:15 UTC (rev 59510)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-08-26 09:59:51 UTC (rev 59511)
@@ -2850,6 +2850,16 @@
rect->xmin += BLI_rcti_size_y(rect) * 0.7 + delta;
 }
 
+/* labels use Editor theme colors for text */
+static void widget_state_label(uiWidgetType *wt, int state)
+{
+   /* call this for option button */
+   widget_state(wt, state);
+   if (state & UI_SELECT)
+   UI_GetThemeColor3ubv(TH_TEXT_HI, (unsigned char 
*)wt->wcol.text);
+   else
+   UI_GetThemeColor3ubv(TH_TEXT, (unsigned char *)wt->wcol.text);
+}
 
 static void widget_radiobut(uiWidgetColors *wcol, rcti *rect, int 
UNUSED(state), int roundboxalign)
 {
@@ -2973,6 +2983,7 @@
/* fall-through */  /* we use usual label code too. */
case UI_WTYPE_LABEL:
wt.draw = NULL;
+   wt.state = widget_state_label;
break;

case UI_WTYPE_TOGGLE:

___
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 [59084] trunk/blender/release/text/ GPL3-license.txt: GPL V3 license, which will be valid for the binary releases.

2013-08-12 Thread Ton Roosendaal
Revision: 59084
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59084
Author:   ton
Date: 2013-08-12 12:31:51 + (Mon, 12 Aug 2013)
Log Message:
---
GPL V3 license, which will be valid for the binary releases.
(Because Blender links with the Apache2 license).

Cleanup of this directory will happen before official release.

Added Paths:
---
trunk/blender/release/text/GPL3-license.txt

Added: trunk/blender/release/text/GPL3-license.txt
===
--- trunk/blender/release/text/GPL3-license.txt (rev 0)
+++ trunk/blender/release/text/GPL3-license.txt 2013-08-12 12:31:51 UTC (rev 
59084)
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copy

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58364] trunk/blender: Tradtional release commit! 2.68 splash and the numbering.

2013-07-18 Thread Ton Roosendaal
Revision: 58364
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58364
Author:   ton
Date: 2013-07-18 10:08:28 + (Thu, 18 Jul 2013)
Log Message:
---
Tradtional release commit! 2.68 splash and the numbering.

- This should then follow the tagging
- And I would still prefer to have at least 24 hours full freeze, for proper 
test
  and avoid last minute errors.

Modified Paths:
--
trunk/blender/release/datafiles/splash.png
trunk/blender/source/blender/blenkernel/BKE_blender.h

Modified: trunk/blender/release/datafiles/splash.png
===
(Binary files differ)

Modified: trunk/blender/source/blender/blenkernel/BKE_blender.h
===
--- trunk/blender/source/blender/blenkernel/BKE_blender.h   2013-07-18 
09:34:15 UTC (rev 58363)
+++ trunk/blender/source/blender/blenkernel/BKE_blender.h   2013-07-18 
10:08:28 UTC (rev 58364)
@@ -41,8 +41,8 @@
 /* these lines are grep'd, watch out for our not-so-awesome regex
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
-#define BLENDER_VERSION 267
-#define BLENDER_SUBVERSION  1
+#define BLENDER_VERSION 268
+#define BLENDER_SUBVERSION  0
 
 /* 262 was the last editmesh release but it has compatibility code for bmesh 
data */
 #define BLENDER_MINVERSION  262
@@ -50,9 +50,9 @@
 
 /* used by packaging tools */
 /* can be left blank, otherwise a,b,c... etc with no quotes */
-#define BLENDER_VERSION_CHARb
+#define BLENDER_VERSION_CHAR   
 /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE   rc
+#define BLENDER_VERSION_CYCLE   release
 
 extern char versionstr[]; /* from blender.c */
 

___
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 [57577] trunk/blender/source/blender/ windowmanager/intern/wm_operators.c: Usability:

2013-06-19 Thread Ton Roosendaal
Revision: 57577
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57577
Author:   ton
Date: 2013-06-19 15:20:50 + (Wed, 19 Jun 2013)
Log Message:
---
Usability:

For users without middle-mouse buttons, they can now use Circle and Border
deselect by holding SHIFT. Middle mouse still works too.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2013-06-19 15:08:07 UTC (rev 57576)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2013-06-19 15:20:50 UTC (rev 57577)
@@ -4210,13 +4210,12 @@
 
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, 0, 0, 
GESTURE_MODAL_SELECT);
 
-#if 0 /* Durien guys like this :S */
+   /* left mouse shift for deselect too */
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_SHIFT, 0, 
GESTURE_MODAL_DESELECT);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_SHIFT, 0, 
GESTURE_MODAL_NOP);
-#else
+
WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_PRESS, 0, 0, 
GESTURE_MODAL_DESELECT); //  default 2.4x
WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, 0, 0, 
GESTURE_MODAL_NOP); //  default 2.4x
-#endif
 
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, 0, 0, 
GESTURE_MODAL_NOP);
 
@@ -4284,21 +4283,22 @@
 
/* items for modal map */
WM_modalkeymap_add_item(keymap, ESCKEY,KM_PRESS, KM_ANY, 0, 
GESTURE_MODAL_CANCEL);
+   
/* Note: cancel only on press otherwise you cannot map this to 
RMB-gesture */
WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_PRESS, KM_ANY, 0, 
GESTURE_MODAL_CANCEL);
-
-   WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, 0, 0, 
GESTURE_MODAL_BEGIN);
-   WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, 
GESTURE_MODAL_SELECT);
WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_RELEASE, KM_ANY, 0, 
GESTURE_MODAL_SELECT);
 
-#if 0 /* Durian guys like this */
+   /* allow shift leftclick for deselect too */
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_SHIFT, 0, 
GESTURE_MODAL_BEGIN);
WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_SHIFT, 0, 
GESTURE_MODAL_DESELECT);
-#else
+
+   /* any unhandled leftclick release handles select */
+   WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, 0, 0, 
GESTURE_MODAL_BEGIN);
+   WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, 
GESTURE_MODAL_SELECT);
+   
WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_PRESS, 0, 0, 
GESTURE_MODAL_BEGIN);
WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, 0, 0, 
GESTURE_MODAL_DESELECT);
-#endif
-
+   
/* assign map to operators */
WM_modalkeymap_assign(keymap, "ACTION_OT_select_border");
WM_modalkeymap_assign(keymap, "ANIM_OT_channels_select_border");

___
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 [57476] trunk/blender/source/blender/ editors/space_image/image_ops.c: Bug fix #35749

2013-06-15 Thread Ton Roosendaal
Revision: 57476
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57476
Author:   ton
Date: 2013-06-15 15:39:20 + (Sat, 15 Jun 2013)
Log Message:
---
Bug fix #35749

Image Editor: "Replace Image" operator didn't refresh icon for image.

Modified Paths:
--
trunk/blender/source/blender/editors/space_image/image_ops.c

Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===
--- trunk/blender/source/blender/editors/space_image/image_ops.c
2013-06-15 15:10:21 UTC (rev 57475)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c
2013-06-15 15:39:20 UTC (rev 57476)
@@ -48,6 +48,7 @@
 
 #include "BKE_colortools.h"
 #include "BKE_context.h"
+#include "BKE_icons.h"
 #include "BKE_image.h"
 #include "BKE_global.h"
 #include "BKE_library.h"
@@ -1122,6 +1123,7 @@
/* XXX unpackImage frees image buffers */
ED_preview_kill_jobs(C);

+   BKE_icon_changed(BKE_icon_getid(&sima->image->id));
BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_RELOAD);
WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, sima->image);
 

___
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 [57475] trunk/blender/source/blender/ editors/space_view3d/view3d_select.c: Bugfix #35747

2013-06-15 Thread Ton Roosendaal
Revision: 57475
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57475
Author:   ton
Date: 2013-06-15 15:10:21 + (Sat, 15 Jun 2013)
Log Message:
---
Bugfix #35747

Lasso select could crash if there was an Armature in PoseMode somewhere.
Issue also in previous release(s).

Modified Paths:
--
trunk/blender/source/blender/editors/space_view3d/view3d_select.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_select.c
===
--- trunk/blender/source/blender/editors/space_view3d/view3d_select.c   
2013-06-15 14:01:16 UTC (rev 57474)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_select.c   
2013-06-15 15:10:21 UTC (rev 57475)
@@ -420,7 +420,7 @@
ED_base_object_select(base, select ? BA_SELECT 
: BA_DESELECT);
base->object->flag = base->flag;
}
-   if (base->object->mode & OB_MODE_POSE) {
+   if (vc->obact == base->object && (base->object->mode & 
OB_MODE_POSE)) {
do_lasso_select_pose(vc, base->object, mcords, 
moves, select);
}
}

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

2013-06-07 Thread Ton Roosendaal
Revision: 57280
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57280
Author:   ton
Date: 2013-06-07 15:42:26 + (Fri, 07 Jun 2013)
Log Message:
---
Usablity:

Textbuttons: double click now selects entire words (like on file path segements)
Triple click was requested too, but that's not a WM event type yet.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-06-07 14:22:13 UTC (rev 57279)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-06-07 15:42:26 UTC (rev 57280)
@@ -2192,11 +2192,14 @@
break;
case LEFTMOUSE:
{
+   bool had_selection = but->selsta != but->selend;
+   
/* exit on LMB only on RELEASE for searchbox, to mimic 
other popups, and allow multiple menu levels */
if (data->searchbox)
inbox = ui_searchbox_inside(data->searchbox, 
event->x, event->y);
 
-   if (event->val == KM_PRESS) {
+   /* for double click: we do a press again for when you 
first click on button (selects all text, no cursor pos) */
+   if (event->val == KM_PRESS || event->val == 
KM_DBL_CLICK) {
mx = event->x;
my = event->y;
ui_window_to_block(data->region, block, &mx, 
&my);
@@ -2217,6 +2220,14 @@
retval = WM_UI_HANDLER_BREAK;
}
}
+   
+   /* only select a word in button if there was no 
selection before */
+   if (event->val == KM_DBL_CLICK && had_selection == 
false) {
+   ui_textedit_move(but, data, STRCUR_DIR_PREV, 0, 
STRCUR_JUMP_DELIM);
+   ui_textedit_move(but, data, STRCUR_DIR_NEXT, 
true, STRCUR_JUMP_DELIM);
+   retval = WM_UI_HANDLER_BREAK;
+   changed = true;
+   }
else if (inbox) {
button_activate_state(C, but, 
BUTTON_STATE_EXIT);
retval = WM_UI_HANDLER_BREAK;

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-06-07 14:22:13 UTC (rev 57279)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-06-07 15:42:26 UTC (rev 57280)
@@ -380,8 +380,8 @@
int retval;

/* UI code doesn't handle return values - it just always returns break. 
-* to make the DBL_CLICK conversion work, we just don't send this to UI 
*/
-   if (event->val == KM_DBL_CLICK)
+* to make the DBL_CLICK conversion work, we just don't send this to 
UI, except mouse clicks */
+   if (event->type != LEFTMOUSE && event->val == KM_DBL_CLICK)
return WM_HANDLER_CONTINUE;

/* UI is quite aggressive with swallowing events, like scrollwheel */

___
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 [57181] trunk/blender/source/blender/ windowmanager/intern/wm_window.c: Bug fix, own collection while testing

2013-06-01 Thread Ton Roosendaal
Revision: 57181
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57181
Author:   ton
Date: 2013-06-01 15:24:15 + (Sat, 01 Jun 2013)
Log Message:
---
Bug fix, own collection while testing

New OSX "Life resize" was also being called during opening of windows - when 
things are
not initialized yet. Crashed on opening full-screen window (which is animated 
in OSX).

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_window.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_window.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_window.c   
2013-06-01 12:45:45 UTC (rev 57180)
+++ trunk/blender/source/blender/windowmanager/intern/wm_window.c   
2013-06-01 15:24:15 UTC (rev 57181)
@@ -711,6 +711,11 @@
GHOST_TEventDataPtr data = GHOST_GetEventData(evt);
wmWindow *win;

+   /* Ghost now can call this function for life resizes, but it 
should return if WM didn't initialize yet.
+  Can happen on file read (especially full size window)  */
+   if ((wm->initialized & WM_INIT_WINDOW) == 0) {
+   return 1;
+   }
if (!ghostwin) {
/* XXX - should be checked, why are we getting an event 
here, and */
/* what is it? */

___
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 [57023] trunk/blender/source/blender/ editors/space_view3d/drawobject.c: Simple usability fix:

2013-05-25 Thread Ton Roosendaal
Revision: 57023
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57023
Author:   ton
Date: 2013-05-25 17:42:20 + (Sat, 25 May 2013)
Log Message:
---
Simple usability fix:

Mesh editmode, active face was always drawing same stipple pattern color, 
whether face is selected or not. 
Now it uses selection color + stipple. Looks much more consistent.

Modified Paths:
--
trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c  
2013-05-25 17:28:27 UTC (rev 57022)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c  
2013-05-25 17:42:20 UTC (rev 57023)
@@ -2369,7 +2369,10 @@

if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
if (efa == data->efa_act) {
-   glColor4ubv(data->cols[2]);
+   if (BM_elem_flag_test(efa, BM_ELEM_SELECT))
+   glColor4ubv(data->cols[1]);
+   else
+   glColor4ubv(data->cols[2]);
return DM_DRAW_OPTION_STIPPLE;
}
else {

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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57018] trunk/blender: Solving ancient Blender window sizing issue;

2013-05-25 Thread Ton Roosendaal
Revision: 57018
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57018
Author:   ton
Date: 2013-05-25 14:08:56 + (Sat, 25 May 2013)
Log Message:
---
Solving ancient Blender window sizing issue;

- Removed grid-snapping for area coordinates on scaling windows. 
  That caused the areas to shrink or expand, and eventually corrupt screen 
layouts.

- Added simple but efficient life resize for OSX. I need to know why this is so 
much
  code for Windows... I suggest Windows to just copy same method; dispatch the 
queue,
  and just let the event system draw.

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
trunk/blender/source/blender/editors/screen/screen_edit.c
trunk/blender/source/blender/windowmanager/intern/wm_window.c

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2013-05-25 
13:34:21 UTC (rev 57017)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2013-05-25 
14:08:56 UTC (rev 57018)
@@ -53,17 +53,7 @@
 #endif
 
 #pragma mark Cocoa window delegate object
-/* live resize ugly patch
-extern "C" {
-   struct bContext;
-   typedef struct bContext bContext;
-   bContext* ghostC;
-   extern int wm_window_timer(const bContext *C);
-   extern void wm_window_process_events(const bContext *C);
-   extern void wm_event_do_handlers(bContext *C);
-   extern void wm_event_do_notifiers(bContext *C);
-   extern void wm_draw_update(bContext *C);
-};*/
+
 @interface CocoaWindowDelegate : NSObject
 
 {
@@ -125,14 +115,10 @@
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
//}
 #endif
-   /* Live resize ugly patch. Needed because live resize runs in a modal 
loop, not letting main loop run
+   /* Live resize, send event, gets handled in wm_window.c. Needed because 
live resize runs in a modal loop, not letting main loop run */
 if ([[notification object] inLiveResize]) {
systemCocoa->dispatchEvents();
-   wm_window_timer(ghostC);
-   wm_event_do_handlers(ghostC);
-   wm_event_do_notifiers(ghostC);
-   wm_draw_update(ghostC);
-   }*/
+   }
 }
 
 - (void)windowDidChangeBackingProperties:(NSNotification *)notification

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-05-25 
13:34:21 UTC (rev 57017)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-05-25 
14:08:56 UTC (rev 57018)
@@ -887,7 +887,7 @@
}
else {
m_multisampleEnabled = 
GHOST_kSuccess;
-   printf("Multisample failed to 
initialized\n");
+   printf("Multisample failed to 
initialize\n");
success = GHOST_kSuccess;
}
}

Modified: trunk/blender/source/blender/editors/screen/screen_edit.c
===
--- trunk/blender/source/blender/editors/screen/screen_edit.c   2013-05-25 
13:34:21 UTC (rev 57017)
+++ trunk/blender/source/blender/editors/screen/screen_edit.c   2013-05-25 
14:08:56 UTC (rev 57018)
@@ -664,15 +664,15 @@
 * need some way to store these as floats internally 
and re-apply from there. */
tempf = ((float)sv->vec.x) * facx;
sv->vec.x = (short)(tempf + 0.5f);
-   sv->vec.x += AREAGRID - 1;
-   sv->vec.x -=  (sv->vec.x % AREAGRID);
+   //sv->vec.x += AREAGRID - 1;
+   //sv->vec.x -=  (sv->vec.x % AREAGRID);
 
CLAMP(sv->vec.x, 0, winsizex);

tempf = ((float)sv->vec.y) * facy;
sv->vec.y = (short)(tempf + 0.5f);
-   sv->vec.y += AREAGRID - 1;
-   sv->vec.y -=  (sv->vec.y % AREAGRID);
+   //sv->vec.y += AREAGRID - 1;
+   //sv->vec.y -=  (sv->vec.y % AREAGRID);
 
CLAMP(sv->vec.y, 0, winsizey);
}

Modified: trunk/blender/source/blender/windowmanager/intern/wm_window.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_window.c   
2013-05-25 13:34:21 UTC (rev 57017)
+++ trunk/blender/source/blender/windowmanager/intern/wm_window.c 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57015] trunk/blender/source/blender/ editors: Bug fix, irc submitted:

2013-05-25 Thread Ton Roosendaal
Revision: 57015
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57015
Author:   ton
Date: 2013-05-25 11:52:52 + (Sat, 25 May 2013)
Log Message:
---
Bug fix, irc submitted:

3D Viewport render (internal) didn't render bump maps (it was black even).

Modified Paths:
--
trunk/blender/source/blender/editors/include/ED_view3d.h
trunk/blender/source/blender/editors/render/render_internal.c
trunk/blender/source/blender/editors/render/render_opengl.c
trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
trunk/blender/source/blender/editors/space_view3d/view3d_view.c

Modified: trunk/blender/source/blender/editors/include/ED_view3d.h
===
--- trunk/blender/source/blender/editors/include/ED_view3d.h2013-05-25 
09:46:28 UTC (rev 57014)
+++ trunk/blender/source/blender/editors/include/ED_view3d.h2013-05-25 
11:52:52 UTC (rev 57015)
@@ -215,7 +215,7 @@
 bool ED_view3d_clip_range_get(struct View3D *v3d, struct RegionView3D *rv3d,
   float *r_clipsta, float *r_clipend, const bool 
use_ortho_factor);
 bool ED_view3d_viewplane_get(struct View3D *v3d, struct RegionView3D *rv3d, 
int winxi, int winyi,
- struct rctf *r_viewplane, float *r_clipsta, float 
*r_clipend);
+ struct rctf *r_viewplane, float *r_clipsta, float 
*r_clipend, float *r_pixsize);
 void ED_view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar,
   struct View3D *v3d, struct RegionView3D 
*rv3d,
   struct rctf *r_viewborder, const bool 
no_shift);

Modified: trunk/blender/source/blender/editors/render/render_internal.c
===
--- trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-25 09:46:28 UTC (rev 57014)
+++ trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-25 11:52:52 UTC (rev 57015)
@@ -760,12 +760,12 @@
 
 /* returns true if OK  */
 static bool render_view3d_get_rects(ARegion *ar, View3D *v3d, RegionView3D 
*rv3d, rctf *viewplane, RenderEngine *engine,
-float *r_clipsta, float *r_clipend, bool 
*r_ortho)
+float *r_clipsta, float *r_clipend, float 
*r_pixsize, bool *r_ortho)
 {

if (ar->winx < 4 || ar->winy < 4) return false;

-   *r_ortho = ED_view3d_viewplane_get(v3d, rv3d, ar->winx, ar->winy, 
viewplane, r_clipsta, r_clipend);
+   *r_ortho = ED_view3d_viewplane_get(v3d, rv3d, ar->winx, ar->winy, 
viewplane, r_clipsta, r_clipend, r_pixsize);

engine->resolution_x = ar->winx;
engine->resolution_y = ar->winy;
@@ -819,13 +819,13 @@
RenderData rdata;
rctf viewplane;
rcti cliprct;
-   float clipsta, clipend;
+   float clipsta, clipend, pixsize;
bool orth, restore = 0;
char name[32];

G.is_break = FALSE;

-   if (false == render_view3d_get_rects(rp->ar, rp->v3d, rp->rv3d, 
&viewplane, rp->engine, &clipsta, &clipend, &orth))
+   if (false == render_view3d_get_rects(rp->ar, rp->v3d, rp->rv3d, 
&viewplane, rp->engine, &clipsta, &clipend, &pixsize, &orth))
return;

rp->stop = stop;
@@ -875,6 +875,8 @@
else
RE_SetWindow(re, &viewplane, clipsta, clipend);
 
+   RE_SetPixelSize(re, pixsize);
+   
/* database free can crash on a empty Render... */
if (rp->keep_data == 0 && rstats->convertdone)
RE_Database_Free(re);
@@ -1002,7 +1004,7 @@
update |= PR_UPDATE_VIEW;
}

-   render_view3d_get_rects(ar, v3d, rv3d, &viewplane, engine, 
&clipsta, &clipend, &orth);
+   render_view3d_get_rects(ar, v3d, rv3d, &viewplane, engine, 
&clipsta, &clipend, NULL, &orth);
RE_GetViewPlane(re, &viewplane1, &disprect1);

if (BLI_rctf_compare(&viewplane, &viewplane1, 0.1f) == 0)

Modified: trunk/blender/source/blender/editors/render/render_opengl.c
===
--- trunk/blender/source/blender/editors/render/render_opengl.c 2013-05-25 
09:46:28 UTC (rev 57014)
+++ trunk/blender/source/blender/editors/render/render_opengl.c 2013-05-25 
11:52:52 UTC (rev 57015)
@@ -191,7 +191,7 @@
rctf viewplane;
float clipsta, clipend;
 
-   int is_ortho = ED_view3d_viewplane_get(v3d, rv3d, 
sizex, sizey, &viewplane, &clipsta, &clipend);
+   int is_ortho = ED_view3d_viewplane_get(v3d, rv3d, 
sizex, sizey, &viewplane, &clipsta, &clipend, NULL);
if (is_ortho) orthographic_m4(winmat

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56977] trunk/blender/source/blender/bmesh /intern/bmesh_walkers_impl.c: Bug fix, IRC report.

2013-05-23 Thread Ton Roosendaal
Revision: 56977
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56977
Author:   ton
Date: 2013-05-23 16:01:25 + (Thu, 23 May 2013)
Log Message:
---
Bug fix, IRC report.

Mesh with very strange topology makes loop-select (ALT+select) crash.
Missing NULL check for do-while loop that can return NULL.

For Campbell: here's the file to check: http://www.pasteall.org/blend/21576

Modified Paths:
--
trunk/blender/source/blender/bmesh/intern/bmesh_walkers_impl.c

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_walkers_impl.c
===
--- trunk/blender/source/blender/bmesh/intern/bmesh_walkers_impl.c  
2013-05-23 15:10:36 UTC (rev 56976)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_walkers_impl.c  
2013-05-23 16:01:25 UTC (rev 56977)
@@ -648,7 +648,7 @@
} while (true);
}
 
-   if (owalk.is_single == false && bm_edge_is_single(l->e)) {
+   if (owalk.is_single == false && l && bm_edge_is_single(l->e)) {
l = 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 [56976] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: Bug fix #35481

2013-05-23 Thread Ton Roosendaal
Revision: 56976
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56976
Author:   ton
Date: 2013-05-23 15:10:36 + (Thu, 23 May 2013)
Log Message:
---
Bug fix #35481

Browsing screens via menu disabled screen editing (area divider drag) and made
popup menu hanging (select same editor for example).

Caused by bug fix #35434, commit gets rewinded, and report reopened.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-05-23 13:09:06 UTC (rev 56975)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-05-23 15:10:36 UTC (rev 56976)
@@ -247,8 +247,7 @@
if (note->window == win) {
if (note->category == NC_SCREEN) {
if (note->data == ND_SCREENBROWSE) {
-   /* free popup handlers */
-   WM_event_remove_handlers(C, 
&win->modalhandlers);
+   /* do not free handlers here! 
[#35434] */
 
ED_screen_set(C, 
note->reference);  // XXX hrms, think this over!
if (G.debug & G_DEBUG_EVENTS)

___
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 [56883] trunk/blender/source/blender: More work on 3d view render:

2013-05-17 Thread Ton Roosendaal
Revision: 56883
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56883
Author:   ton
Date: 2013-05-17 16:46:59 + (Fri, 17 May 2013)
Log Message:
---
More work on 3d view render:

- reverted fix for bug 32537 (error report drawing after thread job didn't show)

  This solves very bad 3d view render updates while using transform, it was
  getting into an eternal feedback loop for dependencies. (jobs sending 
mousemoves
  causing jobs to end, causing mousemoves, causing etc).
  
- The render-update code was not going over all windows, but over every screen 
to
  send signals (also the invisble ones)

Modified Paths:
--
trunk/blender/source/blender/editors/render/render_internal.c
trunk/blender/source/blender/editors/render/render_update.c
trunk/blender/source/blender/windowmanager/WM_api.h
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
trunk/blender/source/blender/windowmanager/intern/wm_jobs.c

Modified: trunk/blender/source/blender/editors/render/render_internal.c
===
--- trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-17 16:37:47 UTC (rev 56882)
+++ trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-17 16:46:59 UTC (rev 56883)
@@ -47,6 +47,7 @@
 
 #include "BKE_blender.h"
 #include "BKE_context.h"
+#include "BKE_depsgraph.h"
 #include "BKE_freestyle.h"
 #include "BKE_global.h"
 #include "BKE_image.h"
@@ -926,7 +927,6 @@

if (CTX_wm_window(C) == NULL) {
engine->flag |= RE_ENGINE_DO_UPDATE;
-   
return;
}
 
@@ -962,7 +962,7 @@
 
 /* callback for render engine , on changes */
 void render_view3d(RenderEngine *engine, const bContext *C)
-{
+{  
render_view3d_do(engine, C, 0);
 }
 
@@ -986,8 +986,12 @@
float clipsta, clipend;
bool orth;
 
-   if (engine->update_flag == RE_ENGINE_UPDATE_MA)
+   if (engine->update_flag & RE_ENGINE_UPDATE_MA)
update |= PR_UPDATE_MATERIAL;
+   
+   if (engine->update_flag & RE_ENGINE_UPDATE_OTHER)
+   update |= PR_UPDATE_MATERIAL;
+   
engine->update_flag = 0;

if (engine->resolution_x != ar->winx || engine->resolution_y != 
ar->winy)

Modified: trunk/blender/source/blender/editors/render/render_update.c
===
--- trunk/blender/source/blender/editors/render/render_update.c 2013-05-17 
16:37:47 UTC (rev 56882)
+++ trunk/blender/source/blender/editors/render/render_update.c 2013-05-17 
16:46:59 UTC (rev 56883)
@@ -41,6 +41,7 @@
 #include "DNA_space_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_world_types.h"
+#include "DNA_windowmanager_types.h"
 
 #include "BLI_threads.h"
 #include "BLI_utildefines.h"
@@ -78,11 +79,14 @@
/* viewport rendering update on data changes, happens after depsgraph
 * updates if there was any change. context is set to the 3d view */
bContext *C;
-   bScreen *sc;
-   ScrArea *sa;
-   ARegion *ar;
+   wmWindowManager *wm;
+   wmWindow *win;
static int recursive_check = FALSE;
 
+   /* why do this function then? :) */
+   if (updated == 0)
+   return;
+   
/* don't do this render engine update if we're updating the scene from
 * other threads doing e.g. rendering or baking jobs */
if (!BLI_thread_is_main())
@@ -99,8 +103,15 @@
CTX_data_scene_set(C, scene);
 
CTX_wm_manager_set(C, bmain->wm.first);
-
-   for (sc = bmain->screen.first; sc; sc = sc->id.next) {
+   wm = bmain->wm.first;
+   
+   for (win = wm->windows.first; win; win = win->next) {
+   bScreen *sc = win->screen;
+   ScrArea *sa;
+   ARegion *ar;
+   
+   CTX_wm_window_set(C, win);
+   
for (sa = sc->areabase.first; sa; sa = sa->next) {
if (sa->spacetype != SPACE_VIEW3D)
continue;

Modified: trunk/blender/source/blender/windowmanager/WM_api.h
===
--- trunk/blender/source/blender/windowmanager/WM_api.h 2013-05-17 16:37:47 UTC 
(rev 56882)
+++ trunk/blender/source/blender/windowmanager/WM_api.h 2013-05-17 16:46:59 UTC 
(rev 56883)
@@ -170,7 +170,6 @@
 
/* mouse */
 void   WM_event_add_mousemove(struct bContext *C);
-void   WM_event_add_mousemove_window(struct wmWindow *window);
 intWM_modal_tweak_exit(const struct wmEvent *event, int 
tweak_event);
 
/* notifiers */

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56880] trunk/blender/source/blender/ blenkernel/intern: Bug fix, own collection.

2013-05-17 Thread Ton Roosendaal
Revision: 56880
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56880
Author:   ton
Date: 2013-05-17 13:15:43 + (Fri, 17 May 2013)
Log Message:
---
Bug fix, own collection.

Shapekey drivers were executed for every call to derivedmesh, which shouldn't 
happen.
It now only runs on the object_update() function, once for every depsgraph 
change.

Error was found while testing preview render in viewport. On each render, the
animsys sent a 'changed data' because of the shapekey drivers being called,
causing eternal re-render loops (without showing anything).

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

Modified: trunk/blender/source/blender/blenkernel/intern/key.c
===
--- trunk/blender/source/blender/blenkernel/intern/key.c2013-05-17 
13:02:03 UTC (rev 56879)
+++ trunk/blender/source/blender/blenkernel/intern/key.c2013-05-17 
13:15:43 UTC (rev 56880)
@@ -1389,10 +1389,6 @@
cp_cu_key(ob->data, key, actkb, kb, 0, tot, out, tot);
}
else {
-   /* do shapekey local drivers */
-   float ctime = BKE_scene_frame_get(scene);
-
-   BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, 
ADT_RECALC_DRIVERS);

if (ob->type == OB_MESH) do_mesh_key(scene, ob, key, out, tot);
else if (ob->type == OB_LATTICE) do_latt_key(scene, ob, key, 
out, tot);

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===
--- trunk/blender/source/blender/blenkernel/intern/object.c 2013-05-17 
13:02:03 UTC (rev 56879)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2013-05-17 
13:15:43 UTC (rev 56880)
@@ -2621,6 +2621,7 @@
if (ob->recalc & OB_RECALC_DATA) {
ID *data_id = (ID *)ob->data;
AnimData *adt = BKE_animdata_from_id(data_id);
+   Key *key;
float ctime = BKE_scene_frame_get(scene);

if (G.debug & G_DEBUG)
@@ -2631,6 +2632,12 @@
/* XXX: for mesh types, should we push this to 
derivedmesh instead? */
BKE_animsys_evaluate_animdata(scene, data_id, 
adt, ctime, ADT_RECALC_DRIVERS);
}
+   
+   key = BKE_key_from_object(ob);
+   if (key && key->block.first) {
+   if (!(ob->shapeflag & OB_SHAPE_LOCK))
+   BKE_animsys_evaluate_animdata(scene, 
&key->id, key->adt, ctime, ADT_RECALC_DRIVERS);
+   }
 
/* includes all keys and modifiers */
switch (ob->type) {

___
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 [56874] trunk/blender/source/blender: 3D Viewport rendering (Blender Internal)

2013-05-17 Thread Ton Roosendaal
Revision: 56874
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56874
Author:   ton
Date: 2013-05-17 11:13:46 + (Fri, 17 May 2013)
Log Message:
---
3D Viewport rendering (Blender Internal)

Added incremental re-render on view changes. That means all data preprocessing
only needs to be done once on view changes, quite faster that way.

Also fixed a bug in raytracing strands with soft shadows, was wrongly changing
coordinates in a static array.

Note: proper signals for re-renders is still on the todo. Many button options
don't signal a re-render yet. Work around: press G+ESC for quick full renders.

Modified Paths:
--
trunk/blender/source/blender/editors/render/render_internal.c
trunk/blender/source/blender/render/intern/include/envmap.h
trunk/blender/source/blender/render/intern/include/rayintersection.h
trunk/blender/source/blender/render/intern/include/renderdatabase.h
trunk/blender/source/blender/render/intern/source/convertblender.c
trunk/blender/source/blender/render/intern/source/envmap.c
trunk/blender/source/blender/render/intern/source/rayshade.c

Modified: trunk/blender/source/blender/editors/render/render_internal.c
===
--- trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-17 11:08:50 UTC (rev 56873)
+++ trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-17 11:13:46 UTC (rev 56874)
@@ -718,6 +718,8 @@
Main *bmain;
RenderEngine *engine;

+   float viewmat[4][4];
+   
int keep_data;
 } RenderPreview;
 
@@ -828,7 +830,7 @@
rp->stop = stop;
rp->do_update = do_update;
 
-// printf("Enter previewrender\n");
+   // printf("Enter previewrender\n");

/* ok, are we rendering all over? */
sprintf(name, "View3dPreview %p", (void *)rp->ar);
@@ -884,14 +886,14 @@
lay |= rp->v3d->lay;
else lay = rp->v3d->lay;

-   RE_SetView(re, rp->rv3d->viewmat);
+   RE_SetView(re, rp->viewmat);

RE_Database_FromScene(re, rp->bmain, rp->scene, lay, 0);
// 0= dont use camera view
-// printf("dbase update\n");
+   // printf("dbase update\n");
}
else {
-// printf("dbase rotate\n");
-   RE_DataBase_IncrementalView(re, rp->rv3d->viewmat, 0);
+   // printf("dbase rotate\n");
+   RE_DataBase_IncrementalView(re, rp->viewmat, 0);
restore = 1;
}
 
@@ -900,15 +902,13 @@
/* OK, can we enter render code? */
if (rstats->convertdone) {
RE_TileProcessor(re);
-// printf("tile processor\n");

+   /* always rotate back */
if (restore)
-   RE_DataBase_IncrementalView(re, rp->rv3d->viewmat, 1);
-   
+   RE_DataBase_IncrementalView(re, rp->viewmat, 1);
+
rp->engine->flag &= ~RE_ENGINE_DO_UPDATE;
}
-
-// printf("done\n\n");
 }
 
 static void render_view3d_free(void *customdata)
@@ -943,6 +943,7 @@
rp->rv3d = CTX_wm_region_view3d(C);
rp->bmain = CTX_data_main(C);
rp->keep_data = keep_data;
+   copy_m4_m4(rp->viewmat, rp->rv3d->viewmat);

/* dont alloc in threads */
if (engine->text == NULL)
@@ -992,13 +993,9 @@
if (engine->resolution_x != ar->winx || engine->resolution_y != 
ar->winy)
update |= PR_UPDATE_RENDERSIZE;
 
-   /* view updating fails on raytrace */
RE_GetView(re, mat);
if (compare_m4m4(mat, rv3d->viewmat, 0.1f) == 0) {
-   if ((scene->r.mode & R_RAYTRACE) == 0)
-   update |= PR_UPDATE_VIEW;
-   else
-   engine->flag |= RE_ENGINE_DO_UPDATE;
+   update |= PR_UPDATE_VIEW;
}

render_view3d_get_rects(ar, v3d, rv3d, &viewplane, engine, 
&clipsta, &clipend, &orth);
@@ -1013,8 +1010,8 @@

if (update)
engine->flag |= RE_ENGINE_DO_UPDATE;
-// if (update)
-// printf("changed ma %d res %d view %d\n", update & 
PR_UPDATE_MATERIAL, update & PR_UPDATE_RENDERSIZE, update & PR_UPDATE_VIEW);
+   //if (update)
+   //  printf("changed ma %d res %d view %d\n", update & 
PR_UPDATE_MATERIAL, update & PR_UPDATE_RENDERSIZE, update & PR_UPDATE_VIEW);
}

return update;

Modified: trunk/blender/source/blender/render/intern/include/envmap.h
===
--- trunk/blender/source/blen

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56819] trunk/blender/source/blender/ editors/screen/area.c: The Area Split/ Merge corner widget was drawing 1 pixel too big, the lines overlapped

2013-05-15 Thread Ton Roosendaal
Revision: 56819
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56819
Author:   ton
Date: 2013-05-15 12:05:35 + (Wed, 15 May 2013)
Log Message:
---
The Area Split/Merge corner widget was drawing 1 pixel too big, the lines 
overlapped
the area divider line.

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

Modified: trunk/blender/source/blender/editors/screen/area.c
===
--- trunk/blender/source/blender/editors/screen/area.c  2013-05-15 11:26:57 UTC 
(rev 56818)
+++ trunk/blender/source/blender/editors/screen/area.c  2013-05-15 12:05:35 UTC 
(rev 56819)
@@ -589,8 +589,8 @@
az = (AZone *)MEM_callocN(sizeof(AZone), "actionzone");
BLI_addtail(&(sa->actionzones), az);
az->type = AZONE_AREA;
-   az->x1 = sa->totrct.xmax + 1;
-   az->y1 = sa->totrct.ymax + 1;
+   az->x1 = sa->totrct.xmax;
+   az->y1 = sa->totrct.ymax;
az->x2 = sa->totrct.xmax - (AZONESPOT - 1);
az->y2 = sa->totrct.ymax - (AZONESPOT - 1);
BLI_rcti_init(&az->rect, az->x1, az->x2, az->y1, az->y2);

___
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 [56721] trunk/blender/source/blender: Viewport Render Internal:

2013-05-12 Thread Ton Roosendaal
Revision: 56721
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56721
Author:   ton
Date: 2013-05-12 17:16:43 + (Sun, 12 May 2013)
Log Message:
---
Viewport Render Internal:

Animated characters were not rendering yet, the render code for it
caused a signal for re-draw and re-render, in eternal loop.

Solved by forcing viewport render to use the same derivedmesh data
as for 3d viewport drawing. Faster too.

Modified Paths:
--
trunk/blender/source/blender/editors/render/render_internal.c
trunk/blender/source/blender/render/intern/source/convertblender.c

Modified: trunk/blender/source/blender/editors/render/render_internal.c
===
--- trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-12 17:14:01 UTC (rev 56720)
+++ trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-12 17:16:43 UTC (rev 56721)
@@ -1008,7 +1008,6 @@
engine->flag |= RE_ENGINE_DO_UPDATE;
 // if (update)
 // printf("changed ma %d res %d view %d\n", update & 
PR_UPDATE_MATERIAL, update & PR_UPDATE_RENDERSIZE, update & PR_UPDATE_VIEW);
-   
}

return update;

Modified: trunk/blender/source/blender/render/intern/source/convertblender.c
===
--- trunk/blender/source/blender/render/intern/source/convertblender.c  
2013-05-12 17:14:01 UTC (rev 56720)
+++ trunk/blender/source/blender/render/intern/source/convertblender.c  
2013-05-12 17:16:43 UTC (rev 56721)
@@ -3379,7 +3379,10 @@
mask |= CD_MASK_ORIGINDEX | CD_MASK_FREESTYLE_EDGE | 
CD_MASK_FREESTYLE_FACE;
 #endif
 
-   dm= mesh_create_derived_render(re->scene, ob, mask);
+   if (re->r.scemode & R_PREVIEWBUTS)
+   dm = mesh_get_derived_final(re->scene, ob, mask);
+   else
+   dm= mesh_create_derived_render(re->scene, ob, mask);
if (dm==NULL) return;   /* in case duplicated object fails? */
 
if (mask & CD_MASK_ORCO) {
@@ -4686,7 +4689,10 @@
/* the emitter mesh wasn't rendered so the modifier 
stack wasn't
 * evaluated with render settings */
DerivedMesh *dm;
-   dm = mesh_create_derived_render(re->scene, ob,  
CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
+   if (re->r.scemode & R_PREVIEWBUTS)
+   dm = mesh_get_derived_final(re->scene, ob, 
CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
+   else
+   dm = mesh_create_derived_render(re->scene, ob,  
CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
dm->release(dm);
}
 
@@ -4972,7 +4978,10 @@
/* this is to make sure we get render level duplis in 
groups:
 * the derivedmesh must be created before 
init_render_mesh,
 * since object_duplilist does dupliparticles before 
that */
-   dm = mesh_create_derived_render(re->scene, ob, 
CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
+   if (re->r.scemode & R_PREVIEWBUTS)
+   dm = mesh_get_derived_final(re->scene, ob, 
CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
+   else
+   dm = mesh_create_derived_render(re->scene, ob, 
CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
dm->release(dm);
 
for (psys=ob->particlesystem.first; psys; 
psys=psys->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 [56705] trunk/blender/source/blender: 3D viewport render preview:

2013-05-12 Thread Ton Roosendaal
Revision: 56705
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56705
Author:   ton
Date: 2013-05-12 13:15:41 + (Sun, 12 May 2013)
Log Message:
---
3D viewport render preview:

- Put it available as a default now (no debug value needed)
- Fixed viewport size error, viewport was badly set
  (visible with border render, property regions)
- Fixed hanging lock in conflict between drawing and initialize
  new renders.

Modified Paths:
--
trunk/blender/source/blender/editors/render/render_internal.c
trunk/blender/source/blender/editors/render/render_preview.c
trunk/blender/source/blender/render/extern/include/RE_pipeline.h
trunk/blender/source/blender/render/intern/include/render_types.h
trunk/blender/source/blender/render/intern/source/external_engine.c
trunk/blender/source/blender/render/intern/source/pipeline.c

Modified: trunk/blender/source/blender/editors/render/render_internal.c
===
--- trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-12 12:23:44 UTC (rev 56704)
+++ trunk/blender/source/blender/editors/render/render_internal.c   
2013-05-12 13:15:41 UTC (rev 56705)
@@ -854,10 +854,10 @@
/* initalize always */
if (render_view3d_disprect(rp->scene, rp->ar, rp->v3d, 
rp->rv3d, &cliprct)) {
rdata.mode |= R_BORDER;
-   RE_InitState(re, NULL, &rdata, NULL, rp->sa->winx, 
rp->sa->winy, &cliprct);
+   RE_InitState(re, NULL, &rdata, NULL, rp->ar->winx, 
rp->ar->winy, &cliprct);
}
else
-   RE_InitState(re, NULL, &rdata, NULL, rp->sa->winx, 
rp->sa->winy, NULL);
+   RE_InitState(re, NULL, &rdata, NULL, rp->ar->winx, 
rp->ar->winy, NULL);
}
 
if (orth)
@@ -1030,7 +1030,7 @@
if (rres.rectf) {
unsigned char *rect_byte = MEM_mallocN(rres.rectx * rres.recty 
* sizeof(int), "ed_preview_draw_rect");

-   RE_ResultGet32(re, (unsigned int *)rect_byte);
+   RE_AcquiredResultGet32(re, &rres, (unsigned int *)rect_byte);

glEnable(GL_BLEND);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);

Modified: trunk/blender/source/blender/editors/render/render_preview.c
===
--- trunk/blender/source/blender/editors/render/render_preview.c
2013-05-12 12:23:44 UTC (rev 56704)
+++ trunk/blender/source/blender/editors/render/render_preview.c
2013-05-12 13:15:41 UTC (rev 56705)
@@ -563,7 +563,7 @@
float fx = rect->xmin + offx;
float fy = rect->ymin;

-   RE_ResultGet32(re, (unsigned int *)rect_byte);
+   RE_AcquiredResultGet32(re, &rres, (unsigned int 
*)rect_byte);
glaDrawPixelsSafe(fx, fy, rres.rectx, 
rres.recty, rres.rectx, GL_RGBA, GL_UNSIGNED_BYTE, rect_byte);

MEM_freeN(rect_byte);

Modified: trunk/blender/source/blender/render/extern/include/RE_pipeline.h
===
--- trunk/blender/source/blender/render/extern/include/RE_pipeline.h
2013-05-12 12:23:44 UTC (rev 56704)
+++ trunk/blender/source/blender/render/extern/include/RE_pipeline.h
2013-05-12 13:15:41 UTC (rev 56705)
@@ -179,7 +179,10 @@
 void RE_ReleaseResultImage(struct Render *re);
 void RE_SwapResult(struct Render *re, struct RenderResult **rr);
 struct RenderStats *RE_GetStats(struct Render *re);
+
 void RE_ResultGet32(struct Render *re, unsigned int *rect);
+void RE_AcquiredResultGet32(struct Render *re, struct RenderResult *result, 
unsigned int *rect);
+
 struct RenderLayer *RE_GetRenderLayer(struct RenderResult *rr, const char 
*name);
 float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype);
 

Modified: trunk/blender/source/blender/render/intern/include/render_types.h
===
--- trunk/blender/source/blender/render/intern/include/render_types.h   
2013-05-12 12:23:44 UTC (rev 56704)
+++ trunk/blender/source/blender/render/intern/include/render_types.h   
2013-05-12 13:15:41 UTC (rev 56705)
@@ -345,7 +345,8 @@
Object *ob, *par;
int index, psysindex, lay;
 
-   float mat[4][4], nmat[3][3]; /* nmat is inverse mat tranposed */
+   float mat[4][4], imat[4][4];
+   float nmat[3][3]; /* nmat is inverse mat tranposed */
short flag;
 
float dupliorco[3], dupliuv[2];

Modified: trunk/blender/source/blender/render/intern/source/external_engine.c
==

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56689] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: Bug fix, irc submitted

2013-05-11 Thread Ton Roosendaal
Revision: 56689
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56689
Author:   ton
Date: 2013-05-11 16:15:09 + (Sat, 11 May 2013)
Log Message:
---
Bug fix, irc submitted

If you have three scenes, current is A, others are B and C.

B uses C as background, and C uses B as a background.
(which is possible via linked libraries)

If you then try to use B or C as background of A, code went to eternal loop.

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

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-05-11 
15:29:57 UTC (rev 56688)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2013-05-11 
16:15:09 UTC (rev 56689)
@@ -453,6 +453,9 @@
for (nested_set = set; nested_set; nested_set = nested_set->set) {
if (nested_set == scene)
return;
+   /* prevent eternal loops, set can point to next, and next to 
set, without problems usually */
+   if (nested_set->set == set)
+   return;
}
 
scene->set = set;

___
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 [56688] trunk/blender/source/blender/ editors/interface/interface_regions.c: Bug fix #35307

2013-05-11 Thread Ton Roosendaal
Revision: 56688
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56688
Author:   ton
Date: 2013-05-11 15:29:57 + (Sat, 11 May 2013)
Log Message:
---
Bug fix #35307

Popup menus in nodes, with nodes outside window boundary, were clipped very 
badly, even
causing it to fill entire window.

Now the clip code nicely translates the menu horizontally to be in view.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_regions.c

Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
===
--- trunk/blender/source/blender/editors/interface/interface_regions.c  
2013-05-11 14:40:03 UTC (rev 56687)
+++ trunk/blender/source/blender/editors/interface/interface_regions.c  
2013-05-11 15:29:57 UTC (rev 56688)
@@ -1553,6 +1553,7 @@
 static void ui_popup_block_clip(wmWindow *window, uiBlock *block)
 {
uiBut *bt;
+   float xofs = 0.0f;
int width = UI_SCREEN_MARGIN;
int winx, winy;
 
@@ -1563,10 +1564,18 @@
winx = WM_window_pixels_x(window);
winy = WM_window_pixels_y(window);

-   if (block->rect.xmin < width)
-   block->rect.xmin = width;
-   if (block->rect.xmax > winx - width)
-   block->rect.xmax = winx - width;
+   /* shift menus to right if outside of view */
+   if (block->rect.xmin < width) {
+   xofs = (width - block->rect.xmin);
+   block->rect.xmin += xofs;
+   block->rect.xmax += xofs;
+   }
+   /* or shift to left if outside of view */
+   if (block->rect.xmax > winx - width) {
+   xofs = winx - width - block->rect.xmax;
+   block->rect.xmin += xofs;
+   block->rect.xmax += xofs;
+   }

if (block->rect.ymin < width)
block->rect.ymin = width;
@@ -1575,10 +1584,8 @@

/* ensure menu items draw inside left/right boundary */
for (bt = block->buttons.first; bt; bt = bt->next) {
-   if (bt->rect.xmin < block->rect.xmin)
-   bt->rect.xmin = block->rect.xmin;
-   if (bt->rect.xmax > block->rect.xmax)
-   bt->rect.xmax = block->rect.xmax;
+   bt->rect.xmin += xofs;
+   bt->rect.xmax += xofs;
}
 
 }

___
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 [56532] trunk/blender/source/blender/ blenloader/intern/readfile.c: Putting undefined versioning to only older than 2.67.

2013-05-07 Thread Ton Roosendaal
Revision: 56532
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56532
Author:   ton
Date: 2013-05-07 16:35:37 + (Tue, 07 May 2013)
Log Message:
---
Putting undefined versioning to only older than 2.67.

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2013-05-07 
16:27:55 UTC (rev 56531)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2013-05-07 
16:35:37 UTC (rev 56532)
@@ -9346,7 +9346,7 @@
}

/* default values in Freestyle settings */
-   {
+   if (main->versionfile < 267) {
Scene *sce;
SceneRenderLayer *srl;
FreestyleLineStyle *linestyle;
@@ -9404,7 +9404,7 @@
}
}
 
-   {
+   if (main->versionfile < 267) {
/* Initialize the active_viewer_key for compositing */
bScreen *screen;
Scene *scene;

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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56531] trunk/blender: And here' s the epic 2.67 splash and version!

2013-05-07 Thread Ton Roosendaal
Revision: 56531
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56531
Author:   ton
Date: 2013-05-07 16:27:55 + (Tue, 07 May 2013)
Log Message:
---
And here's the epic 2.67 splash and version!

Celebrating Freestyle :) Kudos to dfeveloper Tamito and Malaysian artist 
Mclelun!

Modified Paths:
--
trunk/blender/release/datafiles/splash.png
trunk/blender/source/blender/blenkernel/BKE_blender.h

Modified: trunk/blender/release/datafiles/splash.png
===
(Binary files differ)

Modified: trunk/blender/source/blender/blenkernel/BKE_blender.h
===
--- trunk/blender/source/blender/blenkernel/BKE_blender.h   2013-05-07 
16:14:13 UTC (rev 56530)
+++ trunk/blender/source/blender/blenkernel/BKE_blender.h   2013-05-07 
16:27:55 UTC (rev 56531)
@@ -41,8 +41,8 @@
 /* these lines are grep'd, watch out for our not-so-awesome regex
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
-#define BLENDER_VERSION 266
-#define BLENDER_SUBVERSION  6
+#define BLENDER_VERSION 267
+#define BLENDER_SUBVERSION  0
 
 /* 262 was the last editmesh release but it has compatibility code for bmesh 
data */
 #define BLENDER_MINVERSION  262
@@ -50,9 +50,9 @@
 
 /* used by packaging tools */
 /* can be left blank, otherwise a,b,c... etc with no quotes */
-#define BLENDER_VERSION_CHARa
+#define BLENDER_VERSION_CHAR
 /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE   alpha
+#define BLENDER_VERSION_CYCLE   release
 
 extern char versionstr[]; /* from blender.c */
 

___
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 [56509] trunk/blender/source/blender/ blenloader/intern/readfile.c: Bug fix #35179

2013-05-06 Thread Ton Roosendaal
Revision: 56509
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56509
Author:   ton
Date: 2013-05-06 11:23:13 + (Mon, 06 May 2013)
Log Message:
---
Bug fix #35179

Added provision for saved corrupt blend files - caused by a startup.blend 
addressing > 16 GB space, which was read in 32 bits.

Now an invalid screen will get removed immediate after read. Might give
a memory-not-in-memlist print, but that's quite safe.

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2013-05-06 
11:12:00 UTC (rev 56508)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2013-05-06 
11:23:13 UTC (rev 56509)
@@ -6148,11 +6148,12 @@
v3d->twtype = V3D_MANIP_TRANSLATE;
 }
 
-static void direct_link_screen(FileData *fd, bScreen *sc)
+static bool direct_link_screen(FileData *fd, bScreen *sc)
 {
ScrArea *sa;
ScrVert *sv;
ScrEdge *se;
+   bool wrong_id = false;

link_list(fd, &(sc->vertbase));
link_list(fd, &(sc->edgebase));
@@ -6174,8 +6175,8 @@
}

if (se->v1 == NULL) {
-   printf("error reading screen... file corrupt\n");
-   se->v1 = se->v2;
+   printf("Error reading Screen %s... removing it.\n", 
sc->id.name+2);
+   wrong_id = true;
}
}

@@ -6409,6 +6410,8 @@
sa->v3 = newdataadr(fd, sa->v3);
sa->v4 = newdataadr(fd, sa->v4);
}
+   
+   return wrong_id;
 }
 
 /* ** READ LIBRARY *** */
@@ -7016,6 +7019,7 @@
ID *id;
ListBase *lb;
const char *allocname;
+   bool wrong_id;

/* read libblock */
id = read_struct(fd, bhead, "lib block");
@@ -7063,7 +7067,7 @@
direct_link_windowmanager(fd, (wmWindowManager *)id);
break;
case ID_SCR:
-   direct_link_screen(fd, (bScreen *)id);
+   wrong_id = direct_link_screen(fd, (bScreen *)id);
break;
case ID_SCE:
direct_link_scene(fd, (Scene *)id);
@@ -7160,6 +7164,10 @@
oldnewmap_free_unused(fd->datamap);
oldnewmap_clear(fd->datamap);

+   if (wrong_id) {
+   BKE_libblock_free(lb, id);
+   }
+   
return (bhead);
 }
 

___
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 [56473] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: Revert fix for #34822

2013-05-02 Thread Ton Roosendaal
Revision: 56473
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56473
Author:   ton
Date: 2013-05-02 15:10:24 + (Thu, 02 May 2013)
Log Message:
---
Revert fix for #34822

Allowing any-key modifiers to work is cool, but this needs more work.
My previous fix made overlapping key presses (where you release key 1
just after pressing key 2) to not register as valid shortcuts.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-05-02 14:42:05 UTC (rev 56472)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-05-02 15:10:24 UTC (rev 56473)
@@ -1384,9 +1384,9 @@
if (kmi->oskey != KM_ANY)
if (winevent->oskey != kmi->oskey && !(winevent->oskey & 
kmi->oskey)) return 0;

-   /* key modifiers always check when event has it */
-   /* otherwise regular keypresses with keymodifier still work */
-   if (winevent->keymodifier || kmi->keymodifier)
+   /* only keymap entry with keymodifier is checked, means all keys 
without modifier get handled too. */
+   /* that is currently needed to make overlapping events work (when you 
press A - G fast or so). */
+   if (kmi->keymodifier)
if (winevent->keymodifier != kmi->keymodifier) return 0;

return 1;

___
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 [56416] trunk/blender/source/blender/ editors/space_nla/space_nla.c: Bug fix #35151

2013-04-30 Thread Ton Roosendaal
Revision: 56416
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56416
Author:   ton
Date: 2013-04-30 15:17:20 + (Tue, 30 Apr 2013)
Log Message:
---
Bug fix #35151

NLA editor: the channel list and the main area were not perfectly aligned, and 
could
jump a bit around. Easy fix.

Modified Paths:
--
trunk/blender/source/blender/editors/space_nla/space_nla.c

Modified: trunk/blender/source/blender/editors/space_nla/space_nla.c
===
--- trunk/blender/source/blender/editors/space_nla/space_nla.c  2013-04-30 
13:10:14 UTC (rev 56415)
+++ trunk/blender/source/blender/editors/space_nla/space_nla.c  2013-04-30 
15:17:20 UTC (rev 56416)
@@ -206,6 +206,9 @@
 {
wmKeyMap *keymap;

+   /* ensure the 2d view sync works - main region has bottom scroller */
+   ar->v2d.scroll = V2D_SCROLL_BOTTOM;
+   
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, 
ar->winy);

/* own keymap */

___
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 [56412] trunk/blender/source/blender: Bug fix #35143

2013-04-30 Thread Ton Roosendaal
Revision: 56412
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56412
Author:   ton
Date: 2013-04-30 11:11:18 + (Tue, 30 Apr 2013)
Log Message:
---
Bug fix #35143

Animplayer treated .tif extensions as movie files, so that didn't work.
Added another hardcoded check for it, like for png tga exr jpg etc.

Why FFmpeg thinks .tif is a movie... that's for another day :)
Quicktime QTKit did same btw.

Modified Paths:
--
trunk/blender/source/blender/imbuf/intern/util.c
trunk/blender/source/blender/quicktime/apple/qtkit_import.m
trunk/blender/source/blender/quicktime/apple/quicktime_import.c

Modified: trunk/blender/source/blender/imbuf/intern/util.c
===
--- trunk/blender/source/blender/imbuf/intern/util.c2013-04-30 10:32:02 UTC 
(rev 56411)
+++ trunk/blender/source/blender/imbuf/intern/util.c2013-04-30 11:11:18 UTC 
(rev 56412)
@@ -297,6 +297,7 @@
BLI_testextensie(filename, ".dds") ||
BLI_testextensie(filename, ".tga") ||
BLI_testextensie(filename, ".bmp") ||
+   BLI_testextensie(filename, ".tif") ||
BLI_testextensie(filename, ".exr") ||
BLI_testextensie(filename, ".cin") ||
BLI_testextensie(filename, ".wav"))

Modified: trunk/blender/source/blender/quicktime/apple/qtkit_import.m
===
--- trunk/blender/source/blender/quicktime/apple/qtkit_import.m 2013-04-30 
10:32:02 UTC (rev 56411)
+++ trunk/blender/source/blender/quicktime/apple/qtkit_import.m 2013-04-30 
11:11:18 UTC (rev 56412)
@@ -94,6 +94,8 @@
BLI_testextensie(name, ".png") ||
BLI_testextensie(name, ".bmp") ||
BLI_testextensie(name, ".jpg") ||
+   BLI_testextensie(name, ".tif") ||
+   BLI_testextensie(name, ".exr") ||
BLI_testextensie(name, ".wav") ||
BLI_testextensie(name, ".zip") ||
BLI_testextensie(name, ".mp3"))

Modified: trunk/blender/source/blender/quicktime/apple/quicktime_import.c
===
--- trunk/blender/source/blender/quicktime/apple/quicktime_import.c 
2013-04-30 10:32:02 UTC (rev 56411)
+++ trunk/blender/source/blender/quicktime/apple/quicktime_import.c 
2013-04-30 11:11:18 UTC (rev 56412)
@@ -200,6 +200,8 @@
BLI_testextensie(name, ".png") ||
BLI_testextensie(name, ".bmp") ||
BLI_testextensie(name, ".jpg") ||
+   BLI_testextensie(name, ".tif") ||
+   BLI_testextensie(name, ".exr") ||
BLI_testextensie(name, ".wav") ||
BLI_testextensie(name, ".zip") ||
BLI_testextensie(name, ".mp3"))

___
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 [56374] trunk/blender/source/blender/ editors/interface/interface_widgets.c: Bug fix:

2013-04-29 Thread Ton Roosendaal
Revision: 56374
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56374
Author:   ton
Date: 2013-04-29 08:45:39 + (Mon, 29 Apr 2013)
Log Message:
---
Bug fix:

Labels in UI were not drawing greyed out when disabled.
Bug in post 2.66a commit to make greying out buttons draw much nicer.

User reported Addon menu was not clearly showing disabled Addons anymore.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_widgets.c

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-04-29 07:24:45 UTC (rev 56373)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-04-29 08:45:39 UTC (rev 56374)
@@ -1762,9 +1762,9 @@
widget_state(wt, state);
 
if (state & UI_SELECT)
-   UI_GetThemeColor4ubv(TH_TEXT_HI, (unsigned char 
*)wt->wcol.text);
+   UI_GetThemeColor3ubv(TH_TEXT_HI, (unsigned char 
*)wt->wcol.text);
else
-   UI_GetThemeColor4ubv(TH_TEXT, (unsigned char *)wt->wcol.text);
+   UI_GetThemeColor3ubv(TH_TEXT, (unsigned char *)wt->wcol.text);

 }
 

___
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 [56358] trunk/blender/intern/opencolorio/ ocio_impl_glsl.cc: Keeping my commit count high!

2013-04-28 Thread Ton Roosendaal
Revision: 56358
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56358
Author:   ton
Date: 2013-04-28 11:05:49 + (Sun, 28 Apr 2013)
Log Message:
---
Keeping my commit count high!

Previous GLSL code had error, the if() statement had to be negated.

Modified Paths:
--
trunk/blender/intern/opencolorio/ocio_impl_glsl.cc

Modified: trunk/blender/intern/opencolorio/ocio_impl_glsl.cc
===
--- trunk/blender/intern/opencolorio/ocio_impl_glsl.cc  2013-04-28 11:03:01 UTC 
(rev 56357)
+++ trunk/blender/intern/opencolorio/ocio_impl_glsl.cc  2013-04-28 11:05:49 UTC 
(rev 56358)
@@ -92,7 +92,7 @@
 "void main()\n"
 "{\n"
 "vec4 col = texture2D(tex1, gl_TexCoord[0].st);\n"
-"if (predivide == false || col[3] <= 0.0 || col[3] >= 1.0) {\n"
+"if (predivide && col[3] > 0.0 && col[3] < 1.0) {\n"
 "float inv_alpha = 1.0 / col[3];\n"
 "col[0] *= inv_alpha;\n"
 "col[1] *= inv_alpha;\n"

___
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 [56357] trunk/blender/intern/opencolorio/ ocio_impl_glsl.cc: GLSL display of float buffers with alpha:

2013-04-28 Thread Ton Roosendaal
Revision: 56357
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56357
Author:   ton
Date: 2013-04-28 11:03:01 + (Sun, 28 Apr 2013)
Log Message:
---
GLSL display of float buffers with alpha:
Previous version worked, now a version with simplifying this GLSL code.

Modified Paths:
--
trunk/blender/intern/opencolorio/ocio_impl_glsl.cc

Modified: trunk/blender/intern/opencolorio/ocio_impl_glsl.cc
===
--- trunk/blender/intern/opencolorio/ocio_impl_glsl.cc  2013-04-28 10:46:18 UTC 
(rev 56356)
+++ trunk/blender/intern/opencolorio/ocio_impl_glsl.cc  2013-04-28 11:03:01 UTC 
(rev 56357)
@@ -92,14 +92,12 @@
 "void main()\n"
 "{\n"
 "vec4 col = texture2D(tex1, gl_TexCoord[0].st);\n"
-"float inv_alpha = 1.0;"
 "if (predivide == false || col[3] <= 0.0 || col[3] >= 1.0) {\n"
 "float inv_alpha = 1.0 / col[3];\n"
+"col[0] *= inv_alpha;\n"
+"col[1] *= inv_alpha;\n"
+"col[2] *= inv_alpha;\n"
 "}\n"
-"col[0] *= inv_alpha;\n"
-"col[1] *= inv_alpha;\n"
-"col[2] *= inv_alpha;\n"
-"\n"
 "gl_FragColor = OCIODisplay(col, tex2);\n"
 "\n"
 "}\n";

___
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 [56356] trunk/blender/intern/opencolorio/ ocio_impl_glsl.cc: This glsl shader works for OCIO with alpha.

2013-04-28 Thread Ton Roosendaal
Revision: 56356
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56356
Author:   ton
Date: 2013-04-28 10:46:18 + (Sun, 28 Apr 2013)
Log Message:
---
This glsl shader works for OCIO with alpha. OSX iMac with ATI.

There's no logical reason I can find... but I commit it because many others have
the same error, so we can check.

Modified Paths:
--
trunk/blender/intern/opencolorio/ocio_impl_glsl.cc

Modified: trunk/blender/intern/opencolorio/ocio_impl_glsl.cc
===
--- trunk/blender/intern/opencolorio/ocio_impl_glsl.cc  2013-04-28 09:47:11 UTC 
(rev 56355)
+++ trunk/blender/intern/opencolorio/ocio_impl_glsl.cc  2013-04-28 10:46:18 UTC 
(rev 56356)
@@ -92,19 +92,16 @@
 "void main()\n"
 "{\n"
 "vec4 col = texture2D(tex1, gl_TexCoord[0].st);\n"
-"if (predivide == false || col[3] == 1.0 || col[3] == 0.0) {\n"
-"  gl_FragColor = OCIODisplay(col, tex2);\n"
-"} else {\n"
-"  float alpha = col[3];\n"
-"  float inv_alpha = 1.0 / alpha;\n"
+"float inv_alpha = 1.0;"
+"if (predivide == false || col[3] <= 0.0 || col[3] >= 1.0) {\n"
+"float inv_alpha = 1.0 / col[3];\n"
+"}\n"
+"col[0] *= inv_alpha;\n"
+"col[1] *= inv_alpha;\n"
+"col[2] *= inv_alpha;\n"
 "\n"
-"  col[0] *= inv_alpha;\n"
-"  col[1] *= inv_alpha;\n"
-"  col[2] *= inv_alpha;\n"
+"gl_FragColor = OCIODisplay(col, tex2);\n"
 "\n"
-"  gl_FragColor = OCIODisplay(col, tex2);\n"
-"}\n"
-"\n"
 "}\n";
 
 static GLuint compileShaderText(GLenum shaderType, const char *text)

___
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 [56355] trunk/blender/source/blender/ editors/space_sequencer/space_sequencer.c: Bug fix #35117

2013-04-28 Thread Ton Roosendaal
Revision: 56355
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56355
Author:   ton
Date: 2013-04-28 09:47:11 + (Sun, 28 Apr 2013)
Log Message:
---
Bug fix #35117

Sequencer: Properties region didn't have the general Sequencer keymap, so it 
didn't
respond to "Nkey" to hide the region.

Modified Paths:
--
trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c

Modified: trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c
===
--- trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c  
2013-04-28 09:16:10 UTC (rev 56354)
+++ trunk/blender/source/blender/editors/space_sequencer/space_sequencer.c  
2013-04-28 09:47:11 UTC (rev 56355)
@@ -599,9 +599,12 @@
 /* add handlers, stuff you only do once or on area/region changes */
 static void sequencer_buttons_area_init(wmWindowManager *wm, ARegion *ar)
 {
-   
+   wmKeyMap *keymap;
+
+   keymap = WM_keymap_find(wm->defaultconf, "SequencerCommon", SPACE_SEQ, 
0);
+   WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, 
&ar->winrct);
+
ED_region_panels_init(wm, ar);
-   
 }
 
 static void sequencer_buttons_area_draw(const bContext *C, ARegion *ar)

___
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 [56354] trunk/blender/source/blender/ editors/space_outliner/outliner_tree.c: Bug fix #35124

2013-04-28 Thread Ton Roosendaal
Revision: 56354
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56354
Author:   ton
Date: 2013-04-28 09:16:10 + (Sun, 28 Apr 2013)
Log Message:
---
Bug fix #35124

Outliner was drawing "Animation" category even when no actions/strips/drivers 
existed.
Would happen after adding Action and unlinking it.

Modified Paths:
--
trunk/blender/source/blender/editors/space_outliner/outliner_tree.c

Modified: trunk/blender/source/blender/editors/space_outliner/outliner_tree.c
===
--- trunk/blender/source/blender/editors/space_outliner/outliner_tree.c 
2013-04-28 06:13:24 UTC (rev 56353)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_tree.c 
2013-04-28 09:16:10 UTC (rev 56354)
@@ -403,6 +403,13 @@
 
 #undef LOG2I
 
+static int outliner_animdata_test(AnimData *adt)
+{
+   if (adt)
+   return (adt->action || adt->drivers.first || 
adt->nla_tracks.first);
+   return 0;
+}
+
 static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene 
*sce, TreeElement *te)
 {
SceneRenderLayer *srl;
@@ -424,7 +431,7 @@
}

// TODO: move this to the front?
-   if (sce->adt)
+   if (outliner_animdata_test(sce->adt))
outliner_add_element(soops, lb, sce, te, TSE_ANIM_DATA, 0);

outliner_add_element(soops,  lb, sce->world, te, 0, 0);
@@ -435,7 +442,7 @@
 {
int a = 0;

-   if (ob->adt)
+   if (outliner_animdata_test(ob->adt))
outliner_add_element(soops, &te->subtree, ob, te, 
TSE_ANIM_DATA, 0);

outliner_add_element(soops, &te->subtree, ob->poselib, te, 0, 0); // 
XXX FIXME.. add a special type for this
@@ -626,7 +633,7 @@
Mesh *me = (Mesh *)id;
int a;

-   if (me->adt)
+   if (outliner_animdata_test(me->adt))
outliner_add_element(soops, &te->subtree, me, 
te, TSE_ANIM_DATA, 0);

outliner_add_element(soops, &te->subtree, me->key, te, 
0, 0);
@@ -641,7 +648,7 @@
Curve *cu = (Curve *)id;
int a;

-   if (cu->adt)
+   if (outliner_animdata_test(cu->adt))
outliner_add_element(soops, &te->subtree, cu, 
te, TSE_ANIM_DATA, 0);

for (a = 0; a < cu->totcol; a++)
@@ -653,7 +660,7 @@
MetaBall *mb = (MetaBall *)id;
int a;

-   if (mb->adt)
+   if (outliner_animdata_test(mb->adt))
outliner_add_element(soops, &te->subtree, mb, 
te, TSE_ANIM_DATA, 0);

for (a = 0; a < mb->totcol; a++)
@@ -665,7 +672,7 @@
Material *ma = (Material *)id;
int a;

-   if (ma->adt)
+   if (outliner_animdata_test(ma->adt))
outliner_add_element(soops, &te->subtree, ma, 
te, TSE_ANIM_DATA, 0);

for (a = 0; a < MAX_MTEX; a++) {
@@ -677,7 +684,7 @@
{
Tex *tex = (Tex *)id;

-   if (tex->adt)
+   if (outliner_animdata_test(tex->adt))
outliner_add_element(soops, &te->subtree, tex, 
te, TSE_ANIM_DATA, 0);

outliner_add_element(soops, &te->subtree, tex->ima, te, 
0, 0);
@@ -687,7 +694,7 @@
{
Camera *ca = (Camera *)id;

-   if (ca->adt)
+   if (outliner_animdata_test(ca->adt))
outliner_add_element(soops, &te->subtree, ca, 
te, TSE_ANIM_DATA, 0);
}
break;
@@ -696,7 +703,7 @@
Lamp *la = (Lamp *)id;
int a;

-   if (la->adt)
+   if (outliner_animdata_test(la->adt))
outliner_add_element(soops, &te->subtree, la, 
te, TSE_ANIM_DATA, 0);

for (a = 0; a < MAX_MTEX; a++) {
@@ -708,7 +715,7 @@
{
Speaker *spk = (Speaker *)id;
 
-   if (spk->adt)
+   if (outliner_animdata_test(spk->adt))
outliner_add_element(soops, &te->subtree, spk, 
te, TSE_ANIM_DATA, 0);
}
break

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56339] trunk/blender/source/blender/ editors/interface: "Bug" & usability fix, own collection.

2013-04-27 Thread Ton Roosendaal
Revision: 56339
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56339
Author:   ton
Date: 2013-04-27 12:54:45 + (Sat, 27 Apr 2013)
Log Message:
---
"Bug" & usability fix, own collection.

Color Pickers in Blender support precision editing with holding Shift key.
Unfortunately, on first click the picker cursor moves to the mouse position,
making the precision dragging quite useless.

Now, if you hold Shift, the picker editing will only apply the delta motion
of your mouse drags, making it much nicer for fine tuning of color grades
in Sequencer or Compositor.

Modified Paths:
--
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_widgets.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-04-27 12:54:31 UTC (rev 56338)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-04-27 12:54:45 UTC (rev 56339)
@@ -3707,7 +3707,29 @@
ui_block_to_display_space_v3(but->block, rgb);
 
rgb_to_hsv_compat_v(rgb, hsv);
-
+   
+   /* only apply the delta motion, not absolute */
+   if (shift) {
+   rcti rect_i;
+   float xpos, ypos, hsvo[3];
+   
+   BLI_rcti_rctf_copy(&rect_i, &but->rect);
+   
+   /* calculate original hsv again */
+   copy_v3_v3(rgb, data->origvec);
+   if (color_profile && (int)but->a1 != UI_GRAD_SV)
+   ui_block_to_display_space_v3(but->block, rgb);
+   
+   copy_v3_v3(hsvo, ui_block_hsv_get(but->block));
+   rgb_to_hsv_compat_v(rgb, hsvo);
+   
+   /* and original position */
+   ui_hsvcube_pos_from_vals(but, &rect_i, hsvo, &xpos, &ypos);
+   
+   mx_fl = xpos - (data->dragstartx - mx_fl);
+   my_fl = ypos - (data->dragstarty - my_fl);
+   }
+   
/* relative position within box */
x = ((float)mx_fl - but->rect.xmin) / BLI_rctf_size_x(&but->rect);
y = ((float)my_fl - but->rect.ymin) / BLI_rctf_size_y(&but->rect);
@@ -3924,7 +3946,7 @@
float hsv[3];

ui_mouse_scale_warp(data, mx, my, &mx_fl, &my_fl, shift);
-
+   
 #ifdef USE_CONT_MOUSE_CORRECT
if (ui_is_a_warp_but(but)) {
/* OK but can go outside bounds */
@@ -3953,7 +3975,21 @@
if (hsv[2] == 0.f) hsv[2] = 0.0001f;
}
 
-
+   /* only apply the delta motion, not absolute */
+   if (shift) {
+   float xpos, ypos, hsvo[3];
+   
+   /* calculate original hsv again */
+   copy_v3_v3(hsvo, ui_block_hsv_get(but->block));
+   rgb_to_hsv_compat_v(data->origvec, hsvo);
+   /* and original position */
+   ui_hsvcircle_pos_from_vals(but, &rect, hsvo, &xpos, &ypos);
+   
+   mx_fl = xpos - (data->dragstartx - mx_fl);
+   my_fl = ypos - (data->dragstarty - my_fl);
+   
+   }
+   
ui_hsvcircle_vals_from_pos(hsv, hsv + 1, &rect, mx_fl, my_fl);
 
if (but->flag & UI_BUT_COLOR_CUBIC)

Modified: trunk/blender/source/blender/editors/interface/interface_intern.h
===
--- trunk/blender/source/blender/editors/interface/interface_intern.h   
2013-04-27 12:54:31 UTC (rev 56338)
+++ trunk/blender/source/blender/editors/interface/interface_intern.h   
2013-04-27 12:54:45 UTC (rev 56339)
@@ -386,6 +386,8 @@
 
 extern void ui_hsvcircle_vals_from_pos(float *val_rad, float *val_dist, const 
rcti *rect,
const float mx, const float my);
+extern void ui_hsvcircle_pos_from_vals(struct uiBut *but, const rcti *rect, 
float *hsv, float *xpos, float *ypos);
+extern void ui_hsvcube_pos_from_vals(struct uiBut *but, const rcti *rect, 
float *hsv, float *xp, float *yp);
 
 extern void ui_get_but_string_ex(uiBut *but, char *str, const size_t maxlen, 
const int float_precision);
 extern void ui_get_but_string(uiBut *but, char *str, const size_t maxlen);

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-04-27 12:54:31 UTC (rev 56338)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-04-27 12:54:45 UTC (rev 56339)
@@ -1941,19 +1941,38 @@
*val_rad = atan2f(m_delta[0], m_delta[1]) / (2.0f * (float)M_PI) + 0.5f;
 }
 
+/* cursor in hsv circle, in float units -1 to 1,

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

2013-04-19 Thread Ton Roosendaal
Revision: 56170
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56170
Author:   ton
Date: 2013-04-19 15:02:37 + (Fri, 19 Apr 2013)
Log Message:
---
UI drawing fix:

Wrongly replaced a "&" with "|" for a define. That made node headers in node 
editor
draw too dark. Also made header for default node not use alpha.

In general this drawing is not very good - it gets too transparent and dark.
Needs nicer AA function in interface, will be done later.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_draw.c
trunk/blender/source/blender/editors/space_node/node_draw.c

Modified: trunk/blender/source/blender/editors/interface/interface_draw.c
===
--- trunk/blender/source/blender/editors/interface/interface_draw.c 
2013-04-19 14:47:11 UTC (rev 56169)
+++ trunk/blender/source/blender/editors/interface/interface_draw.c 
2013-04-19 15:02:37 UTC (rev 56170)
@@ -390,7 +390,7 @@
 /* (old, used in outliner) plain antialiased filled box */
 void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad)
 {
-   ui_draw_anti_roundbox(GL_POLYGON, minx, miny, maxx, maxy, rad, 
roundboxtype | UI_RB_ALPHA);
+   ui_draw_anti_roundbox(GL_POLYGON, minx, miny, maxx, maxy, rad, 
roundboxtype & UI_RB_ALPHA);
 }
 
 /* ** SPECIAL BUTTON DRAWING FUNCTIONS * */

Modified: trunk/blender/source/blender/editors/space_node/node_draw.c
===
--- trunk/blender/source/blender/editors/space_node/node_draw.c 2013-04-19 
14:47:11 UTC (rev 56169)
+++ trunk/blender/source/blender/editors/space_node/node_draw.c 2013-04-19 
15:02:37 UTC (rev 56170)
@@ -775,9 +775,12 @@
/* shadow */
node_draw_shadow(snode, node, BASIS_RAD, 1.0f);

-   /* header */
-   if (color_id == TH_NODE)
-   UI_ThemeColorShade(color_id, -20);
+   /* header uses color from backdrop, but we make it opaqie */
+   if (color_id == TH_NODE) {
+   float col[3];
+   UI_GetThemeColorShade3fv(color_id, -20, col);
+   glColor4f(col[0], col[1], col[2], 1.0f);
+   }
else
UI_ThemeColor(color_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 [56145] trunk/blender/source/blender/ render/intern/source: Bugfix #34895

2013-04-18 Thread Ton Roosendaal
Revision: 56145
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56145
Author:   ton
Date: 2013-04-18 16:26:58 + (Thu, 18 Apr 2013)
Log Message:
---
Bugfix #34895

Error in shadowbuffer with halo effect. It had render error when you look 
straight into
the lamp, with something in front of lamp.

The code that was sampling the shadowbuffer exited too soon (for ray going 
perpendicular to buffer it should take at least 1 sample).

Code from 90ies. And still got a bug fix. Whoa :)

Modified Paths:
--
trunk/blender/source/blender/render/intern/source/shadbuf.c
trunk/blender/source/blender/render/intern/source/shadeoutput.c

Modified: trunk/blender/source/blender/render/intern/source/shadbuf.c
===
--- trunk/blender/source/blender/render/intern/source/shadbuf.c 2013-04-18 
15:26:22 UTC (rev 56144)
+++ trunk/blender/source/blender/render/intern/source/shadbuf.c 2013-04-18 
16:26:58 UTC (rev 56145)
@@ -1394,7 +1394,6 @@
}

lambda = min_ff(lambda_x, lambda_y);
-   if (lambda==lambda_o || lambda>=1.0f) break;

zf= zf1 + lambda*(zf2-zf1);
count+= (float)shb->totbuf;
@@ -1410,6 +1409,8 @@
lightcount+= readshadowbuf_halo(shb, shsample, 
x, y, z);

}
+   /* break after sample, so it takes at least one */
+   if (lambda==lambda_o || lambda>=1.0f) break;
}

if (count!=0.0f) return (lightcount/count);

Modified: trunk/blender/source/blender/render/intern/source/shadeoutput.c
===
--- trunk/blender/source/blender/render/intern/source/shadeoutput.c 
2013-04-18 15:26:22 UTC (rev 56144)
+++ trunk/blender/source/blender/render/intern/source/shadeoutput.c 
2013-04-18 16:26:58 UTC (rev 56145)
@@ -181,7 +181,7 @@
double a, b, c, disc, nray[3], npos[3];
double t0, t1 = 0.0f, t2= 0.0f, t3;
float p1[3], p2[3], ladist, maxz = 0.0f, maxy = 0.0f, haint;
-   int snijp, do_clip = TRUE, use_yco = FALSE;
+   int cuts, do_clip = TRUE, use_yco = FALSE;
 
*intens= 0.0f;
haint= lar->haint;
@@ -244,7 +244,7 @@
b = nray[0] * npos[0] + nray[1] * npos[1] - nray[2]*npos[2];
c = npos[0] * npos[0] + npos[1] * npos[1] - npos[2]*npos[2];
 
-   snijp= 0;
+   cuts= 0;
if (fabs(a) < DBL_EPSILON) {
/*
 * Only one intersection point...
@@ -256,16 +256,16 @@

if (disc==0.0) {
t1=t2= (-b)/ a;
-   snijp= 2;
+   cuts= 2;
}
else if (disc > 0.0) {
disc = sqrt(disc);
t1 = (-b + disc) / a;
t2 = (-b - disc) / a;
-   snijp= 2;
+   cuts= 2;
}
}
-   if (snijp==2) {
+   if (cuts==2) {
int ok1=0, ok2=0;
 
/* sort */

___
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 [56142] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: Bug fix #34822

2013-04-18 Thread Ton Roosendaal
Revision: 56142
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56142
Author:   ton
Date: 2013-04-18 14:55:04 + (Thu, 18 Apr 2013)
Log Message:
---
Bug fix #34822

Tiny tweak in "Any key modifier" code. It now refuses to accept events when you 
hold
any key, and then press another key - unless that has key-modifier set.

This enables Houdini style "Hold Spacebar - Leftmouse" view moves.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-04-18 13:30:41 UTC (rev 56141)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c 
2013-04-18 14:55:04 UTC (rev 56142)
@@ -1370,9 +1370,10 @@
if (kmi->oskey != KM_ANY)
if (winevent->oskey != kmi->oskey && !(winevent->oskey & 
kmi->oskey)) return 0;

-   if (kmi->keymodifier)
+   /* key modifiers always check when event has it */
+   /* otherwise regular keypresses with keymodifier still work */
+   if (winevent->keymodifier || kmi->keymodifier)
if (winevent->keymodifier != kmi->keymodifier) return 0;
-   

return 1;
 }

___
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 [56134] trunk/blender/source/blender/ render/intern/source/convertblender.c: Bug fix #35017

2013-04-18 Thread Ton Roosendaal
Revision: 56134
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56134
Author:   ton
Date: 2013-04-18 11:44:00 + (Thu, 18 Apr 2013)
Log Message:
---
Bug fix #35017

Blender Render: setting alpha to zero for ray-transp material with refraction 
did not
render. Was optimized away.

Modified Paths:
--
trunk/blender/source/blender/render/intern/source/convertblender.c

Modified: trunk/blender/source/blender/render/intern/source/convertblender.c
===
--- trunk/blender/source/blender/render/intern/source/convertblender.c  
2013-04-18 11:36:11 UTC (rev 56133)
+++ trunk/blender/source/blender/render/intern/source/convertblender.c  
2013-04-18 11:44:00 UTC (rev 56134)
@@ -3470,7 +3470,7 @@

/* test for 100% transparent */
ok= 1;
-   if (ma->alpha==0.0f && ma->spectra==0.0f && 
ma->filter==0.0f && (ma->mode & MA_TRANSP) && (ma->mode & MA_RAYMIRROR)==0) {
+   if (ma->alpha==0.0f && ma->spectra==0.0f && 
ma->spectra==0.0f && ma->filter==0.0f && (ma->mode & MA_TRANSP) && (ma->mode & 
(MA_RAYTRANSP | MA_RAYMIRROR))==0 ) {
ok= 0;
/* texture on transparency? */
for (a=0; ahttp://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56130] trunk/blender/source/blender/ editors/interface/view2d.c: View2D could potentially divide stuff by zero, giving bad matrices.

2013-04-18 Thread Ton Roosendaal
Revision: 56130
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56130
Author:   ton
Date: 2013-04-18 10:22:42 + (Thu, 18 Apr 2013)
Log Message:
---
View2D could potentially divide stuff by zero, giving bad matrices.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/view2d.c

Modified: trunk/blender/source/blender/editors/interface/view2d.c
===
--- trunk/blender/source/blender/editors/interface/view2d.c 2013-04-18 
10:10:58 UTC (rev 56129)
+++ trunk/blender/source/blender/editors/interface/view2d.c 2013-04-18 
10:22:42 UTC (rev 56130)
@@ -1022,15 +1022,19 @@
 void UI_view2d_view_ortho(View2D *v2d)
 {
rctf curmasked;
-   float xofs, yofs;
+   int sizex = BLI_rcti_size_x(&v2d->mask);
+   int sizey = BLI_rcti_size_y(&v2d->mask);
+   float xofs = 0.0f, yofs = 0.0f;

/* pixel offsets (-GLA_PIXEL_OFS) are needed to get 1:1 correspondence 
with pixels for smooth UI drawing,
 * but only applied where requested
 */
/* XXX brecht: instead of zero at least use a tiny offset, otherwise
 * pixel rounding is effectively random due to float inaccuracy */
-   xofs = 0.001f * BLI_rctf_size_x(&v2d->cur) / 
BLI_rcti_size_x(&v2d->mask);
-   yofs = 0.001f * BLI_rctf_size_y(&v2d->cur) / 
BLI_rcti_size_y(&v2d->mask);
+   if (sizex > 0)
+   xofs = 0.001f * BLI_rctf_size_x(&v2d->cur) / 
BLI_rcti_size_x(&v2d->mask);
+   if (sizey > 0)
+   yofs = 0.001f * BLI_rctf_size_y(&v2d->cur) / 
BLI_rcti_size_y(&v2d->mask);

/* apply mask-based adjustments to cur rect (due to scrollers), to 
eliminate scaling artifacts */
view2d_map_cur_using_mask(v2d, &curmasked);

___
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 [56129] trunk/blender/source/blender/ editors/interface/view2d.c: Bug fix #34943

2013-04-18 Thread Ton Roosendaal
Revision: 56129
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56129
Author:   ton
Date: 2013-04-18 10:10:58 + (Thu, 18 Apr 2013)
Log Message:
---
Bug fix #34943

With extreme narrow scaled editors, the slider/mask code in View3d could deliver
zero sized or invalid window matrices.

Needs confirmation from Sergey if it works :)

Modified Paths:
--
trunk/blender/source/blender/editors/interface/view2d.c

Modified: trunk/blender/source/blender/editors/interface/view2d.c
===
--- trunk/blender/source/blender/editors/interface/view2d.c 2013-04-18 
09:12:06 UTC (rev 56128)
+++ trunk/blender/source/blender/editors/interface/view2d.c 2013-04-18 
10:10:58 UTC (rev 56129)
@@ -997,19 +997,24 @@
*curmasked = v2d->cur;

if (view2d_scroll_mapped(v2d->scroll)) {
-   float dx = BLI_rctf_size_x(&v2d->cur) / 
((float)(BLI_rcti_size_x(&v2d->mask) + 1));
-   float dy = BLI_rctf_size_y(&v2d->cur) / 
((float)(BLI_rcti_size_y(&v2d->mask) + 1));
+   float sizex = BLI_rcti_size_x(&v2d->mask);
+   float sizey = BLI_rcti_size_y(&v2d->mask);

-   if (v2d->mask.xmin != 0)
-   curmasked->xmin -= dx * (float)v2d->mask.xmin;
-   if (v2d->mask.xmax + 1 != v2d->winx)
-   curmasked->xmax += dx * (float)(v2d->winx - 
v2d->mask.xmax - 1);
-   
-   if (v2d->mask.ymin != 0)
-   curmasked->ymin -= dy * (float)v2d->mask.ymin;
-   if (v2d->mask.ymax + 1 != v2d->winy)
-   curmasked->ymax += dy * (float)(v2d->winy - 
v2d->mask.ymax - 1);
-   
+   /* prevent tiny or narrow regions to get invalid coordinates - 
mask can get negative even... */
+   if (sizex > 0.0f && sizey > 0.0f) {
+   float dx = BLI_rctf_size_x(&v2d->cur) / (sizex + 1);
+   float dy = BLI_rctf_size_y(&v2d->cur) / (sizey + 1);
+   
+   if (v2d->mask.xmin != 0)
+   curmasked->xmin -= dx * (float)v2d->mask.xmin;
+   if (v2d->mask.xmax + 1 != v2d->winx)
+   curmasked->xmax += dx * (float)(v2d->winx - 
v2d->mask.xmax - 1);
+   
+   if (v2d->mask.ymin != 0)
+   curmasked->ymin -= dy * (float)v2d->mask.ymin;
+   if (v2d->mask.ymax + 1 != v2d->winy)
+   curmasked->ymax += dy * (float)(v2d->winy - 
v2d->mask.ymax - 1);
+   }
}
 }
 

___
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 [56126] trunk/blender/source/blender/ editors/interface: Bug fix #34868

2013-04-18 Thread Ton Roosendaal
Revision: 56126
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56126
Author:   ton
Date: 2013-04-18 08:51:07 + (Thu, 18 Apr 2013)
Log Message:
---
Bug fix #34868

Pulldown menus with long shortcut text labels got clipped badly occasionally.
Made the offset follow DPI better.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_style.c
trunk/blender/source/blender/editors/interface/interface_widgets.c

Modified: trunk/blender/source/blender/editors/interface/interface_style.c
===
--- trunk/blender/source/blender/editors/interface/interface_style.c
2013-04-18 04:24:18 UTC (rev 56125)
+++ trunk/blender/source/blender/editors/interface/interface_style.c
2013-04-18 08:51:07 UTC (rev 56126)
@@ -162,7 +162,7 @@
}
}
else if (fs->align == UI_STYLE_TEXT_RIGHT) {
-   xofs = BLI_rcti_size_x(rect) - BLF_width(fs->uifont_id, str) - 
1;
+   xofs = BLI_rcti_size_x(rect) - BLF_width(fs->uifont_id, str) - 
0.1f * U.widget_unit;
}

/* clip is very strict, so we give it some space */

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-04-18 04:24:18 UTC (rev 56125)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-04-18 08:51:07 UTC (rev 56126)
@@ -1265,7 +1265,7 @@
/* part text right aligned */
if (cpoin) {
fstyle->align = UI_STYLE_TEXT_RIGHT;
-   rect->xmax -= ui_but_draw_menu_icon(but) ? UI_DPI_ICON_SIZE : 5;
+   rect->xmax -= ui_but_draw_menu_icon(but) ? UI_DPI_ICON_SIZE : 
0.25f * U.widget_unit;
uiStyleFontDraw(fstyle, rect, cpoin + 1);
*cpoin = '|';
}

___
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 [56110] trunk/blender/source/blender/ editors/interface/interface_draw.c: Bug fix #34974

2013-04-17 Thread Ton Roosendaal
Revision: 56110
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56110
Author:   ton
Date: 2013-04-17 13:40:00 + (Wed, 17 Apr 2013)
Log Message:
---
Bug fix #34974

The open region indicator (with +) didn't do alpha blending properly, so it 
wasn't
visible for any theme color.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_draw.c

Modified: trunk/blender/source/blender/editors/interface/interface_draw.c
===
--- trunk/blender/source/blender/editors/interface/interface_draw.c 
2013-04-17 11:33:22 UTC (rev 56109)
+++ trunk/blender/source/blender/editors/interface/interface_draw.c 
2013-04-17 13:40:00 UTC (rev 56110)
@@ -390,7 +390,7 @@
 /* (old, used in outliner) plain antialiased filled box */
 void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad)
 {
-   ui_draw_anti_roundbox(GL_POLYGON, minx, miny, maxx, maxy, rad, 
roundboxtype & UI_RB_ALPHA);
+   ui_draw_anti_roundbox(GL_POLYGON, minx, miny, maxx, maxy, rad, 
roundboxtype | UI_RB_ALPHA);
 }
 
 /* ** SPECIAL BUTTON DRAWING FUNCTIONS * */

___
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 [56099] trunk/blender/source/blender: Blender Internal Render in viewport

2013-04-16 Thread Ton Roosendaal
Revision: 56099
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56099
Author:   ton
Date: 2013-04-16 17:39:20 + (Tue, 16 Apr 2013)
Log Message:
---
Blender Internal Render in viewport

Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.

When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)

- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
  works for non-raytrace scenes, or zoom in ortho or camera mode, or for 
  Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
  re-render yet.

Tech notes:

- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.

- Fixed some bugs that were noticable with such excessive re-renders, like 
  for opening file window, quit during renders.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/depsgraph.c
trunk/blender/source/blender/blenlib/BLI_math_matrix.h
trunk/blender/source/blender/blenlib/intern/math_matrix.c
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/editors/include/ED_render.h
trunk/blender/source/blender/editors/render/render_intern.h
trunk/blender/source/blender/editors/render/render_internal.c
trunk/blender/source/blender/editors/render/render_preview.c
trunk/blender/source/blender/editors/render/render_update.c
trunk/blender/source/blender/editors/space_api/spacetypes.c
trunk/blender/source/blender/editors/space_view3d/view3d_view.c

trunk/blender/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
trunk/blender/source/blender/render/extern/include/RE_engine.h
trunk/blender/source/blender/render/extern/include/RE_pipeline.h
trunk/blender/source/blender/render/intern/include/envmap.h
trunk/blender/source/blender/render/intern/include/initrender.h
trunk/blender/source/blender/render/intern/include/render_types.h
trunk/blender/source/blender/render/intern/source/convertblender.c
trunk/blender/source/blender/render/intern/source/envmap.c
trunk/blender/source/blender/render/intern/source/external_engine.c
trunk/blender/source/blender/render/intern/source/pipeline.c
trunk/blender/source/blender/render/intern/source/render_result.c
trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c

Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c  2013-04-16 
17:12:04 UTC (rev 56098)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c  2013-04-16 
17:39:20 UTC (rev 56099)
@@ -2341,7 +2341,8 @@
 
/* we tag based on first ID type character to avoid 
 * looping over all ID's in case there are no tags */
-   if (id && bmain->id_tag_update[id->name[0]]) {
+   /* XXX very weak... added check for '27' to ignore freestyle 
added objects */
+   if (id && id->name[2] > 27 && 
bmain->id_tag_update[id->name[0]]) {
updated = 1;
break;
}

Modified: trunk/blender/source/blender/blenlib/BLI_math_matrix.h
===
--- trunk/blender/source/blender/blenlib/BLI_math_matrix.h  2013-04-16 
17:12:04 UTC (rev 56098)
+++ trunk/blender/source/blender/blenlib/BLI_math_matrix.h  2013-04-16 
17:39:20 UTC (rev 56099)
@@ -122,6 +122,8 @@
 void transpose_m3(float R[3][3]);
 void transpose_m4(float R[4][4]);
 
+int compare_m4m4(float mat1[4][4], float mat2[4][4], float limit);
+
 void normalize_m3(float R[3][3]);
 void normalize_m3_m3(float R[3][3], float A[3][3]);
 void normalize_m4(float R[4][4]);

Modified: trunk/blender/source/blender/blenlib/intern/math_matrix.c
===
--- trunk/blender/source/blender/blenlib/intern/math_matrix.c   2013-04-16 
17:12:04 UTC (rev 56098)
+++ trunk/blender/source/blender/blenlib/intern/math_matrix.c   2013-04-16 
17:39:20 UTC (rev 56099)
@@ -722,6 +722,16 @@
mat[3][2] = t;
 }
 
+int compare_m4m4(float mat1[4][4], float mat2[4][4], f

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56011] trunk/blender/source/blender/ editors/render/render_view.c: Usability fix, own collection.

2013-04-13 Thread Ton Roosendaal
Revision: 56011
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56011
Author:   ton
Date: 2013-04-13 15:14:34 + (Sat, 13 Apr 2013)
Log Message:
---
Usability fix, own collection.

If you have two windows, each with different scene, the render output for a 
window
would go to the other, if it was already drawing a render for the other scene.

Now you can have renders draw correct in two windows for two scenes.

Modified Paths:
--
trunk/blender/source/blender/editors/render/render_view.c

Modified: trunk/blender/source/blender/editors/render/render_view.c
===
--- trunk/blender/source/blender/editors/render/render_view.c   2013-04-13 
14:57:08 UTC (rev 56010)
+++ trunk/blender/source/blender/editors/render/render_view.c   2013-04-13 
15:14:34 UTC (rev 56011)
@@ -87,7 +87,7 @@
return big;
 }
 
-static ScrArea *find_area_showing_r_result(bContext *C, wmWindow **win)
+static ScrArea *find_area_showing_r_result(bContext *C, Scene *scene, wmWindow 
**win)
 {
wmWindowManager *wm = CTX_wm_manager(C);
ScrArea *sa = NULL;
@@ -95,15 +95,17 @@
 
/* find an imagewindow showing render result */
for (*win = wm->windows.first; *win; *win = (*win)->next) {
-   for (sa = (*win)->screen->areabase.first; sa; sa = sa->next) {
-   if (sa->spacetype == SPACE_IMAGE) {
-   sima = sa->spacedata.first;
-   if (sima->image && sima->image->type == 
IMA_TYPE_R_RESULT)
-   break;
+   if ((*win)->screen->scene == scene) {
+   for (sa = (*win)->screen->areabase.first; sa; sa = 
sa->next) {
+   if (sa->spacetype == SPACE_IMAGE) {
+   sima = sa->spacedata.first;
+   if (sima->image && sima->image->type == 
IMA_TYPE_R_RESULT)
+   break;
+   }
}
+   if (sa)
+   break;
}
-   if (sa)
-   break;
}

return sa;
@@ -173,7 +175,7 @@
}
 
if (!sa) {
-   sa = find_area_showing_r_result(C, &win);
+   sa = find_area_showing_r_result(C, scene, &win);
if (sa == NULL)
sa = find_area_image_empty(C);

@@ -285,9 +287,9 @@
}
else {
wmWindow *win, *winshow;
-   ScrArea *sa = find_area_showing_r_result(C, &winshow);
+   ScrArea *sa = find_area_showing_r_result(C, CTX_data_scene(C), 
&winshow);

-   /* is there another window showing result? */
+   /* is there another window on current scene showing result? */
for (win = CTX_wm_manager(C)->windows.first; win; win = 
win->next) {
bScreen *sc = win->screen;
if ((sc->temp && ((ScrArea 
*)sc->areabase.first)->spacetype == SPACE_IMAGE) ||

___
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 [56009] trunk/blender/source/creator/ creator.c: Accidentally left in test function.

2013-04-13 Thread Ton Roosendaal
Revision: 56009
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56009
Author:   ton
Date: 2013-04-13 14:15:16 + (Sat, 13 Apr 2013)
Log Message:
---
Accidentally left in test function. All's fine now!

Modified Paths:
--
trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/creator/creator.c
===
--- trunk/blender/source/creator/creator.c  2013-04-13 14:05:31 UTC (rev 
56008)
+++ trunk/blender/source/creator/creator.c  2013-04-13 14:15:16 UTC (rev 
56009)
@@ -1196,14 +1196,6 @@
}
 }
 
-#if 0
-static int test_file(int UNUSED(argc), const char **argv, void *UNUSED(data))
-{
-   printf("path is %s\n", argv[0]);
-   return 1;
-}
-#endif
-
 static int load_file(int UNUSED(argc), const char **argv, void *data)
 {
bContext *C = data;

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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56006] trunk/blender/source: Bug fix #34896

2013-04-13 Thread Ton Roosendaal
Revision: 56006
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56006
Author:   ton
Date: 2013-04-13 12:03:20 + (Sat, 13 Apr 2013)
Log Message:
---
Bug fix #34896

The feature "Keep Session" was also loading that session when you double-click
on a .blend to open it, or when a .blend file was on commandline.

Moved this feature to the main() in creator.c, so it can check on it properly, 
skipping the
kept session when a file was loaded.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/WM_api.h
trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
trunk/blender/source/blender/windowmanager/intern/wm_operators.c
trunk/blender/source/blender/windowmanager/wm_event_system.h
trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/blender/windowmanager/WM_api.h
===
--- trunk/blender/source/blender/windowmanager/WM_api.h 2013-04-13 09:32:27 UTC 
(rev 56005)
+++ trunk/blender/source/blender/windowmanager/WM_api.h 2013-04-13 12:03:20 UTC 
(rev 56006)
@@ -113,6 +113,7 @@
/* files */
 void   WM_file_read(struct bContext *C, const char *filepath, struct 
ReportList *reports);
 void   WM_autosave_init(struct wmWindowManager *wm);
+void   WM_recover_last_session(struct bContext *C, struct ReportList 
*reports);
 
/* mouse cursors */
 void   WM_cursor_set   (struct wmWindow *win, int curs);

Modified: trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
2013-04-13 09:32:27 UTC (rev 56005)
+++ trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c
2013-04-13 12:03:20 UTC (rev 56006)
@@ -223,7 +223,8 @@

/* load last session, uses regular file reading so it has to be in end 
(after init py etc) */
if (U.uiflag2 & USER_KEEP_SESSION) {
-   wm_recover_last_session(C, NULL);
+   /* calling WM_recover_last_session(C, NULL) has been moved to 
creator.c */
+   /* that prevents loading both the kept session, and the file on 
the command line */
}
else {
/* normally 'wm_homefile_read' will do this,

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2013-04-13 09:32:27 UTC (rev 56005)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2013-04-13 12:03:20 UTC (rev 56006)
@@ -2237,7 +2237,7 @@
 
 /* *** recover last session  */
 
-void wm_recover_last_session(bContext *C, ReportList *reports)
+void WM_recover_last_session(bContext *C, ReportList *reports)
 {
char filename[FILE_MAX];

@@ -2268,7 +2268,7 @@
 
 static int wm_recover_last_session_exec(bContext *C, wmOperator *op)
 {
-   wm_recover_last_session(C, op->reports);
+   WM_recover_last_session(C, op->reports);
return OPERATOR_FINISHED;
 }
 

Modified: trunk/blender/source/blender/windowmanager/wm_event_system.h
===
--- trunk/blender/source/blender/windowmanager/wm_event_system.h
2013-04-13 09:32:27 UTC (rev 56005)
+++ trunk/blender/source/blender/windowmanager/wm_event_system.h
2013-04-13 12:03:20 UTC (rev 56006)
@@ -104,8 +104,5 @@
 voidwm_drags_check_ops(bContext *C, wmEvent *event);
 voidwm_drags_draw(bContext *C, wmWindow *win, rcti *rect);
 
-/* wm_operators.c */
-void   wm_recover_last_session(bContext *C, ReportList *reports);
-
 #endif /* __WM_EVENT_SYSTEM_H__ */
 

Modified: trunk/blender/source/creator/creator.c
===
--- trunk/blender/source/creator/creator.c  2013-04-13 09:32:27 UTC (rev 
56005)
+++ trunk/blender/source/creator/creator.c  2013-04-13 12:03:20 UTC (rev 
56006)
@@ -1196,6 +1196,11 @@
}
 }
 
+static int test_file(int UNUSED(argc), const char **argv, void *data)
+{
+   printf("path is %s\n", argv[0]);
+}
+
 static int load_file(int UNUSED(argc), const char **argv, void *data)
 {
bContext *C = data;
@@ -1604,6 +1609,13 @@
/* OK we are ready for it */
 #ifndef WITH_PYTHON_MODULE
BLI_argsParse(ba, 4, load_file, C);
+   
+   if (G.background == 0) {
+   if (!G.file_loaded)
+   if (U.uiflag2 & USER_KEEP_SESSION)
+   WM_recover_last_session(C, NULL);
+   }
+
 #endif
 
 #ifndef WITH_PYTHON_MODULE

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.bl

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55988] trunk/blender/source/blender/ editors: Adding scrollbar default to Python console and Python Info log.

2013-04-12 Thread Ton Roosendaal
Revision: 55988
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55988
Author:   ton
Date: 2013-04-12 12:30:05 + (Fri, 12 Apr 2013)
Log Message:
---
Adding scrollbar default to Python console and Python Info log.

Modified Paths:
--
trunk/blender/source/blender/editors/space_console/space_console.c
trunk/blender/source/blender/editors/space_info/space_info.c

Modified: trunk/blender/source/blender/editors/space_console/space_console.c
===
--- trunk/blender/source/blender/editors/space_console/space_console.c  
2013-04-12 12:19:50 UTC (rev 55987)
+++ trunk/blender/source/blender/editors/space_console/space_console.c  
2013-04-12 12:30:05 UTC (rev 55988)
@@ -138,6 +138,9 @@
 
const float prev_y_min = ar->v2d.cur.ymin; /* so re-sizing keeps the 
cursor visible */
 
+   /* force it on init, for old files, until it becomes config */
+   ar->v2d.scroll = (V2D_SCROLL_RIGHT);
+
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, 
ar->winy);
 
/* always keep the bottom part of the view aligned, less annoying */

Modified: trunk/blender/source/blender/editors/space_info/space_info.c
===
--- trunk/blender/source/blender/editors/space_info/space_info.c
2013-04-12 12:19:50 UTC (rev 55987)
+++ trunk/blender/source/blender/editors/space_info/space_info.c
2013-04-12 12:30:05 UTC (rev 55988)
@@ -129,6 +129,9 @@
 {
wmKeyMap *keymap;
 
+   /* force it on init, for old files, until it becomes config */
+   ar->v2d.scroll = (V2D_SCROLL_RIGHT);
+   
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, 
ar->winy);
 
/* own keymap */

___
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 [55823] trunk/blender/source/blender/ editors/util/undo.c: Bug fix #34866

2013-04-05 Thread Ton Roosendaal
Revision: 55823
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55823
Author:   ton
Date: 2013-04-05 17:10:28 + (Fri, 05 Apr 2013)
Log Message:
---
Bug fix #34866

Global undo/redo now clears the local undo editmode stack entirely.

Error goes back to the 2.3 days, when undo was added.

Global undo refreshes the entire internal database, so all ID pointers get 
invalid.
This cases editmode undo storage to fail, if it uses ID pointers as well.

The error was that for any Mesh undo stack, a single global undo would make the
mesh stack corrupt. Back in edit mode, on undo you'd lose assigned texture 
images, 
or get bad crashes.

The downside is that people expect this to work... it's a fun feature to 
maintain
stacks separately. Having this instable is not acceptable though. Needs quite 
some
redesign work to solve it (like Dalai's kill-the-tface project :)

Modified Paths:
--
trunk/blender/source/blender/editors/util/undo.c

Modified: trunk/blender/source/blender/editors/util/undo.c
===
--- trunk/blender/source/blender/editors/util/undo.c2013-04-05 17:03:59 UTC 
(rev 55822)
+++ trunk/blender/source/blender/editors/util/undo.c2013-04-05 17:10:28 UTC 
(rev 55823)
@@ -186,6 +186,11 @@
//#ifdef WITH_PYTHON
// XXX  BPY_scripts_clear_pyobjects();
//#endif
+   
+   /* for global undo/redo we should just clear the 
editmode stack */
+   /* for example, texface stores image pointers */
+   undo_editmode_clear();
+   
if (undoname)
BKE_undo_name(C, undoname);
else

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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55783] trunk/blender: Two small fixes:

2013-04-04 Thread Ton Roosendaal
Revision: 55783
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55783
Author:   ton
Date: 2013-04-04 15:10:52 + (Thu, 04 Apr 2013)
Log Message:
---
Two small fixes:

- "Add node" was showing on wrong location when used via pulldown menus.
  Now this option will put the nodes in center of the view.

- The Curves widget was making itself smaller/bigger based on width of region.
  That messes up the layout engine now - especially the code that checks if
  there's a scroller needed or not (it went into an eternal feedback loop).

  Now this widget has fixed height (like the other larger widgets).

  Better would be to allow such large widgets to be scaled vertically 
individually.
  That's for the todo!

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_operators/node.py
trunk/blender/source/blender/editors/interface/interface_templates.c
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/release/scripts/startup/bl_operators/node.py
===
--- trunk/blender/release/scripts/startup/bl_operators/node.py  2013-04-04 
14:07:10 UTC (rev 55782)
+++ trunk/blender/release/scripts/startup/bl_operators/node.py  2013-04-04 
15:10:52 UTC (rev 55783)
@@ -29,10 +29,14 @@
 def store_mouse_cursor(context, event):
 space = context.space_data
 v2d = context.region.view2d
+tree = space.edit_tree
 
 # convert mouse position to the View2D for later node placement
-space.cursor_location = v2d.region_to_view(event.mouse_region_x,
+if context.region.type == 'WINDOW':
+space.cursor_location = v2d.region_to_view(event.mouse_region_x,
event.mouse_region_y)
+else:
+space.cursor_location = tree.view_center
 
 def create_node(self, context, node_type):
 space = context.space_data

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===
--- trunk/blender/source/blender/editors/interface/interface_templates.c
2013-04-04 14:07:10 UTC (rev 55782)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c
2013-04-04 15:10:52 UTC (rev 55783)
@@ -2119,7 +2119,7 @@
/* curve itself */
size = uiLayoutGetWidth(layout);
row = uiLayoutRow(layout, FALSE);
-   uiDefBut(block, BUT_CURVE, 0, "", 0, 0, size, MIN2(size, 10.0f * 
UI_UNIT_X), cumap, 0.0f, 1.0f, bg, 0, "");
+   uiDefBut(block, BUT_CURVE, 0, "", 0, 0, size, 8.0f * UI_UNIT_X, cumap, 
0.0f, 1.0f, bg, 0, "");
 
/* sliders for selected point */
for (i = 0; i < cm->totpoint; i++) {

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2013-04-04 
14:07:10 UTC (rev 55782)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2013-04-04 
15:10:52 UTC (rev 55783)
@@ -6872,6 +6872,11 @@
RNA_def_struct_refine_func(srna, "rna_NodeTree_refine");
RNA_def_struct_register_funcs(srna, "rna_NodeTree_register", 
"rna_NodeTree_unregister", NULL);
 
+   prop = RNA_def_property(srna, "view_center", PROP_FLOAT, PROP_XYZ);
+   RNA_def_property_array(prop, 2);
+   RNA_def_property_float_sdna(prop, NULL, "view_center");
+   RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+   
/* AnimData */
rna_def_animdata_common(srna);
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_space.c2013-04-04 
14:07:10 UTC (rev 55782)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c2013-04-04 
15:10:52 UTC (rev 55783)
@@ -3356,7 +3356,8 @@
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL);
 
/* the mx/my "cursor" in the node editor is used only by operators to 
store the mouse position */
-   prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_NONE);
+   prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
+   RNA_def_property_array(prop, 2);
RNA_def_property_float_sdna(prop, NULL, "cursor");
RNA_def_property_ui_text(prop, "Cursor Location", "Location for adding 
new nodes");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, 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 [55731] trunk/blender/source/blender: More Histogram fixes:

2013-04-02 Thread Ton Roosendaal
Revision: 55731
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55731
Author:   ton
Date: 2013-04-02 17:12:21 + (Tue, 02 Apr 2013)
Log Message:
---
More Histogram fixes:

Sequencer histogram was calculating still badly, now it uses a per-color
component counter to calculate the levels (instead of counter for all)

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

Modified: trunk/blender/source/blender/blenkernel/intern/colortools.c
===
--- trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-04-02 
16:51:23 UTC (rev 55730)
+++ trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-04-02 
17:12:21 UTC (rev 55731)
@@ -1092,10 +1092,7 @@
if (is_float)
rf = ibuf->rect_float;
else {
-   if (view_settings)
-   rc = (unsigned char *)IMB_display_buffer_acquire(ibuf, 
view_settings, display_settings, &cache_handle);
-   else
-   rc = (unsigned char *)ibuf->rect;
+   rc = (unsigned char *)IMB_display_buffer_acquire(ibuf, 
view_settings, display_settings, &cache_handle);
}

if (ibuf->rect_float)
@@ -1178,11 +1175,12 @@
if (bin_b[x]   > nb) nb = bin_b[x];
if (bin_a[x]   > na) na = bin_a[x];
}
-   divl = 1.0 / (double)nl;
-   diva = 1.0 / (double)na;
-   divr = 1.0 / (double)nr;
-   divg = 1.0 / (double)ng;
-   divb = 1.0 / (double)nb;
+   divl = nl ? 1.0 / (double)nl : 1.0;
+   diva = na ? 1.0 / (double)na : 1.0;
+   divr = nr ? 1.0 / (double)nr : 1.0;
+   divg = ng ? 1.0 / (double)ng : 1.0;
+   divb = nb ? 1.0 / (double)nb : 1.0;
+   
for (x = 0; x < 256; x++) {
scopes->hist.data_luma[x] = bin_lum[x] * divl;
scopes->hist.data_r[x] = bin_r[x] * divr;

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2013-04-02 16:51:23 UTC (rev 55730)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2013-04-02 17:12:21 UTC (rev 55731)
@@ -896,7 +896,7 @@
 {
ImBuf *display_ibuf = IMB_dupImBuf(ibuf);
ImBuf *scope;
-
+   
IMB_colormanagement_imbuf_make_display_space(display_ibuf, 
&scene->view_settings,
 
&scene->display_settings);
 

Modified: 
trunk/blender/source/blender/editors/space_sequencer/sequencer_scopes.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_scopes.c 
2013-04-02 16:51:23 UTC (rev 55730)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_scopes.c 
2013-04-02 17:12:21 UTC (rev 55731)
@@ -531,7 +531,7 @@
 static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf)
 {
ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect);
-   int n, c, x, y;
+   int nr, ng, nb, x, y;
float *src = ibuf->rect_float;
 
unsigned int bins[3][HIS_STEPS];
@@ -563,23 +563,30 @@
}
}
 
-   draw_histogram_marker(rval, get_bin_float(0.0));
-   draw_histogram_marker(rval, get_bin_float(1.0));
-
-   n = 0;
-   for (c = 0; c < 3; c++) {
-   for (x = 0; x < HIS_STEPS; x++) {
-   if (bins[c][x] > n) {
-   n = bins[c][x];
-   }
-   }
+   nr = nb = ng = 0;
+   for (x = 0; x < HIS_STEPS; x++) {
+   if (bins[0][x] > nr)
+   nr = bins[0][x];
+   if (bins[1][x] > ng)
+   ng = bins[1][x];
+   if (bins[2][x] > nb)
+   nb = bins[2][x];
}
-   for (c = 0; c < 3; c++) {
-   for (x = 0; x < HIS_STEPS; x++) {
-   draw_histogram_bar(rval, x + 1, (float) bins[c][x] / n, 
c);
+   
+   for (x = 0; x < HIS_STEPS; x++) {
+   if (nr) {
+   draw_histogram_bar(rval, x + 1, ((float) bins[0][x]) / 
nr, 0);
}
+   if (ng) {
+   draw_histogram_bar(rval, x + 1, ((float) bins[1][x]) / 
ng, 1);
+   }
+   if (nb) {
+   draw_histogram_bar(rval, x + 1, ((float) bins[2][x]) / 
nb, 2);
+   }
}
-
+   
+   draw_histogram_marker(rval, get_bin_float(0.0));
+   draw_histogram_marker(rval, get_bin_float(1.0));
wform_put_border((unsig

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55722] trunk/blender/source/blender/ blenkernel/intern/colortools.c: Removed leftover debug print.

2013-04-02 Thread Ton Roosendaal
Revision: 55722
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55722
Author:   ton
Date: 2013-04-02 13:15:12 + (Tue, 02 Apr 2013)
Log Message:
---
Removed leftover debug print.

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

Modified: trunk/blender/source/blender/blenkernel/intern/colortools.c
===
--- trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-04-02 
13:07:01 UTC (rev 55721)
+++ trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-04-02 
13:15:12 UTC (rev 55722)
@@ -1101,7 +1101,6 @@
if (ibuf->rect_float)
cm_processor = 
IMB_colormanagement_display_processor_new(view_settings, display_settings);
 
-   printf("update %p\n", cm_processor);
for (y = 0; y < ibuf->y; y++) {
if (savedlines < scopes->sample_lines && y >= ((savedlines) * 
ibuf->y) / (scopes->sample_lines + 1)) {
saveline = 1;

___
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 [55720] trunk/blender/source/blender/ editors/util/CMakeLists.txt: Missing GLEW path in CMake, fixes compile error in OS X.

2013-04-02 Thread Ton Roosendaal
Revision: 55720
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55720
Author:   ton
Date: 2013-04-02 12:54:47 + (Tue, 02 Apr 2013)
Log Message:
---
Missing GLEW path in CMake, fixes compile error in OS X.

Modified Paths:
--
trunk/blender/source/blender/editors/util/CMakeLists.txt

Modified: trunk/blender/source/blender/editors/util/CMakeLists.txt
===
--- trunk/blender/source/blender/editors/util/CMakeLists.txt2013-04-02 
12:41:11 UTC (rev 55719)
+++ trunk/blender/source/blender/editors/util/CMakeLists.txt2013-04-02 
12:54:47 UTC (rev 55720)
@@ -32,7 +32,7 @@
 )
 
 set(INC_SYS
-
+   ${GLEW_INCLUDE_PATH}
 )
 
 set(SRC

___
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 [55719] trunk/blender/source/blender: Usability fix, for color grading.

2013-04-02 Thread Ton Roosendaal
Revision: 55719
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55719
Author:   ton
Date: 2013-04-02 12:41:11 + (Tue, 02 Apr 2013)
Log Message:
---
Usability fix, for color grading.

The Scopes and Histogram (Image editor, Sequencer) were not updating on
changes in color or display settings. 

- Missing notifiers for refreshing
- Missing code to draw correct for managed byte buffers.

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

Modified: trunk/blender/source/blender/blenkernel/intern/colortools.c
===
--- trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-04-02 
12:38:05 UTC (rev 55718)
+++ trunk/blender/source/blender/blenkernel/intern/colortools.c 2013-04-02 
12:41:11 UTC (rev 55719)
@@ -1008,6 +1008,7 @@
IMB_colormanagement_processor_free(cm_processor);
 }
 
+/* if view_settings, it also applies this to byte buffers */
 void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings 
*view_settings,
const ColorManagedDisplaySettings *display_settings)
 {
@@ -1021,7 +1022,7 @@
float rgba[4], ycc[3], luma;
int ycc_mode = -1;
const short is_float = (ibuf->rect_float != NULL);
-
+   void *cache_handle = NULL;
struct ColormanageProcessor *cm_processor = NULL;
 
if (ibuf->rect == NULL && ibuf->rect_float == NULL) return;
@@ -1090,12 +1091,17 @@

if (is_float)
rf = ibuf->rect_float;
-   else
-   rc = (unsigned char *)ibuf->rect;
-
+   else {
+   if (view_settings)
+   rc = (unsigned char *)IMB_display_buffer_acquire(ibuf, 
view_settings, display_settings, &cache_handle);
+   else
+   rc = (unsigned char *)ibuf->rect;
+   }
+   
if (ibuf->rect_float)
cm_processor = 
IMB_colormanagement_display_processor_new(view_settings, display_settings);
 
+   printf("update %p\n", cm_processor);
for (y = 0; y < ibuf->y; y++) {
if (savedlines < scopes->sample_lines && y >= ((savedlines) * 
ibuf->y) / (scopes->sample_lines + 1)) {
saveline = 1;
@@ -1193,7 +1199,9 @@
 
if (cm_processor)
IMB_colormanagement_processor_free(cm_processor);
-
+   if (cache_handle)
+   IMB_display_buffer_release(cache_handle);
+   
scopes->ok = 1;
 }
 

Modified: trunk/blender/source/blender/editors/space_image/space_image.c
===
--- trunk/blender/source/blender/editors/space_image/space_image.c  
2013-04-02 12:38:05 UTC (rev 55718)
+++ trunk/blender/source/blender/editors/space_image/space_image.c  
2013-04-02 12:41:11 UTC (rev 55719)
@@ -435,6 +435,12 @@

/* context changes */
switch (wmn->category) {
+   case NC_WINDOW:
+   /* notifier comes from editing color space */
+   image_scopes_tag_refresh(sa);
+   ED_area_tag_refresh(sa);
+   ED_area_tag_redraw(sa);
+   break;
case NC_SCENE:
switch (wmn->data) {
case ND_FRAME:
@@ -801,11 +807,15 @@
Scene *scene = CTX_data_scene(C);
void *lock;
ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock);
+   
if (ibuf) {
if (!sima->scopes.ok) {

BKE_histogram_update_sample_line(&sima->sample_line_hist, ibuf, 
&scene->view_settings, &scene->display_settings);
}
-   scopes_update(&sima->scopes, ibuf, &scene->view_settings, 
&scene->display_settings);
+   if (sima->image->flag & IMA_VIEW_AS_RENDER)
+   scopes_update(&sima->scopes, ibuf, 
&scene->view_settings, &scene->display_settings);
+   else
+   scopes_update(&sima->scopes, ibuf, NULL, 
&scene->display_settings);
}
ED_space_image_release_buffer(sima, ibuf, lock);


Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2013-04-02 12:38:05 UTC (rev 55718)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2013-04-02 12:41:11 UTC (rev 55719)
@@ -897,10 +897,8 @@
ImBuf *display_ibuf = IMB_dupImBuf(ibuf);
ImBuf *scope;
 
-   if (display_ibuf->rec

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55718] trunk/blender/source/blender/ editors/space_node/node_ops.c: Key mapping conflict for 'find node' versus 'add socket link' (noodle).

2013-04-02 Thread Ton Roosendaal
Revision: 55718
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55718
Author:   ton
Date: 2013-04-02 12:38:05 + (Tue, 02 Apr 2013)
Log Message:
---
Key mapping conflict for 'find node' versus 'add socket link' (noodle).

Historically, F shortcut was for 'add edge/face' in Blender.
In Node editor, F makes a noodle, ctrl+f made a noodle replace too.

To keep ALT+F work for "Unattach from frame", the solution I now propose
is to make CTRL+F for finding nodes, and SHIFT+F for 'add noodle with replace'.

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

Modified: trunk/blender/source/blender/editors/space_node/node_ops.c
===
--- trunk/blender/source/blender/editors/space_node/node_ops.c  2013-04-02 
11:59:27 UTC (rev 55717)
+++ trunk/blender/source/blender/editors/space_node/node_ops.c  2013-04-02 
12:38:05 UTC (rev 55718)
@@ -282,7 +282,7 @@
 
kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 
0, 0);
RNA_boolean_set(kmi->ptr, "replace", FALSE);
-   kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 
KM_CTRL, 0);
+   kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 
KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "replace", TRUE);
 
WM_keymap_add_menu(keymap, "NODE_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
@@ -325,7 +325,7 @@
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "prev", TRUE);

-   WM_keymap_add_item(keymap, "NODE_OT_find_node", FKEY, KM_PRESS, KM_ALT, 
0);
+   WM_keymap_add_item(keymap, "NODE_OT_find_node", FKEY, KM_PRESS, 
KM_CTRL, 0);

node_group_operators(keymap, "ShaderNodeGroup");
node_group_operators(keymap, "CompositorNodeGroup");

___
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 [55703] trunk/blender: Node editing feature:

2013-04-01 Thread Ton Roosendaal
Revision: 55703
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55703
Author:   ton
Date: 2013-04-01 15:07:22 + (Mon, 01 Apr 2013)
Log Message:
---
Node editing feature:

New operator "Find Node".
Opens search menu, and allows to find a node based on name or label.

On selecting name, menu selects/activates the node and moves the view to it.

Shortcut: ALT+F 
Menu: Node editor, "Select"

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_node.py
trunk/blender/source/blender/editors/space_node/node_intern.h
trunk/blender/source/blender/editors/space_node/node_ops.c
trunk/blender/source/blender/editors/space_node/node_select.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_node.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_node.py   2013-04-01 
13:47:19 UTC (rev 55702)
+++ trunk/blender/release/scripts/startup/bl_ui/space_node.py   2013-04-01 
15:07:22 UTC (rev 55703)
@@ -151,11 +151,18 @@
 layout.operator("node.select_all", text="Inverse").action = 'INVERT'
 layout.operator("node.select_linked_from")
 layout.operator("node.select_linked_to")
+   
+layout.separator()
+
 layout.operator("node.select_same_type")
 layout.operator("node.select_same_type_step").prev = True
 layout.operator("node.select_same_type_step").prev = False
 
+layout.separator()
 
+layout.operator("node.find_node")
+
+
 class NODE_MT_node(Menu):
 bl_label = "Node"
 

Modified: trunk/blender/source/blender/editors/space_node/node_intern.h
===
--- trunk/blender/source/blender/editors/space_node/node_intern.h   
2013-04-01 13:47:19 UTC (rev 55702)
+++ trunk/blender/source/blender/editors/space_node/node_intern.h   
2013-04-01 15:07:22 UTC (rev 55703)
@@ -122,6 +122,7 @@
 void NODE_OT_select_lasso(struct wmOperatorType *ot);
 void NODE_OT_select_same_type(struct wmOperatorType *ot);
 void NODE_OT_select_same_type_step(struct wmOperatorType *ot);
+void NODE_OT_find_node(struct wmOperatorType *ot);
 
 /* node_view.c */
 int space_node_view_flag(struct bContext *C, SpaceNode *snode, ARegion *ar, 
const int node_flag);

Modified: trunk/blender/source/blender/editors/space_node/node_ops.c
===
--- trunk/blender/source/blender/editors/space_node/node_ops.c  2013-04-01 
13:47:19 UTC (rev 55702)
+++ trunk/blender/source/blender/editors/space_node/node_ops.c  2013-04-01 
15:07:22 UTC (rev 55703)
@@ -60,6 +60,8 @@
WM_operatortype_append(NODE_OT_select_same_type);
WM_operatortype_append(NODE_OT_select_same_type_step);

+   WM_operatortype_append(NODE_OT_find_node);
+   
WM_operatortype_append(NODE_OT_view_all);
WM_operatortype_append(NODE_OT_view_selected);
 
@@ -323,6 +325,8 @@
kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "prev", TRUE);

+   WM_keymap_add_item(keymap, "NODE_OT_find_node", FKEY, KM_PRESS, KM_ALT, 
0);
+   
node_group_operators(keymap, "ShaderNodeGroup");
node_group_operators(keymap, "CompositorNodeGroup");
node_group_operators(keymap, "TextureNodeGroup");

Modified: trunk/blender/source/blender/editors/space_node/node_select.c
===
--- trunk/blender/source/blender/editors/space_node/node_select.c   
2013-04-01 13:47:19 UTC (rev 55702)
+++ trunk/blender/source/blender/editors/space_node/node_select.c   
2013-04-01 15:07:22 UTC (rev 55703)
@@ -32,6 +32,7 @@
 
 #include "BLI_rect.h"
 #include "BLI_lasso.h"
+#include "BLI_string.h"
 #include "BLI_utildefines.h"
 
 #include "BKE_context.h"
@@ -48,6 +49,8 @@
 #include "WM_api.h"
 #include "WM_types.h"
 
+#include "UI_interface.h"
+#include "UI_resources.h"
 #include "UI_view2d.h"
 
 #include "MEM_guardedalloc.h"
@@ -853,3 +856,104 @@
 
 }
 
+/* *** find a node  */
+
+/* generic  search invoke */
+static void node_find_cb(const struct bContext *C, void *UNUSED(arg), const 
char *str, uiSearchItems *items)
+{
+   SpaceNode *snode = CTX_wm_space_node(C);
+   bNode *node;
+   
+   for (node = snode->edittree->nodes.first; node; node = node->next) {
+   
+   if (BLI_strcasestr(node->name, str) || 
BLI_strcasestr(node->label, str)) {
+   char name[256];
+   
+   if (node->label[0])
+   BLI_snprintf(name, 256, "%s (%s)", node->name, 
node->label);
+   else
+   BLI_strncpy(name, node->name, 256);
+   if (0 == uiSearchIte

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55630] trunk/blender/source/blender/ editors/space_sequencer/sequencer_edit.c: Sequencer

2013-03-27 Thread Ton Roosendaal
Revision: 55630
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55630
Author:   ton
Date: 2013-03-27 18:31:18 + (Wed, 27 Mar 2013)
Log Message:
---
Sequencer

"Insert Gap" and "Remove Gap" tooltip fix - to denote this doesn't use 
selection.
The use of this tool is to insert or remove time for a timeline. 

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

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2013-03-27 18:28:25 UTC (rev 55629)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2013-03-27 18:31:18 UTC (rev 55630)
@@ -1036,7 +1036,7 @@
/* identifiers */
ot->name = "Remove Gaps";
ot->idname = "SEQUENCER_OT_gap_remove";
-   ot->description = "Remove gap at current frame to first strip at the 
right";
+   ot->description = "Remove gap at current frame to first strip at the 
right, independent of selection or locked state of strips";

/* api callbacks */
 // ot->invoke = sequencer_snap_invoke;
@@ -1067,7 +1067,7 @@
/* identifiers */
ot->name = "Insert Gaps";
ot->idname = "SEQUENCER_OT_gap_insert";
-   ot->description = "Insert gap at current frame to first strips at the 
right";
+   ot->description = "Insert gap at current frame to first strips at the 
right, independent of selection or locked state of strips";

/* api callbacks */
//  ot->invoke = sequencer_snap_invoke;

___
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 [55629] trunk/blender: Node Editor

2013-03-27 Thread Ton Roosendaal
Revision: 55629
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55629
Author:   ton
Date: 2013-03-27 18:28:25 + (Wed, 27 Mar 2013)
Log Message:
---
Node Editor

To complete previous commit:

New "Activate same type next/prev" operator - replaces the two not working 
previous ones.
This selects/activates and views the next or previous node of same type.

Shortcuts: Shift ] and Shift [

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_node.py
trunk/blender/source/blender/editors/space_node/node_intern.h
trunk/blender/source/blender/editors/space_node/node_ops.c
trunk/blender/source/blender/editors/space_node/node_select.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_node.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_node.py   2013-03-27 
17:22:12 UTC (rev 55628)
+++ trunk/blender/release/scripts/startup/bl_ui/space_node.py   2013-03-27 
18:28:25 UTC (rev 55629)
@@ -152,8 +152,8 @@
 layout.operator("node.select_linked_from")
 layout.operator("node.select_linked_to")
 layout.operator("node.select_same_type")
-layout.operator("node.select_same_type_next")
-layout.operator("node.select_same_type_prev")
+layout.operator("node.select_same_type_step").prev = True
+layout.operator("node.select_same_type_step").prev = False
 
 
 class NODE_MT_node(Menu):

Modified: trunk/blender/source/blender/editors/space_node/node_intern.h
===
--- trunk/blender/source/blender/editors/space_node/node_intern.h   
2013-03-27 17:22:12 UTC (rev 55628)
+++ trunk/blender/source/blender/editors/space_node/node_intern.h   
2013-03-27 18:28:25 UTC (rev 55629)
@@ -121,9 +121,7 @@
 void NODE_OT_select_border(struct wmOperatorType *ot);
 void NODE_OT_select_lasso(struct wmOperatorType *ot);
 void NODE_OT_select_same_type(struct wmOperatorType *ot);
-void NODE_OT_select_same_type_next(struct wmOperatorType *ot);
-void NODE_OT_select_same_type_prev(struct wmOperatorType *ot);
-void NODE_OT_activate_connected(struct wmOperatorType *ot);
+void NODE_OT_select_same_type_step(struct wmOperatorType *ot);
 
 /* node_view.c */
 int space_node_view_flag(struct bContext *C, SpaceNode *snode, ARegion *ar, 
const int node_flag);

Modified: trunk/blender/source/blender/editors/space_node/node_ops.c
===
--- trunk/blender/source/blender/editors/space_node/node_ops.c  2013-03-27 
17:22:12 UTC (rev 55628)
+++ trunk/blender/source/blender/editors/space_node/node_ops.c  2013-03-27 
18:28:25 UTC (rev 55629)
@@ -58,9 +58,7 @@
WM_operatortype_append(NODE_OT_select_border);
WM_operatortype_append(NODE_OT_select_lasso);
WM_operatortype_append(NODE_OT_select_same_type);
-   WM_operatortype_append(NODE_OT_select_same_type_next);
-   WM_operatortype_append(NODE_OT_select_same_type_prev);
-   WM_operatortype_append(NODE_OT_activate_connected);
+   WM_operatortype_append(NODE_OT_select_same_type_step);

WM_operatortype_append(NODE_OT_view_all);
WM_operatortype_append(NODE_OT_view_selected);
@@ -319,12 +317,10 @@
WM_keymap_add_item(keymap, "NODE_OT_select_linked_to", LKEY, KM_PRESS, 
KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NODE_OT_select_linked_from", LKEY, 
KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_select_same_type", GKEY, KM_PRESS, 
KM_SHIFT, 0);
-// WM_keymap_add_item(keymap, "NODE_OT_select_same_type_next", 
RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
-// WM_keymap_add_item(keymap, "NODE_OT_select_same_type_prev", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
 
-   kmi = WM_keymap_add_item(keymap, "NODE_OT_activate_connected", 
RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+   kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", 
RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "prev", FALSE);
-   kmi = WM_keymap_add_item(keymap, "NODE_OT_activate_connected", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+   kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(kmi->ptr, "prev", TRUE);

node_group_operators(keymap, "ShaderNodeGroup");

Modified: trunk/blender/source/blender/editors/space_node/node_select.c
===
--- trunk/blender/source/blender/editors/space_node/node_select.c   
2013-03-27 17:22:12 UTC (rev 55628)
+++ trunk/blender/source/blender/editors/space_node/node_select.c   
2013-03-27 18:28:25 UTC (rev 55629)
@@ -762,65 +762,10 @@
 
 /* ** Select The Next/Prev Node Of The Same Type ** */
 
-static int node_select_same_type_next_exec(bContext *C, wmOperator *UNUSED(op)

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55628] trunk/blender/source/blender/ editors/space_node: Fix for Node Editor tool "Find next/prev of same type".

2013-03-27 Thread Ton Roosendaal
Revision: 55628
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55628
Author:   ton
Date: 2013-03-27 17:22:12 + (Wed, 27 Mar 2013)
Log Message:
---
Fix for Node Editor tool "Find next/prev of same type".

This is the first half of the commit, it's going to be reviewed further.
It also depends on other work in node drawing (to not reshuffle order on
every select/activate).

At least it works quite nice for the shortcuts shift [ and shift ]

Modified Paths:
--
trunk/blender/source/blender/editors/space_node/node_intern.h
trunk/blender/source/blender/editors/space_node/node_ops.c
trunk/blender/source/blender/editors/space_node/node_select.c
trunk/blender/source/blender/editors/space_node/node_view.c

Modified: trunk/blender/source/blender/editors/space_node/node_intern.h
===
--- trunk/blender/source/blender/editors/space_node/node_intern.h   
2013-03-27 16:33:49 UTC (rev 55627)
+++ trunk/blender/source/blender/editors/space_node/node_intern.h   
2013-03-27 17:22:12 UTC (rev 55628)
@@ -123,8 +123,11 @@
 void NODE_OT_select_same_type(struct wmOperatorType *ot);
 void NODE_OT_select_same_type_next(struct wmOperatorType *ot);
 void NODE_OT_select_same_type_prev(struct wmOperatorType *ot);
+void NODE_OT_activate_connected(struct wmOperatorType *ot);
 
 /* node_view.c */
+int space_node_view_flag(struct bContext *C, SpaceNode *snode, ARegion *ar, 
const int node_flag);
+
 void NODE_OT_view_all(struct wmOperatorType *ot);
 void NODE_OT_view_selected(struct wmOperatorType *ot);
 

Modified: trunk/blender/source/blender/editors/space_node/node_ops.c
===
--- trunk/blender/source/blender/editors/space_node/node_ops.c  2013-03-27 
16:33:49 UTC (rev 55627)
+++ trunk/blender/source/blender/editors/space_node/node_ops.c  2013-03-27 
17:22:12 UTC (rev 55628)
@@ -60,7 +60,8 @@
WM_operatortype_append(NODE_OT_select_same_type);
WM_operatortype_append(NODE_OT_select_same_type_next);
WM_operatortype_append(NODE_OT_select_same_type_prev);
-
+   WM_operatortype_append(NODE_OT_activate_connected);
+   
WM_operatortype_append(NODE_OT_view_all);
WM_operatortype_append(NODE_OT_view_selected);
 
@@ -318,9 +319,14 @@
WM_keymap_add_item(keymap, "NODE_OT_select_linked_to", LKEY, KM_PRESS, 
KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NODE_OT_select_linked_from", LKEY, 
KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_select_same_type", GKEY, KM_PRESS, 
KM_SHIFT, 0);
-   WM_keymap_add_item(keymap, "NODE_OT_select_same_type_next", 
RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
-   WM_keymap_add_item(keymap, "NODE_OT_select_same_type_prev", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+// WM_keymap_add_item(keymap, "NODE_OT_select_same_type_next", 
RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+// WM_keymap_add_item(keymap, "NODE_OT_select_same_type_prev", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
 
+   kmi = WM_keymap_add_item(keymap, "NODE_OT_activate_connected", 
RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+   RNA_boolean_set(kmi->ptr, "prev", FALSE);
+   kmi = WM_keymap_add_item(keymap, "NODE_OT_activate_connected", 
LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0);
+   RNA_boolean_set(kmi->ptr, "prev", TRUE);
+   
node_group_operators(keymap, "ShaderNodeGroup");
node_group_operators(keymap, "CompositorNodeGroup");
node_group_operators(keymap, "TextureNodeGroup");

Modified: trunk/blender/source/blender/editors/space_node/node_select.c
===
--- trunk/blender/source/blender/editors/space_node/node_select.c   
2013-03-27 16:33:49 UTC (rev 55627)
+++ trunk/blender/source/blender/editors/space_node/node_select.c   
2013-03-27 17:22:12 UTC (rev 55628)
@@ -816,3 +816,94 @@
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
+
+/* ** */
+
+
+static int node_activate_connected_exec(bContext *C, wmOperator *op)
+{
+   SpaceNode *snode = CTX_wm_space_node(C);
+   ARegion *ar = CTX_wm_region(C);
+   bNode **node_array;
+   bNode *active = nodeGetActive(snode->edittree);
+   int totnodes;
+   int revert = RNA_boolean_get(op->ptr, "prev");
+   int same_type = 1;
+   
+   ntreeGetDependencyList(snode->edittree, &node_array, &totnodes);
+   
+   if (totnodes > 1) {
+   int a;
+   
+   for (a = 0; a < totnodes; a++) {
+   if (node_array[a] == active)
+   break;
+   }
+   
+   if (same_type) {
+   bNode *node = NULL;
+   
+   while (node == NULL) {
+   if (revert) a--;
+ 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55626] trunk/blender/source/blender/ blenkernel/intern/packedFile.c: Bug report #34775

2013-03-27 Thread Ton Roosendaal
Revision: 55626
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55626
Author:   ton
Date: 2013-03-27 13:28:51 + (Wed, 27 Mar 2013)
Log Message:
---
Bug report #34775

Packed file print was misleading (no files packed).
It should be "no new files packed".

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

Modified: trunk/blender/source/blender/blenkernel/intern/packedFile.c
===
--- trunk/blender/source/blender/blenkernel/intern/packedFile.c 2013-03-27 
12:29:00 UTC (rev 55625)
+++ trunk/blender/source/blender/blenkernel/intern/packedFile.c 2013-03-27 
13:28:51 UTC (rev 55626)
@@ -263,7 +263,7 @@
}

if (tot == 0)
-   BKE_report(reports, RPT_INFO, "No files have been packed");
+   BKE_report(reports, RPT_INFO, "No new files have been packed");
else
BKE_reportf(reports, RPT_INFO, "Packed %d files", tot);
 

___
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 [55625] trunk/blender/source/blender/ editors/space_sequencer/sequencer_edit.c: Tiny fix for sequencer:

2013-03-27 Thread Ton Roosendaal
Revision: 55625
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55625
Author:   ton
Date: 2013-03-27 12:29:00 + (Wed, 27 Mar 2013)
Log Message:
---
Tiny fix for sequencer: 

"View selected strip(s)" now includes the active strip (which can be deselected 
in cases). Less confusing this way, also because active strip is being drawn 
very visible.

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

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2013-03-27 11:26:10 UTC (rev 55624)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2013-03-27 12:29:00 UTC (rev 55625)
@@ -2328,6 +2328,7 @@
View2D *v2d = UI_view2d_fromcontext(C);
ARegion *ar = CTX_wm_region(C);
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
+   Sequence *last_seq = BKE_sequencer_active_get(scene);
Sequence *seq;
rctf cur_new = v2d->cur;
 
@@ -2344,7 +2345,7 @@
return OPERATOR_CANCELLED;
 
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
-   if (seq->flag & SELECT) {
+   if ((seq->flag & SELECT) || (seq == last_seq)) {
xmin = min_ii(xmin, seq->startdisp);
xmax = max_ii(xmax, seq->enddisp);
 

___
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 [55622] trunk/blender/source/blender/ render/intern/source/pipeline.c: Fix for timing print in renders.

2013-03-27 Thread Ton Roosendaal
Revision: 55622
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55622
Author:   ton
Date: 2013-03-27 10:05:31 + (Wed, 27 Mar 2013)
Log Message:
---
Fix for timing print in renders.

The time it was printing was excluding the time spent on color and file saving.
Now it includes this too, plus it prints the time spent on color/files.

Makes quite a difference when you do sequencer conversions or grading in 
terminals - time that was printed was very misleading.

For readablity of logs, also added an extra empty line after this print.

Modified Paths:
--
trunk/blender/source/blender/render/intern/source/pipeline.c

Modified: trunk/blender/source/blender/render/intern/source/pipeline.c
===
--- trunk/blender/source/blender/render/intern/source/pipeline.c
2013-03-27 09:57:34 UTC (rev 55621)
+++ trunk/blender/source/blender/render/intern/source/pipeline.c
2013-03-27 10:05:31 UTC (rev 55622)
@@ -2270,6 +2270,7 @@
char name[FILE_MAX];
RenderResult rres;
Object *camera = RE_GetCamera(re);
+   double render_time;
int ok = 1;

RE_AcquireResultImage(re, &rres);
@@ -2353,11 +2354,17 @@

RE_ReleaseResultImage(re);
 
+   render_time = re->i.lastframetime;
+   re->i.lastframetime = PIL_check_seconds_timer() - re->i.starttime;
+   
BLI_timestr(re->i.lastframetime, name);
printf(" Time: %s", name);
-
+   
BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
 
+   BLI_timestr(re->i.lastframetime - render_time, name);
+   printf(" (Saving: %s)\n", name);
+   
fputc('\n', stdout);
fflush(stdout); /* needed for renderd !! (not anymore... (ton)) */
 

___
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 [55603] trunk/blender/source/blender/ editors/space_sequencer: Bug fix - own collection.

2013-03-26 Thread Ton Roosendaal
Revision: 55603
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55603
Author:   ton
Date: 2013-03-26 17:49:57 + (Tue, 26 Mar 2013)
Log Message:
---
Bug fix - own collection.

- Scopes in Sequencer were not drawing OK (drawing code assumed alpha)
- Histogram in Sequencer now uses same formula to quantify R G B as the
  other histogram in Blender (per channel).

I seriously thought of dropping this, and add the same sidebar here as we
have for Image window. However, what stops me is that current code is
very optimized, and has OMP hints.

Will check instead on cleaner drawing here now.

Modified Paths:
--
trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_scopes.c

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2013-03-26 15:52:43 UTC (rev 55602)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c   
2013-03-26 17:49:57 UTC (rev 55603)
@@ -1061,9 +1061,12 @@
 
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, ibuf->x, ibuf->y, 0, GL_RGBA, 
GL_UNSIGNED_BYTE, display_buffer);
 
-   if (sseq->flag & SEQ_USE_ALPHA) {
-   glEnable(GL_BLEND);
-   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+   /* only draw alpha for main buffer */
+   if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
+   if (sseq->flag & SEQ_USE_ALPHA) {
+   glEnable(GL_BLEND);
+   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+   }
}
 
glBegin(GL_QUADS);

Modified: 
trunk/blender/source/blender/editors/space_sequencer/sequencer_scopes.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_scopes.c 
2013-03-26 15:52:43 UTC (rev 55602)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_scopes.c 
2013-03-26 17:49:57 UTC (rev 55603)
@@ -107,20 +107,20 @@
 
for (x = 0; x < w; x++) {
unsigned char *p = tgt + 4 * x;
-   p[1] = p[3] = 255.0;
-   p[4 * w + 1] = p[4 * w + 3] = 255.0;
+   p[1] = p[3] = 155;
+   p[4 * w + 1] = p[4 * w + 3] = 155;
p = tgt + 4 * (w * (h - 1) + x);
-   p[1] = p[3] = 255.0;
-   p[-4 * w + 1] = p[-4 * w + 3] = 255.0;
+   p[1] = p[3] = 155;
+   p[-4 * w + 1] = p[-4 * w + 3] = 155;
}
 
for (y = 0; y < h; y++) {
unsigned char *p = tgt + 4 * w * y;
-   p[1] = p[3] = 255.0;
-   p[4 + 1] = p[4 + 3] = 255.0;
+   p[1] = p[3] = 155;
+   p[4 + 1] = p[4 + 3] = 155;
p = tgt + 4 * (w * y + w - 1);
-   p[1] = p[3] = 255.0;
-   p[-4 + 1] = p[-4 + 3] = 255.0;
+   p[1] = p[3] = 155;
+   p[-4 + 1] = p[-4 + 3] = 155;
}
 }
 
@@ -156,7 +156,8 @@
unsigned char wtable[256];
 
wform_put_grid(tgt, w, h);
-
+   wform_put_border(tgt, w, h);
+   
for (x = 0; x < 256; x++) {
wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, 
waveform_gamma) * 255);
}
@@ -181,8 +182,6 @@
}
}
 
-   wform_put_border(tgt, w, h);
-   
return rval;
 }
 
@@ -454,8 +453,8 @@
 static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
 {
ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect);
-   int c, x, y;
-   unsigned int n;
+   int x, y;
+   unsigned int nr, ng, nb;
unsigned char *src = (unsigned char *) ibuf->rect;
 
unsigned int bins[3][HIS_STEPS];
@@ -487,20 +486,29 @@
}
}
 
-   n = 0;
-   for (c = 0; c < 3; c++) {
-   for (x = 0; x < HIS_STEPS; x++) {
-   if (bins[c][x] > n) {
-   n = bins[c][x];
-   }
-   }
+   nr = nb = ng = 0;
+   for (x = 0; x < HIS_STEPS; x++) {
+   if (bins[0][x] > nr)
+   nr = bins[0][x];
+   if (bins[1][x] > ng)
+   ng = bins[1][x];
+   if (bins[2][x] > nb)
+   nb = bins[2][x];
}
 
-   for (c = 0; c < 3; c++) {
-   for (x = 0; x < HIS_STEPS; x++) {
-   draw_histogram_bar(rval, x * 2 + 1, ((float) 
bins[c][x]) / n, c);
-   draw_histogram_bar(rval, x * 2 + 2, ((float) 
bins[c][x]) / n, c);
+   for (x = 0; x < HIS_STEPS; x++) {
+   if (nr) {
+   draw_histogram_bar(rval, x * 2 + 1, ((float) 
bins[0][x]) / nr, 0);
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55600] trunk/blender: Sequencer usability :

2013-03-26 Thread Ton Roosendaal
Revision: 55600
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55600
Author:   ton
Date: 2013-03-26 15:00:56 + (Tue, 26 Mar 2013)
Log Message:
---
Sequencer usability:

Brought back old tools "Remove Gap(s)" and "Insert Gap".
It's actually one of the first tools I ever coded for it in 90ies, so useful!

* Remove Gap(s)

This checks if there's no strip at a given position, and slides all strips
together to the left, until the gap is closed.

- BackSpace key, remove gap at current frame (or first gap at right of frame)
- SHIFT+BackSpace, remove all gaps at or to right of current frame.

* Insert Gap

Shifts all strips to right of current frame with 10 frames. (Amount can be
set in Toolbar redo panel).

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_intern.h
trunk/blender/source/blender/editors/space_sequencer/sequencer_ops.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py  
2013-03-26 14:33:53 UTC (rev 55599)
+++ trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py  
2013-03-26 15:00:56 UTC (rev 55600)
@@ -284,6 +284,9 @@
 
 layout.operator("transform.transform", text="Grab/Move").mode = 
'TRANSLATION'
 layout.operator("transform.transform", text="Grab/Extend from 
frame").mode = 'TIME_EXTEND'
+layout.operator("sequencer.no_gap")
+layout.operator("sequencer.insert_gap")
+
 #  uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add 
this operator
 layout.separator()
 

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2013-03-26 14:33:53 UTC (rev 55599)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c   
2013-03-26 15:00:56 UTC (rev 55600)
@@ -988,30 +988,104 @@
 }
 
 
-static void UNUSED_FUNCTION(no_gaps) (Scene *scene)
+static int sequencer_no_gap_exec(bContext *C, wmOperator *op)
 {
+   Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
-   int cfra, first = 0, done;
+   rctf rectf;
+   int cfra, efra, sfra, first = 0, done;
+   int do_all = RNA_boolean_get(op->ptr, "all");
+   
+   if (ed == NULL) return OPERATOR_CANCELLED;
 
+   /* get first and last frame */
+   boundbox_seq(scene, &rectf);
+   sfra = (int)rectf.xmin;
+   efra = (int)rectf.xmax;

-   if (ed == NULL) return;
-
-   for (cfra = CFRA; cfra <= EFRA; cfra++) {
+   /* first check if the current frame has a gap already */
+   for (cfra = CFRA; cfra >= sfra; cfra--) {
+   if (BKE_sequencer_evaluate_frame(scene, cfra)) {
+   first = 1;
+   break;
+   }
+   }
+   
+   for ( ; cfra < efra; cfra++) {
+   /* first == 0 means there's still no strip to remove a gap for 
*/
if (first == 0) {
if (BKE_sequencer_evaluate_frame(scene, cfra) ) first = 
1;
}
-   else {
+   else if (BKE_sequencer_evaluate_frame(scene, cfra) == 0) {
done = TRUE;
while (BKE_sequencer_evaluate_frame(scene, cfra) == 0) {
done = insert_gap(scene, -1, cfra);
if (done == 0) break;
}
-   if (done == 0) break;
+   if (done == 0 || do_all == 0) break;
}
}
 
+   WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+   
+   return OPERATOR_FINISHED;
+
 }
 
+
+void SEQUENCER_OT_no_gap(struct wmOperatorType *ot)
+{
+   /* identifiers */
+   ot->name = "Remove Gap";
+   ot->idname = "SEQUENCER_OT_no_gap";
+   ot->description = "Remove gap at current frame to first strip at the 
right";
+   
+   /* api callbacks */
+// ot->invoke = sequencer_snap_invoke;
+   ot->exec = sequencer_no_gap_exec;
+   ot->poll = sequencer_edit_poll;
+   
+   /* flags */
+   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+   
+   RNA_def_boolean(ot->srna, "all", 0, "All Gaps", "Do all gaps to right 
of current frame");
+}
+
+static int sequencer_insert_gap_exec(bContext *C, wmOperator *op)
+{
+   Scene *scene = CTX_data_scene(C);
+   Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
+   int frames = RNA_int_get(op->ptr, "frames");
+   
+   if (ed == NULL) return OPERATO

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55597] trunk/blender/source/blender/ editors/transform: Better fix for "To Sphere" crashing in Image editor.

2013-03-26 Thread Ton Roosendaal
Revision: 55597
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55597
Author:   ton
Date: 2013-03-26 10:28:19 + (Tue, 26 Mar 2013)
Log Message:
---
Better fix for "To Sphere" crashing in Image editor. It appeared to be in use 
for
mask/uv modes. 

Modified Paths:
--
trunk/blender/source/blender/editors/transform/transform_conversions.c
trunk/blender/source/blender/editors/transform/transform_generics.c
trunk/blender/source/blender/editors/transform/transform_ops.c

Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===
--- trunk/blender/source/blender/editors/transform/transform_conversions.c  
2013-03-26 09:59:43 UTC (rev 55596)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c  
2013-03-26 10:28:19 UTC (rev 55597)
@@ -6469,7 +6469,7 @@
sort_trans_data_dist(t);
}
}
-   else {
+   else if (t->obedit) {
createTransUVs(C, t);
if (t->data && (t->flag & T_PROP_EDIT)) {
sort_trans_data(t); // makes selected become 
first in array

Modified: trunk/blender/source/blender/editors/transform/transform_generics.c
===
--- trunk/blender/source/blender/editors/transform/transform_generics.c 
2013-03-26 09:59:43 UTC (rev 55596)
+++ trunk/blender/source/blender/editors/transform/transform_generics.c 
2013-03-26 10:28:19 UTC (rev 55597)
@@ -1160,7 +1160,7 @@
t->options |= CTX_MASK;
}
else {
-   BLI_assert(0);
+   /* image not in uv edit, nor in mask mode, can happen 
for some tools */
}
}
else if (t->spacetype == SPACE_NODE) {

Modified: trunk/blender/source/blender/editors/transform/transform_ops.c
===
--- trunk/blender/source/blender/editors/transform/transform_ops.c  
2013-03-26 09:59:43 UTC (rev 55596)
+++ trunk/blender/source/blender/editors/transform/transform_ops.c  
2013-03-26 10:28:19 UTC (rev 55597)
@@ -721,7 +721,7 @@
ot->exec   = transform_exec;
ot->modal  = transform_modal;
ot->cancel = transform_cancel;
-   ot->poll   = ED_operator_view3d_active;
+   ot->poll   = ED_operator_screenactive;
 
RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1);
 

___
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 [55574] trunk/blender/source/blender/ editors/transform/transform_ops.c: Bug report, IRC:

2013-03-25 Thread Ton Roosendaal
Revision: 55574
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55574
Author:   ton
Date: 2013-03-25 18:41:28 + (Mon, 25 Mar 2013)
Log Message:
---
Bug report, IRC:

Operator "To Sphere" should only be allowed to be called in 3d view.
Crashed in Image editor.

Modified Paths:
--
trunk/blender/source/blender/editors/transform/transform_ops.c

Modified: trunk/blender/source/blender/editors/transform/transform_ops.c
===
--- trunk/blender/source/blender/editors/transform/transform_ops.c  
2013-03-25 17:22:00 UTC (rev 55573)
+++ trunk/blender/source/blender/editors/transform/transform_ops.c  
2013-03-25 18:41:28 UTC (rev 55574)
@@ -721,7 +721,7 @@
ot->exec   = transform_exec;
ot->modal  = transform_modal;
ot->cancel = transform_cancel;
-   ot->poll   = ED_operator_screenactive;
+   ot->poll   = ED_operator_view3d_active;
 
RNA_def_float_factor(ot->srna, "value", 0, 0, 1, "Factor", "", 0, 1);
 

___
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 [55572] trunk/blender/source/blender/ editors/screen/area.c: Bug fix:

2013-03-25 Thread Ton Roosendaal
Revision: 55572
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55572
Author:   ton
Date: 2013-03-25 15:45:59 + (Mon, 25 Mar 2013)
Log Message:
---
Bug fix:

On screen/area refresh calls the header scroll offset was cleared too. 
Probably an old remainder of early 2.5 coding. Should be not needed so much.

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

Modified: trunk/blender/source/blender/editors/screen/area.c
===
--- trunk/blender/source/blender/editors/screen/area.c  2013-03-25 15:32:15 UTC 
(rev 55571)
+++ trunk/blender/source/blender/editors/screen/area.c  2013-03-25 15:45:59 UTC 
(rev 55572)
@@ -1847,7 +1847,6 @@
 
 void ED_region_header_init(ARegion *ar)
 {
-   ar->v2d.flag &= ~V2D_IS_INITIALISED;
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, 
ar->winy);
 }
 

___
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 [55553] trunk/blender/source/blender/ editors/interface: UI small fixes:

2013-03-24 Thread Ton Roosendaal
Revision: 3
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=3
Author:   ton
Date: 2013-03-24 18:59:15 + (Sun, 24 Mar 2013)
Log Message:
---
UI small fixes:

- Theme color for the brush popup was not correctly coded. Now it follows menu 
item
  style correctly, which also allows all the themes we have to give readable 
text.

- RMB cancel also added for slider buttons and the color picker.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/editors/interface/interface_widgets.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-24 18:14:38 UTC (rev 2)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-24 18:59:15 UTC (rev 3)
@@ -3261,7 +3261,7 @@
}
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
-   if (event->type == ESCKEY) {
+   if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
data->cancel = TRUE;
data->escapecancel = TRUE;
button_activate_state(C, but, BUTTON_STATE_EXIT);
@@ -3839,7 +3839,7 @@
}
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
-   if (event->type == ESCKEY) {
+   if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
data->cancel = TRUE;
data->escapecancel = TRUE;
button_activate_state(C, but, BUTTON_STATE_EXIT);
@@ -4036,7 +4036,7 @@
}
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
-   if (event->type == ESCKEY) {
+   if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
data->cancel = TRUE;
data->escapecancel = TRUE;
button_activate_state(C, but, BUTTON_STATE_EXIT);

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-03-24 18:14:38 UTC (rev 2)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-03-24 18:59:15 UTC (rev 3)
@@ -3527,7 +3527,6 @@
rcti trect = *rect, bg_rect;
float font_dims[2] = {0.0f, 0.0f};
uiWidgetType *wt = widget_type(UI_WTYPE_MENU_ITEM);
-   unsigned char bg_col[3];

wt->state(wt, state);
wt->draw(&wt->wcol, rect, 0, 0);
@@ -3553,16 +3552,12 @@
if (bg_rect.xmax > rect->xmax - PREVIEW_PAD)
bg_rect.xmax = rect->xmax - PREVIEW_PAD;
 
-   UI_GetThemeColor3ubv(TH_BUTBACK, bg_col);
-   glColor4ubv((unsigned char *)wt->wcol.item);
+   glColor4ubv((unsigned char *)wt->wcol_theme->inner_sel);
glEnable(GL_BLEND);
glRecti(bg_rect.xmin, bg_rect.ymin, bg_rect.xmax, bg_rect.ymax);
glDisable(GL_BLEND);

-   if (state == UI_ACTIVE)
-   glColor4ubv((unsigned char *)wt->wcol.text);
-   else
-   glColor4ubv((unsigned char *)wt->wcol.text_sel);
+   glColor3ubv((unsigned char *)wt->wcol.text);
 
uiStyleFontDraw(fstyle, &trect, 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 [55551] trunk/blender/source/blender/ editors/interface/interface_handlers.c: Small feature:

2013-03-24 Thread Ton Roosendaal
Revision: 1
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=1
Author:   ton
Date: 2013-03-24 16:43:40 + (Sun, 24 Mar 2013)
Log Message:
---
Small feature:

While using number sliders, you can now press RMB to cancel (like ESC)

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-24 14:56:03 UTC (rev 0)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-24 16:43:40 UTC (rev 1)
@@ -2997,7 +2997,7 @@

}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
-   if (event->type == ESCKEY) {
+   if (event->type == ESCKEY || event->type == RIGHTMOUSE) {
data->cancel = TRUE;
data->escapecancel = TRUE;
button_activate_state(C, but, BUTTON_STATE_EXIT);

___
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 [55550] trunk/blender/intern/ghost/intern/ GHOST_SystemCocoa.mm: OS X Fullscreen: shortcut now is CTRL + Cmd + F.

2013-03-24 Thread Ton Roosendaal
Revision: 0
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=0
Author:   ton
Date: 2013-03-24 14:56:03 + (Sun, 24 Mar 2013)
Log Message:
---
OS X Fullscreen: shortcut now is CTRL + Cmd + F. Is more common, and it keeps
Cmd + F for searches.

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===
--- trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm  2013-03-24 
13:43:40 UTC (rev 55549)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm  2013-03-24 
14:56:03 UTC (rev 0)
@@ -664,7 +664,7 @@

 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 // make it build with  10.6 
deployment target, but as it is not available in 10.6, it will get weaklinked
menuItem = [windowMenu addItemWithTitle:@"Enter 
Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f" ];
-   [menuItem 
setKeyEquivalentModifierMask:NSCommandKeyMask];
+   [menuItem 
setKeyEquivalentModifierMask:NSControlKeyMask | NSCommandKeyMask];
 #endif
 
menuItem = [windowMenu 
addItemWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"];

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

2013-03-24 Thread Ton Roosendaal
Revision: 55549
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55549
Author:   ton
Date: 2013-03-24 13:43:40 + (Sun, 24 Mar 2013)
Log Message:
---
Usablity:

In text editor, the CTRL+F find now opens property region (or keeps it) and
activates the search button for input.

That's already nice! But next step should be to do a search on exit of 
the button (or while typing). That's stuff I need Campbell to help with though.

Notes:
- Probably Py api for property buttons could get an "operator=" arg?
- The warning menu "not found" should go away
- I also suggest to make "wrap" search default for new editors

Modified Paths:
--
trunk/blender/source/blender/editors/include/UI_interface.h
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/editors/space_text/space_text.c
trunk/blender/source/blender/editors/space_text/text_header.c
trunk/blender/source/blender/editors/space_text/text_intern.h
trunk/blender/source/blender/editors/space_text/text_ops.c
trunk/blender/source/blender/makesdna/DNA_space_types.h
trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===
--- trunk/blender/source/blender/editors/include/UI_interface.h 2013-03-24 
12:13:13 UTC (rev 55548)
+++ trunk/blender/source/blender/editors/include/UI_interface.h 2013-03-24 
13:43:40 UTC (rev 55549)
@@ -643,6 +643,8 @@
 void (*func)(const struct bContext *C, void *, 
void *, void *, struct rcti *rect),
 void *arg1, void *arg2);
 
+void UI_textbutton_activate_event(const struct bContext *C, struct ARegion 
*ar, void *basepoin, const char *identifier);
+
 void uiButSetFocusOnEnter(struct wmWindow *win, uiBut *but);
 
 /* Autocomplete

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-24 12:13:13 UTC (rev 55548)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-24 13:43:40 UTC (rev 55549)
@@ -7456,4 +7456,35 @@
WM_event_remove_ui_handler(handlers, ui_handler_popup, 
ui_handler_remove_popup, popup, FALSE);
 }
 
+void UI_textbutton_activate_event(const bContext *C, ARegion *ar, void 
*basepoin, const char *identifier)
+{
+   uiBlock *block;
+   uiBut *but;
+   
+   for (block = ar->uiblocks.first; block; block = block->next) {
+   for (but = block->buttons.first; but; but = but->next) {
+   if (but->type == TEX) {
+   if (but->rnaprop && but->rnapoin.data == 
basepoin)
+   if 
(strcmp(RNA_property_identifier(but->rnaprop), identifier)==0)
+   break;
+   
+   }
+   }
+   if (but)
+   break;
+   }
+   
+   if (but) {
+   wmWindow *win = CTX_wm_window(C);
+   wmEvent event;
+   
+   event = *(win->eventstate);  /* XXX huh huh? make api call */
+   event.type = EVT_BUT_OPEN;
+   event.val = KM_PRESS;
+   event.customdata = but;
+   event.customdatafree = FALSE;
+   wm_event_add(win, &event);
 
+   }
+}
+

Modified: trunk/blender/source/blender/editors/space_text/space_text.c
===
--- trunk/blender/source/blender/editors/space_text/space_text.c
2013-03-24 12:13:13 UTC (rev 55548)
+++ trunk/blender/source/blender/editors/space_text/space_text.c
2013-03-24 13:43:40 UTC (rev 55549)
@@ -220,6 +220,8 @@
WM_operatortype_append(TEXT_OT_replace);
WM_operatortype_append(TEXT_OT_replace_set_selected);
 
+   WM_operatortype_append(TEXT_OT_start_find);
+   
WM_operatortype_append(TEXT_OT_to_3d_object);
 
WM_operatortype_append(TEXT_OT_resolve_conflict);
@@ -233,9 +235,9 @@
wmKeyMapItem *kmi;

keymap = WM_keymap_find(keyconf, "Text Generic", SPACE_TEXT, 0);
-   WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, 
KM_CTRL, 0);
+   WM_keymap_add_item(keymap, "TEXT_OT_start_find", FKEY, KM_PRESS, 
KM_CTRL, 0);
 #ifdef __APPLE__
-   WM_keymap_add_item(keymap, "TEXT_OT_properties", FKEY, KM_PRESS, 
KM_OSKEY, 0);
+   WM_keymap_add_item(keymap, "TEXT_OT_start_find", FKEY, KM_PRESS, 
KM_OSKEY, 0);
 #endif

keymap = WM_keymap_find(keyconf, "Text", SPACE_TEXT, 0);
@@ -515,7 +517,16 @@
 
 static void text_properties_area_draw(const bContext *C, ARegion *ar)
 {
+   Spa

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55538] trunk/blender/intern/ghost/intern/ GHOST_WindowCocoa.mm: Bug fix 34743

2013-03-23 Thread Ton Roosendaal
Revision: 55538
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55538
Author:   ton
Date: 2013-03-23 16:08:02 + (Sat, 23 Mar 2013)
Log Message:
---
Bug fix 34743

Mac OS X full screen: the old option to go full screen now didn't hide the
dock/topbar anymore. Also made it use dock auto-hide now, not permanent hide.

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2013-03-23 
16:03:13 UTC (rev 55537)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2013-03-23 
16:08:02 UTC (rev 55538)
@@ -624,8 +624,9 @@

  NSStringPboardType, NSTIFFPboardType, nil]];

 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-   [NSApp setPresentationOptions:(NSApplicationPresentationFullScreen)];
-   [m_window 
setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
+   if (state != GHOST_kWindowStateFullScreen) {
+   [m_window 
setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
+   }
 #endif

if (state == GHOST_kWindowStateFullScreen)
@@ -969,9 +970,9 @@
 
 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
//10.6 provides Cocoa functions to autoshow 
menu bar, and to change a window style
-   //Hide menu & dock if needed
+   //Hide menu & dock if on primary screen. else 
only menu
if ([[m_window screen] isEqual:[[NSScreen 
screens] objectAtIndex:0]]) {
-   [NSApp 
setPresentationOptions:(NSApplicationPresentationHideDock | 
NSApplicationPresentationAutoHideMenuBar)];
+   [NSApp 
setPresentationOptions:(NSApplicationPresentationAutoHideDock | 
NSApplicationPresentationAutoHideMenuBar)];
}
//Make window borderless and enlarge it
[m_window setStyleMask:NSBorderlessWindowMask];

___
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 [55535] trunk/blender/source/blender/ blenloader/intern/readfile.c: Theme fix:

2013-03-23 Thread Ton Roosendaal
Revision: 55535
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55535
Author:   ton
Date: 2013-03-23 12:46:07 + (Sat, 23 Mar 2013)
Log Message:
---
Theme fix:

Node Editor and Sequencer were not using grid theme color, but 'back'.

This commit adds versioning to copy background color to grid. I do this
without increasing sub-version, which allows to add correct drawing when
the subversion has to go up anyway for something else.

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2013-03-23 
10:11:29 UTC (rev 55534)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2013-03-23 
12:46:07 UTC (rev 55535)
@@ -7558,10 +7558,21 @@

if (user == NULL) return;

+   if (MAIN_VERSION_OLDER(bmain, 266, 4)) {
+   bTheme *btheme;
+   
+   /* themes for Node and Sequence editor were not using grid 
color, but back. we copy this over then */
+   for (btheme = user->themes.first; btheme; btheme = 
btheme->next) {
+   copy_v4_v4_char(btheme->tnode.grid, btheme->tnode.back);
+   copy_v4_v4_char(btheme->tseq.grid, btheme->tseq.back);
+   }
+   }
+   
if (bmain->versionfile < 267) {

if (!DNA_struct_elem_find(fd->filesdna, "UserDef", "short", 
"image_gpubuffer_limit"))
-   user->image_gpubuffer_limit = 10;
+   user->image_gpubuffer_limit = 20;
+   
}
 }
 static void do_versions(FileData *fd, Library *lib, Main *main)
@@ -8974,13 +8985,13 @@
} FOREACH_NODETREE_END
}
 
-   if (!MAIN_VERSION_ATLEAST(main, 266, 2)) {
+   if (MAIN_VERSION_OLDER(main, 266, 2)) {
FOREACH_NODETREE(main, ntree, id) {
do_versions_nodetree_customnodes(ntree, ((ID *)ntree == 
id));
} FOREACH_NODETREE_END
}
 
-   if (!MAIN_VERSION_ATLEAST(main, 266, 2)) {
+   if (MAIN_VERSION_OLDER(main, 266, 2)) {
bScreen *sc;
for (sc= main->screen.first; sc; sc= sc->id.next) {
ScrArea *sa;
@@ -9028,13 +9039,13 @@

/* Only add interface nodes once.
 * In old Blender versions they will be removed 
automatically due to undefined type */
-   if (!MAIN_VERSION_ATLEAST(main, 266, 2))
+   if (MAIN_VERSION_OLDER(main, 266, 2))
ntree->flag |= 
NTREE_DO_VERSIONS_CUSTOMNODES_GROUP_CREATE_INTERFACE;
}
FOREACH_NODETREE_END
}
 
-   if (!MAIN_VERSION_ATLEAST(main, 266, 3)) {
+   if (MAIN_VERSION_OLDER(main, 266, 3)) {
{
/* Fix for a very old issue:
 * Node names were nominally made unique in r24478 
(2.50.8), but the do_versions check

___
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 [55515] trunk/blender/intern/ghost/intern: OSX feature:

2013-03-22 Thread Ton Roosendaal
Revision: 55515
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55515
Author:   ton
Date: 2013-03-22 16:11:00 + (Fri, 22 Mar 2013)
Log Message:
---
OSX feature:

Blender now supports the 10.7+ "Full screen" mode, which pushes a window to a 
permanent
other "screen", with animated zoom and sliding.

Available via the icon in window header (right), Apple+F, or "Window" menu in 
top.

Works much nicer than Blender's own "full screen" option.

Todo: the zoom effect is still draws a bit ugly, because Blender doesn't have 
"live resize"
yet.

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===
--- trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm  2013-03-22 
15:47:02 UTC (rev 55514)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm  2013-03-22 
16:11:00 UTC (rev 55515)
@@ -500,6 +500,7 @@
 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication 
*)sender;
 - (void)applicationWillTerminate:(NSNotification *)aNotification;
 - (void)applicationWillBecomeActive:(NSNotification *)aNotification;
+- (void)toggleFullScreen:(NSNotification *)notification;
 @end
 
 @implementation CocoaAppDelegate : NSObject
@@ -536,10 +537,16 @@
 {
systemCocoa->handleApplicationBecomeActiveEvent();
 }
+
+- (void)toggleFullScreen:(NSNotification *)notification
+{
+}
+
 @end
 
 
 
+
 #pragma mark initialization/finalization
 
 const char *user_locale; // Global current user locale
@@ -655,6 +662,11 @@

[windowMenu addItemWithTitle:@"Zoom" 
action:@selector(performZoom:) keyEquivalent:@""];

+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+   menuItem = [windowMenu addItemWithTitle:@"Enter 
Full Screen" action:@selector(toggleFullScreen:) keyEquivalent:@"f" ];
+   [menuItem 
setKeyEquivalentModifierMask:NSCommandKeyMask];
+#endif
+
menuItem = [windowMenu 
addItemWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"];
[menuItem 
setKeyEquivalentModifierMask:NSCommandKeyMask];


Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2013-03-22 
15:47:02 UTC (rev 55514)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm  2013-03-22 
16:11:00 UTC (rev 55515)
@@ -622,7 +622,12 @@

[m_window registerForDraggedTypes:[NSArray 
arrayWithObjects:NSFilenamesPboardType,

  NSStringPboardType, NSTIFFPboardType, nil]];
-   
  
+   
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+   [NSApp setPresentationOptions:(NSApplicationPresentationFullScreen)];
+   [m_window 
setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
+#endif
+   
if (state == GHOST_kWindowStateFullScreen)
setState(GHOST_kWindowStateFullScreen);


___
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 [55504] trunk/blender/source/blender/ editors/space_text/space_text.c: Bug fix #34405

2013-03-22 Thread Ton Roosendaal
Revision: 55504
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55504
Author:   ton
Date: 2013-03-22 12:00:29 + (Fri, 22 Mar 2013)
Log Message:
---
Bug fix #34405

On opening a text editor for first time, and use search (CTRL+F) the scrollers 
were not
correct initialized, so the view would jump a bit on redraw.

Modified Paths:
--
trunk/blender/source/blender/editors/space_text/space_text.c

Modified: trunk/blender/source/blender/editors/space_text/space_text.c
===
--- trunk/blender/source/blender/editors/space_text/space_text.c
2013-03-22 11:14:04 UTC (rev 55503)
+++ trunk/blender/source/blender/editors/space_text/space_text.c
2013-03-22 12:00:29 UTC (rev 55504)
@@ -504,10 +504,13 @@
 {
wmKeyMap *keymap;
 
+   ar->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE;
+   ED_region_panels_init(wm, ar);
+
+   /* own keymaps */
keymap = WM_keymap_find(wm->defaultconf, "Text Generic", SPACE_TEXT, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, 
&ar->winrct);
 
-   ED_region_panels_init(wm, ar);
 }
 
 static void text_properties_area_draw(const bContext *C, ARegion *ar)

___
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 [55503] trunk/blender/source/blender/ blenloader/intern/readfile.c: Bug fix #34726

2013-03-22 Thread Ton Roosendaal
Revision: 55503
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55503
Author:   ton
Date: 2013-03-22 11:14:04 + (Fri, 22 Mar 2013)
Log Message:
---
Bug fix #34726

Appending a group (which adds all object members to scene), didn't follow the
setting "In active layer".

One note: only the scene layers are copied over, not local view3d layers.

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2013-03-22 
10:34:52 UTC (rev 55502)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2013-03-22 
11:14:04 UTC (rev 55503)
@@ -10291,7 +10291,7 @@
return 0;
 }
 
-static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, 
const short idcode, const short is_link)
+static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, 
const short idcode, const short is_link, const short active_lay)
 {
Object *ob;
Base *base;
@@ -10335,6 +10335,9 @@
if (do_it) {
base = MEM_callocN(sizeof(Base), 
"add_ext_base");
BLI_addtail(&sce->base, base);
+   
+   if (active_lay) ob->lay = sce->lay;
+   
base->lay = ob->lay;
base->object = ob;
base->flag = ob->flag;
@@ -10593,7 +10596,7 @@
/* don't instance anything when linking in 
scenes, assume the scene its self instances the data */
}
else {
-   give_base_to_objects(mainvar, scene, curlib, 
idcode, is_link);
+   give_base_to_objects(mainvar, scene, curlib, 
idcode, is_link, flag & FILE_ACTIVELAY);

if (flag & FILE_GROUP_INSTANCE) {
give_base_to_groups(mainvar, scene);

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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55462] trunk/blender/source/blender/ editors/space_view3d/view3d_draw.c: Bug fix #34713

2013-03-21 Thread Ton Roosendaal
Revision: 55462
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55462
Author:   ton
Date: 2013-03-21 11:48:13 + (Thu, 21 Mar 2013)
Log Message:
---
Bug fix #34713

Using MultiSample, the code that inspects Z buffer values fail, like for grease 
pencil
drawing on "Surface".

It appears to me that all this depth draw/read code is ignoring gpu offscreen 
entirely.
This should be confirmed by Campbell though :)

I'm also quite unsure why this code exists, related to other tools that use
depth too (particles, sculpt). Good to mark down for our viewport recode.

Modified Paths:
--
trunk/blender/source/blender/editors/space_view3d/view3d_draw.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
===
--- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 
2013-03-21 11:14:53 UTC (rev 55461)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 
2013-03-21 11:48:13 UTC (rev 55462)
@@ -1433,6 +1433,13 @@
}
 }
 
+/* XXX depth reading exception, for code not using gpu offscreen */
+static void view3d_opengl_read_Z_pixels(ARegion *ar, int x, int y, int w, int 
h, int format, int type, void *data)
+{
+
+   glReadPixels(ar->winrct.xmin + x, ar->winrct.ymin + y, w, h, format, 
type, data);
+}
+
 void view3d_validate_backbuf(ViewContext *vc)
 {
if (vc->v3d->flag & V3D_INVALID_BACKBUF)
@@ -2104,6 +2111,7 @@
draw_dupli_objects_color(scene, ar, v3d, base, color);
 }
 
+/* XXX warning, not using gpu offscreen here */
 void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect)
 {
int x, y, w, h;
@@ -2153,7 +2161,8 @@
}
 
if (d->damaged) {
-   view3d_opengl_read_pixels(ar, d->x, d->y, d->w, d->h, 
GL_DEPTH_COMPONENT, GL_FLOAT, d->depths);
+   /* XXX using special function here, it doesn't use the gpu 
offscreen system */
+   view3d_opengl_read_Z_pixels(ar, d->x, d->y, d->w, d->h, 
GL_DEPTH_COMPONENT, GL_FLOAT, d->depths);
glGetDoublev(GL_DEPTH_RANGE, d->depth_range);
d->damaged = false;
}

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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55446] trunk/blender/source/blender/ editors/space_node/drawnode.c: Small fix: make node backdrop draw with nearest-pixel filter, so it zooms in

2013-03-20 Thread Ton Roosendaal
Revision: 55446
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55446
Author:   ton
Date: 2013-03-20 16:30:48 + (Wed, 20 Mar 2013)
Log Message:
---
Small fix: make node backdrop draw with nearest-pixel filter, so it zooms in 
showing pixels. Issue was it also blurred image at zoom level 1... maybe 
subpixel
issue. Anyway - for inspecting exact composite results, zooming in showing 
pixels
is nicer anyway.

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  2013-03-20 
16:03:34 UTC (rev 55445)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2013-03-20 
16:30:48 UTC (rev 55446)
@@ -2964,7 +2964,7 @@
glBlendFunc(GL_SRC_ALPHA, 
GL_ONE_MINUS_SRC_ALPHA);
glPixelZoom(snode->zoom, snode->zoom);

-   glaDrawPixelsAuto(x, y, ibuf->x, 
ibuf->y, GL_UNSIGNED_BYTE, GL_LINEAR, display_buffer);
+   glaDrawPixelsAuto(x, y, ibuf->x, 
ibuf->y, GL_UNSIGNED_BYTE, GL_NEAREST, display_buffer);

glPixelZoom(1.0f, 1.0f);
glDisable(GL_BLEND);
@@ -2972,7 +2972,7 @@
else {
glPixelZoom(snode->zoom, snode->zoom);
 
-   glaDrawPixelsAuto(x, y, ibuf->x, 
ibuf->y, GL_UNSIGNED_BYTE, GL_LINEAR, display_buffer);
+   glaDrawPixelsAuto(x, y, ibuf->x, 
ibuf->y, GL_UNSIGNED_BYTE, GL_NEAREST, display_buffer);

glPixelZoom(1.0f, 1.0f);
}

___
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 [55438] trunk/blender/CMakeLists.txt: Make Blender compile again normal again with gcc 4.2

2013-03-20 Thread Ton Roosendaal
Revision: 55438
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55438
Author:   ton
Date: 2013-03-20 12:34:20 + (Wed, 20 Mar 2013)
Log Message:
---
Make Blender compile again normal again with gcc 4.2

-Wredundant-decls is giving 1000s of lines of warnings for every file...

Modified Paths:
--
trunk/blender/CMakeLists.txt

Modified: trunk/blender/CMakeLists.txt
===
--- trunk/blender/CMakeLists.txt2013-03-20 10:06:28 UTC (rev 55437)
+++ trunk/blender/CMakeLists.txt2013-03-20 12:34:20 UTC (rev 55438)
@@ -1953,7 +1953,7 @@
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_INIT_SELF 
-Winit-self)  # needs -Wuninitialized
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS 
-Wmissing-include-dirs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO 
-Wno-div-by-zero)
-   ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS 
-Wredundant-decls)
+   # ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_REDUNDANT_DECLS 
-Wredundant-decls)
 
# gcc 4.2 gives annoying warnings on every file with this
if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")

___
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 [55379] trunk/blender/source/blender/ editors/interface/interface_widgets.c: UI fix: drawing disabled buttons now draw OK in all cases.

2013-03-18 Thread Ton Roosendaal
Revision: 55379
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55379
Author:   ton
Date: 2013-03-18 18:29:22 + (Mon, 18 Mar 2013)
Log Message:
---
UI fix: drawing disabled buttons now draw OK in all cases.

The old 2.5 code was just drawing a blended rect over buttons, which looks bad
in cases the backdrop is undefined. 

Now widget drawing code just draws everything half transparent. Much nicer!
Time for textured backdrops? ;)

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_widgets.c

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-03-18 18:27:28 UTC (rev 55378)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2013-03-18 18:29:22 UTC (rev 55379)
@@ -767,7 +767,7 @@
const unsigned char tcol[4] = {wcol->outline[0],
   wcol->outline[1],
   wcol->outline[2],
-  UCHAR_MAX / WIDGET_AA_JITTER};
+  wcol->outline[3] / 
WIDGET_AA_JITTER};
 
widget_verts_to_quad_strip(wtb, wtb->totvert, quad_strip);
 
@@ -1184,7 +1184,7 @@

but->drawstr[selend_tmp] = ch;
 
-   glColor3ubv((unsigned char *)wcol->item);
+   glColor4ubv((unsigned char *)wcol->item);
glRects(rect->xmin + selsta_draw, rect->ymin + 
2, rect->xmin + selwidth_draw, rect->ymax - 2);
}
}
@@ -1224,7 +1224,7 @@
}
}

-   glColor3ubv((unsigned char *)wcol->text);
+   glColor4ubv((unsigned char *)wcol->text);
 
uiStyleFontDrawExt(fstyle, rect, but->drawstr + but->ofs, &font_xofs, 
&font_yofs);
 
@@ -1272,6 +1272,7 @@
 /* draws text and icons for buttons */
 static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, 
uiBut *but, rcti *rect)
 {
+   float alpha = (float)wcol->text[3] / 255.0;
char password_str[UI_MAX_DRAW_STR];
 
if (but == NULL)
@@ -1311,12 +1312,12 @@
dualset = UI_BITBUT_TEST(*(((int *)but->poin) + 
1), but->bitnr);
}
 
-   widget_draw_icon(but, ICON_DOT, dualset ? 1.0f : 0.25f, 
rect);
+   widget_draw_icon(but, ICON_DOT, dualset ? alpha : 
0.25f, rect);
}
else if (but->type == MENU && (but->flag & UI_BUT_NODE_LINK)) {
int tmp = rect->xmin;
rect->xmin = rect->xmax - BLI_rcti_size_y(rect) - 1;
-   widget_draw_icon(but, ICON_LAYER_USED, 1.0f, rect);
+   widget_draw_icon(but, ICON_LAYER_USED, alpha, rect);
rect->xmin = tmp;
}
 
@@ -1324,7 +1325,7 @@
 * and offset the text label to accommodate it */
 
if (but->flag & UI_HAS_ICON) {
-   widget_draw_icon(but, but->icon + but->iconadd, 1.0f, 
rect);
+   widget_draw_icon(but, but->icon + but->iconadd, alpha, 
rect);

/* icons default draw 0.8f x height */
rect->xmin += (int)(0.8f * BLI_rcti_size_y(rect));
@@ -1342,7 +1343,7 @@
rcti temp = *rect;

temp.xmin = temp.xmax - BLI_rcti_size_y(rect);
-   widget_draw_icon(but, ICON_X, 1.0f, &temp);
+   widget_draw_icon(but, ICON_X, alpha, &temp);
}
 
/* always draw text for textbutton cursor */
@@ -1379,12 +1380,12 @@
 };
 
 /* uiWidgetColors
- * float outline[3];
- * float inner[4];
- * float inner_sel[4];
- * float item[3];
- * float text[3];
- * float text_sel[3];
+ * char outline[3];
+ * char inner[4];
+ * char inner_sel[4];
+ * char item[3];
+ * char text[3];
+ * char text_sel[3];
  * 
  * short shaded;
  * float shadetop, shadedown;
@@ -2873,12 +2874,7 @@
round_box_edges(&wtb, roundboxalign, rect, rad);

widgetbase_draw(&wtb, wcol);
-   
-   /* store the box bg as gl clearcolor, to retrieve later when drawing 
semi-transparent rects
-* over the top to indicate disabled buttons */
-   /* XXX, this doesnt work right since the color applies to buttons 
outside the box too. */
-   glClearColor(wcol->inner[0] / 255.0, wcol->inner[1] / 255.0, 
wcol->inner[2] / 255.0, 1.0);
-   
+   
copy_v3_v3_char(wcol->inner, old_col);
 }
 
@@ -

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55370] trunk/blender/source/blender/ editors/interface/interface_handlers.c: Bug fix, irc:

2013-03-18 Thread Ton Roosendaal
Revision: 55370
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55370
Author:   ton
Date: 2013-03-18 13:57:47 + (Mon, 18 Mar 2013)
Log Message:
---
Bug fix, irc:

Curves widget error: after deleting a point, and click to add a new point, on 
dragging
it the point flipped up 20 pixels. Was caused by changed layout and region view 
matrix.

Solved by storing actual mousecoords instead of mapped ones.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-18 12:16:19 UTC (rev 55369)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2013-03-18 13:57:47 UTC (rev 55370)
@@ -4158,20 +4158,27 @@
return WM_UI_HANDLER_CONTINUE;
 }
 
-static int ui_numedit_but_CURVE(uiBut *but, uiHandleButtonData *data, int snap,
-float mx, float my, const short shift)
+static int ui_numedit_but_CURVE(uiBlock *block, uiBut *but, uiHandleButtonData 
*data, int snap,
+int evtx, int evty, const short shift)
 {
CurveMapping *cumap = (CurveMapping *)but->poin;
CurveMap *cuma = cumap->cm + cumap->cur;
CurveMapPoint *cmp = cuma->curve;
-   float fx, fy, zoomx, zoomy /*, offsx, offsy */ /* UNUSED */;
+   float fx, fy, zoomx, zoomy;
+   int mx, my, dragx, dragy;
int a, changed = 0;
 
+   /* evtx evty and drag coords are absolute mousecoords, prevents errors 
when editing when layout changes */
+   mx = evtx;
+   my = evty;
+   ui_window_to_block(data->region, block, &mx, &my);
+   dragx = data->draglastx;
+   dragy = data->draglasty;
+   ui_window_to_block(data->region, block, &dragx, &dragy);
+   
zoomx = BLI_rctf_size_x(&but->rect) / BLI_rctf_size_x(&cumap->curr);
zoomy = BLI_rctf_size_y(&but->rect) / BLI_rctf_size_y(&cumap->curr);
-   /* offsx = cumap->curr.xmin; */
-   /* offsy = cumap->curr.ymin; */
-
+   
if (snap) {
float d[2];
 
@@ -4187,8 +4194,8 @@
const float mval_factor = ui_mouse_scale_warp_factor(shift);
int moved_point = 0; /* for ctrl grid, can't use orig 
coords because of sorting */
 
-   fx = (mx - data->draglastx) / zoomx;
-   fy = (my - data->draglasty) / zoomy;
+   fx = (mx - dragx) / zoomx;
+   fy = (my - dragy) / zoomy;
 
fx *= mval_factor;
fy *= mval_factor;
@@ -4212,8 +4219,8 @@
curvemapping_changed(cumap, FALSE);

if (moved_point) {
-   data->draglastx = mx;
-   data->draglasty = my;
+   data->draglastx = evtx;
+   data->draglasty = evty;
changed = 1;
 
 #ifdef USE_CONT_MOUSE_CORRECT
@@ -4232,8 +4239,8 @@
data->dragchange = 1; /* mark for selection */
}
else {
-   fx = (mx - data->draglastx) / zoomx;
-   fy = (my - data->draglasty) / zoomy;
+   fx = (mx - dragx) / zoomx;
+   fy = (my - dragy) / zoomy;

/* clamp for clip */
if (cumap->flag & CUMA_DO_CLIP) {
@@ -4252,8 +4259,8 @@
cumap->curr.xmax -= fx;
cumap->curr.ymax -= fy;

-   data->draglastx = mx;
-   data->draglasty = my;
+   data->draglastx = evtx;
+   data->draglasty = evty;
 
changed = 1;
}
@@ -4268,7 +4275,7 @@
mx = event->x;
my = event->y;
ui_window_to_block(data->region, block, &mx, &my);
-
+   
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (event->type == LEFTMOUSE && event->val == KM_PRESS) {
CurveMapping *cumap = (CurveMapping *)but->poin;
@@ -4358,20 +4365,21 @@
}
 
data->dragsel = sel;
+   
+   data->dragstartx = event->x;
+   data->dragstarty = event->y;
+   data->draglastx = event->x;
+   data->draglasty = event->y;
 
-   data->dragstartx = mx;
-   data->dragstarty = my;
-   data->draglastx = mx;
-   data->draglasty = my;
-
button_activate_state(C, but, BUTTON_STATE_NUM_EDITING);
return WM_UI_HANDLER_BREAK;
}
}
else if (data->state == BUTTON_STATE_NUM_EDITING) {
if (event->type == MOUSEMOVE) {
-

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55369] trunk/blender/source/blender/ windowmanager/intern/wm_operators.c: Just added a comment:

2013-03-18 Thread Ton Roosendaal
Revision: 55369
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55369
Author:   ton
Date: 2013-03-18 12:16:19 + (Mon, 18 Mar 2013)
Log Message:
---
Just added a comment:

To make circle select allow pass-through for view events, several issues have 
to be
tackled. 
 1) other modal ops run on top (border select), 
 2) middlemouse is used now 
 3) and what for tablet/trackpad or people without middlemouse?

The MMB deselection for border/circle is not optimal now... needs rethinking 
this.

Better would be to check on non-persistant-modality for circle, to start with 
gesture style
event like lasso or border can do now.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2013-03-18 11:44:56 UTC (rev 55368)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c
2013-03-18 12:16:19 UTC (rev 55369)
@@ -2830,7 +2830,8 @@
return OPERATOR_FINISHED; /* use finish or we 
don't get an undo */
}
}
-// /* Allow view navigation??? */
+   /* Allow view navigation??? */
+   /* note, this gives issues: 1) other modal ops run on top (border 
select), 2) middlemouse is used now 3) tablet/trackpad? */
 // else {
 // return OPERATOR_PASS_THROUGH;
 // }

___
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 [55366] trunk/blender/release/scripts/ startup/bl_ui/space_userpref.py: Forgot to commit the button to set memory limit for using GPU Images...

2013-03-18 Thread Ton Roosendaal
Revision: 55366
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55366
Author:   ton
Date: 2013-03-18 09:05:15 + (Mon, 18 Mar 2013)
Log Message:
---
Forgot to commit the button to set memory limit for using GPU Images...

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_userpref.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref.py   
2013-03-18 00:48:59 UTC (rev 55365)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref.py   
2013-03-18 09:05:15 UTC (rev 55366)
@@ -480,6 +480,10 @@
 col.prop(system, "texture_collection_rate", text="Collection Rate")
 
 col.separator()
+
+col.label(text="Images:")
+col.prop(system, "image_gpubuffer_limit")
+
 col.separator()
 col.separator()
 

___
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 [55357] trunk/blender/source/blender: Fix for "draw images as texture"

2013-03-17 Thread Ton Roosendaal
Revision: 55357
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55357
Author:   ton
Date: 2013-03-17 17:32:45 + (Sun, 17 Mar 2013)
Log Message:
---
Fix for "draw images as texture"

Zooming in on images in Image window now shows pixels again (was filtered).

Now the glaDrawPixelsTex() and glaDrawPixelsAuto() have an argument to 
define if images should zoom in with linear filter, or draw pixels.

Modified Paths:
--
trunk/blender/source/blender/editors/include/BIF_glutil.h
trunk/blender/source/blender/editors/interface/interface_draw.c
trunk/blender/source/blender/editors/screen/glutil.c
trunk/blender/source/blender/editors/space_file/file_draw.c
trunk/blender/source/blender/editors/space_image/image_draw.c
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/editors/space_node/node_draw.c
trunk/blender/source/blender/editors/space_view3d/drawobject.c
trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
trunk/blender/source/blender/windowmanager/intern/wm_dragdrop.c

Modified: trunk/blender/source/blender/editors/include/BIF_glutil.h
===
--- trunk/blender/source/blender/editors/include/BIF_glutil.h   2013-03-17 
16:54:06 UTC (rev 55356)
+++ trunk/blender/source/blender/editors/include/BIF_glutil.h   2013-03-17 
17:32:45 UTC (rev 55357)
@@ -141,17 +141,17 @@
  * 1-to-1 mapping to screen space.
  */
 
-void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void 
*rect);
+void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, int 
zoomfilter, void *rect);
 
 /**
  * glaDrawPixelsAuto - Switches between texture or pixel drawing using UserDef.
  * only RGBA
  * needs glaDefine2DArea to be set.
  */
-void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format, 
void *rect);
+void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format, int 
zoomfilter, void *rect);
 
 
-void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int 
format, void *rect, float scaleX, float scaleY);
+void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int 
format, int zoomfilter, void *rect, float scaleX, float scaleY);
 
 /* 2D Drawing Assistance */
 

Modified: trunk/blender/source/blender/editors/interface/interface_draw.c
===
--- trunk/blender/source/blender/editors/interface/interface_draw.c 
2013-03-17 16:54:06 UTC (rev 55356)
+++ trunk/blender/source/blender/editors/interface/interface_draw.c 
2013-03-17 17:32:45 UTC (rev 55357)
@@ -453,8 +453,7 @@
float facy = (float)h / (float)ibuf->y;
glPixelZoom(facx, facy);
}
-   glaDrawPixelsSafe((float)rect->xmin, (float)rect->ymin, ibuf->x, 
ibuf->y, ibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
-   //glaDrawPixelsTex((float)rect->xmin, (float)rect->ymin, ibuf->x, 
ibuf->y, GL_UNSIGNED_BYTE, ibuf->rect);
+   glaDrawPixelsAuto((float)rect->xmin, (float)rect->ymin, ibuf->x, 
ibuf->y, GL_UNSIGNED_BYTE, GL_NEAREST, ibuf->rect);

glPixelZoom(1.0f, 1.0f);


Modified: trunk/blender/source/blender/editors/screen/glutil.c
===
--- trunk/blender/source/blender/editors/screen/glutil.c2013-03-17 
16:54:06 UTC (rev 55356)
+++ trunk/blender/source/blender/editors/screen/glutil.c2013-03-17 
17:32:45 UTC (rev 55357)
@@ -482,7 +482,7 @@
return texid;
 }
 
-void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int 
format, void *rect, float scaleX, float scaleY)
+void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int 
format, int zoomfilter, void *rect, float scaleX, float scaleY)
 {
unsigned char *uc_rect = (unsigned char *) rect;
float *f_rect = (float *)rect;
@@ -503,6 +503,7 @@
/* don't want nasty border artifacts */
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, zoomfilter);
 
 #ifdef __APPLE__
/* workaround for os x 10.5/10.6 driver bug: 
http://lists.apple.com/archives/Mac-opengl/2008/Jul/msg00117.html */
@@ -585,9 +586,9 @@
 #endif
 }
 
-void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void 
*rect)
+void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, int 
zoomfilter, void *rect)
 {
-   glaDrawPixelsTexScaled(x, y, img_w, img_h, format, rect, 1.0f, 1.0f);
+   glaDrawPixelsTexScaled(x, y, img_w, img_h, format, zoomfilter, rect, 
1.0f, 1.0f);
 }
 
 void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int 
format, int type, void *rect)
@@ -670,7 +671,7 @@
 }
 

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

2013-03-17 Thread Ton Roosendaal
Revision: 55356
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55356
Author:   ton
Date: 2013-03-17 16:54:06 + (Sun, 17 Mar 2013)
Log Message:
---
Feature:

Image Editor and 3D view background image now use new automatic switching for
drawing GPU texture or OpenGL DrawPixels too. For large zoomed images
it gives massive speedup.

Modified Paths:
--
trunk/blender/source/blender/editors/space_image/image_draw.c
trunk/blender/source/blender/editors/space_view3d/view3d_draw.c

Modified: trunk/blender/source/blender/editors/space_image/image_draw.c
===
--- trunk/blender/source/blender/editors/space_image/image_draw.c   
2013-03-17 16:53:35 UTC (rev 55355)
+++ trunk/blender/source/blender/editors/space_image/image_draw.c   
2013-03-17 16:54:06 UTC (rev 55356)
@@ -491,6 +491,8 @@
/* set zoom */
glPixelZoom(zoomx, zoomy);
 
+   glaDefine2DArea(&ar->winrct);
+   
/* find window pixel coordinates of origin */
UI_view2d_to_region_no_clip(&ar->v2d, fx, fy, &x, &y);
 
@@ -523,11 +525,7 @@
display_buffer = IMB_display_buffer_acquire_ctx(C, ibuf, 
&cache_handle);
 
if (display_buffer)
-   glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, 
GL_RGBA, GL_UNSIGNED_BYTE, display_buffer);
-#if 0
-   else
-   glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, 
GL_RGBA, GL_FLOAT, ibuf->rect_float);
-#endif
+   glaDrawPixelsAuto(x, y, ibuf->x, ibuf->y, 
GL_UNSIGNED_BYTE, display_buffer);
 
IMB_display_buffer_release(cache_handle);
 

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
===
--- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 
2013-03-17 16:53:35 UTC (rev 55355)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 
2013-03-17 16:54:06 UTC (rev 55356)
@@ -1819,7 +1819,7 @@
 
glPixelZoom(zoomx, zoomy);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f - bgpic->blend);
-   glaDrawPixelsTex(x1, y1, ibuf->x, ibuf->y, 
GL_UNSIGNED_BYTE, ibuf->rect);
+   glaDrawPixelsAuto(x1, y1, ibuf->x, ibuf->y, 
GL_UNSIGNED_BYTE, ibuf->rect);
 
glPixelZoom(1.0, 1.0);
glPixelTransferf(GL_ALPHA_SCALE, 1.0f);

___
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 [55354] trunk/blender/source/blender: New feature:

2013-03-17 Thread Ton Roosendaal
Revision: 55354
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55354
Author:   ton
Date: 2013-03-17 14:38:58 + (Sun, 17 Mar 2013)
Log Message:
---
New feature:

Automatic switching for drawing pixel buffers via glDrawPixels or using GPU 
textures

It works with a User Preference limit, in megapixels, to define whether to use
GPU or direct pixel drawing. Default is now initialized to 10 MP (4k buffers).

Especially for zooming out (draw smaller) texture drawing is much smaller. Also
Nvidia cards typically draw much faster with textures in general.

Added to node backdrop first now, the other editors follow in a next commit.

For coders: added new DNA function to initialize new struct variables, so you
don't have to sub-version files anymore.

   DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname") 

"filesdna" is the sdna description of the current file being versioned.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_main.h
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/editors/include/BIF_glutil.h
trunk/blender/source/blender/editors/screen/glutil.c
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/makesdna/DNA_genfile.h
trunk/blender/source/blender/makesdna/DNA_userdef_types.h
trunk/blender/source/blender/makesdna/intern/dna_genfile.c
trunk/blender/source/blender/makesrna/intern/rna_userdef.c

Modified: trunk/blender/source/blender/blenkernel/BKE_main.h
===
--- trunk/blender/source/blender/blenkernel/BKE_main.h  2013-03-17 14:32:50 UTC 
(rev 55353)
+++ trunk/blender/source/blender/blenkernel/BKE_main.h  2013-03-17 14:38:58 UTC 
(rev 55354)
@@ -95,6 +95,10 @@
 #define MAIN_VERSION_ATLEAST(main, ver, subver) \
((main)->versionfile > (ver) || (main->versionfile == (ver) && 
(main)->subversionfile >= (subver)))
 
+#define MAIN_VERSION_OLDER(main, ver, subver) \
+   ((main)->versionfile < (ver) || (main->versionfile == (ver) && 
(main)->subversionfile < (subver)))
+
+   
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2013-03-17 
14:32:50 UTC (rev 55353)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2013-03-17 
14:38:58 UTC (rev 55354)
@@ -7436,6 +7436,21 @@
}
 }
 
+/* initialize userdef with non-UI dependency stuff */
+/* other initializers (such as theme color defaults) go to resources.c */
+static void do_versions_userdef(FileData *fd, BlendFileData *bfd)
+{
+   Main *bmain = bfd->main;
+   UserDef *user = bfd->user;
+   
+   if (user == NULL) return;
+   
+   if (bmain->versionfile < 267) {
+   
+   if (!DNA_struct_elem_find(fd->filesdna, "UserDef", "short", 
"image_gpubuffer_limit"))
+   user->image_gpubuffer_limit = 10;
+   }
+}
 
 static void do_versions(FileData *fd, Library *lib, Main *main)
 {
@@ -8772,14 +8787,14 @@
}
}
 
-   if (!MAIN_VERSION_ATLEAST(main, 265, 8)) {
+   if (MAIN_VERSION_OLDER(main, 265, 9)) {
Mesh *me;
for (me = main->mesh.first; me; me = me->id.next) {
BKE_mesh_do_versions_cd_flag_init(me);
}
}
 
-   if (!MAIN_VERSION_ATLEAST(main, 265, 9)) {
+   if (MAIN_VERSION_OLDER(main, 265, 10)) {
Brush *br;
for (br = main->brush.first; br; br = br->id.next) {
if (br->ob_mode & OB_MODE_TEXTURE_PAINT) {
@@ -8789,7 +8804,7 @@
}
 
// add storage for compositor translate nodes when not existing
-   if (!MAIN_VERSION_ATLEAST(main, 265, 10)) {
+   if (MAIN_VERSION_OLDER(main, 265, 11)) {
bNodeTreeType *ntreetype;
bNodeTree *ntree;
 
@@ -8801,10 +8816,19 @@
do_version_node_fix_translate_wrapping(NULL, NULL, 
ntree);
}
 
-   // if (main->versionfile < 265 || (main->versionfile == 265 && 
main->subversionfile < 7)) {
-
+   if (main->versionfile < 267) {
+   
+   /* TIP: to initialize new variables added, use the new function
+  DNA_struct_elem_find(fd->filesdna, "structname", "typename", 
"varname")
+  example: 
+   if (!DNA_struct_elem_find(fd->filesdna, 
"UserDef", "short", "image_gpubuffer_limit"))
+   user->image_gpubuffer_limit = 10;
+*/
+   
+   }
+   
/* WATCH IT!!!: pointers from libdata have not been converted yet here! 
*/
-   /* WATCH IT 2!: Userdef struct init has to be in 
editors/interface/res

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55341] trunk/blender/source/blender/ editors/mesh: Bug fix, irc reported:

2013-03-16 Thread Ton Roosendaal
Revision: 55341
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55341
Author:   ton
Date: 2013-03-16 17:12:39 + (Sat, 16 Mar 2013)
Log Message:
---
Bug fix, irc reported:

Using new off-screen backbuffer selection failed for Lasso in editmode.

Modified Paths:
--
trunk/blender/source/blender/editors/mesh/CMakeLists.txt
trunk/blender/source/blender/editors/mesh/editmesh_select.c

Modified: trunk/blender/source/blender/editors/mesh/CMakeLists.txt
===
--- trunk/blender/source/blender/editors/mesh/CMakeLists.txt2013-03-16 
16:41:12 UTC (rev 55340)
+++ trunk/blender/source/blender/editors/mesh/CMakeLists.txt2013-03-16 
17:12:39 UTC (rev 55341)
@@ -26,6 +26,7 @@
../../blenlib
../../blenloader
../../bmesh
+   ../../gpu
../../imbuf
../../makesdna
../../makesrna

Modified: trunk/blender/source/blender/editors/mesh/editmesh_select.c
===
--- trunk/blender/source/blender/editors/mesh/editmesh_select.c 2013-03-16 
16:41:12 UTC (rev 55340)
+++ trunk/blender/source/blender/editors/mesh/editmesh_select.c 2013-03-16 
17:12:39 UTC (rev 55341)
@@ -66,6 +66,8 @@
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 
+#include "GPU_extensions.h"
+
 #include "mesh_intern.h"
 
 #include "UI_resources.h"
@@ -253,6 +255,9 @@
 
dr = buf->rect;
 
+   if (vc->rv3d->gpuoffscreen)
+   GPU_offscreen_bind(vc->rv3d->gpuoffscreen);
+   
/* draw the mask */
glDisable(GL_DEPTH_TEST);

@@ -270,6 +275,9 @@

glFinish(); /* to be sure readpixels sees mask */

+   if (vc->rv3d->gpuoffscreen)
+   GPU_offscreen_unbind(vc->rv3d->gpuoffscreen);
+   
/* grab mask */
bufmask = view3d_read_backbuf(vc, xmin, ymin, xmax, ymax);
 

___
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 [55244] trunk/blender/source/blender/ editors/transform/transform.c: Bug fix #34620

2013-03-13 Thread Ton Roosendaal
Revision: 55244
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55244
Author:   ton
Date: 2013-03-13 15:11:45 + (Wed, 13 Mar 2013)
Log Message:
---
Bug fix #34620

SHIFT+T (texture space transform) crashed in editmode. Not checking NULL 
pointer.

Modified Paths:
--
trunk/blender/source/blender/editors/transform/transform.c

Modified: trunk/blender/source/blender/editors/transform/transform.c
===
--- trunk/blender/source/blender/editors/transform/transform.c  2013-03-13 
14:56:17 UTC (rev 55243)
+++ trunk/blender/source/blender/editors/transform/transform.c  2013-03-13 
15:11:45 UTC (rev 55244)
@@ -3583,12 +3583,15 @@
if ((t->flag & T_V3D_ALIGN) == 0) { // align mode doesn't 
rotate objects itself
/* euler or quaternion? */
if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & 
TD_USEQUAT)) {
-   mul_serie_m3(fmat, td->mtx, mat, td->smtx, 
NULL, NULL, NULL, NULL, NULL);
-   mat3_to_quat(quat, fmat);   // Actual transform
-   
-   mul_qt_qtqt(td->ext->quat, quat, 
td->ext->iquat);
-   /* this function works on end result */
-   protectedQuaternionBits(td->protectflag, 
td->ext->quat, td->ext->iquat);
+   /* can be called for texture space translate 
for example, then opt out */
+   if (td->ext->quat) {
+   mul_serie_m3(fmat, td->mtx, mat, 
td->smtx, NULL, NULL, NULL, NULL, NULL);
+   mat3_to_quat(quat, fmat);   // Actual 
transform
+   
+   mul_qt_qtqt(td->ext->quat, quat, 
td->ext->iquat);
+   /* this function works on end result */
+   
protectedQuaternionBits(td->protectflag, td->ext->quat, td->ext->iquat);
+   }
}
else if (td->ext->rotOrder == ROT_MODE_AXISANGLE) {
/* calculate effect based on quats */

___
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 [55163] trunk/blender/source/blender/ editors/screen/area.c: Bugfix #34365

2013-03-10 Thread Ton Roosendaal
Revision: 55163
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55163
Author:   ton
Date: 2013-03-10 14:30:24 + (Sun, 10 Mar 2013)
Log Message:
---
Bugfix #34365

Tiny tweak.

Dragging option (cursor change) for region dividers in editors was having an 
un-even sensitivity hotspot. This conflicted with header buttons for example,
where the hotspot and bottons overlapped.

Now the hotspot is around the region-edge evenly.

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

Modified: trunk/blender/source/blender/editors/screen/area.c
===
--- trunk/blender/source/blender/editors/screen/area.c  2013-03-10 13:37:14 UTC 
(rev 55162)
+++ trunk/blender/source/blender/editors/screen/area.c  2013-03-10 14:30:24 UTC 
(rev 55163)
@@ -590,7 +590,7 @@
BLI_rcti_init(&az->rect, az->x1, az->x2, az->y1, az->y2);
 }
 
-#define AZONEPAD_EDGE   (0.2f * U.widget_unit)
+#define AZONEPAD_EDGE   (0.1f * U.widget_unit)
 #define AZONEPAD_ICON   (0.45f * U.widget_unit)
 static void region_azone_edge(AZone *az, ARegion *ar)
 {
@@ -599,22 +599,22 @@
az->x1 = ar->winrct.xmin;
az->y1 = ar->winrct.ymax - AZONEPAD_EDGE;
az->x2 = ar->winrct.xmax;
-   az->y2 = ar->winrct.ymax;
+   az->y2 = ar->winrct.ymax + AZONEPAD_EDGE;
break;
case AE_BOTTOM_TO_TOPLEFT:
az->x1 = ar->winrct.xmin;
az->y1 = ar->winrct.ymin + AZONEPAD_EDGE;
az->x2 = ar->winrct.xmax;
-   az->y2 = ar->winrct.ymin;
+   az->y2 = ar->winrct.ymin - AZONEPAD_EDGE;
break;
case AE_LEFT_TO_TOPRIGHT:
-   az->x1 = ar->winrct.xmin;
+   az->x1 = ar->winrct.xmin - AZONEPAD_EDGE;
az->y1 = ar->winrct.ymin;
az->x2 = ar->winrct.xmin + AZONEPAD_EDGE;
az->y2 = ar->winrct.ymax;
break;
case AE_RIGHT_TO_TOPLEFT:
-   az->x1 = ar->winrct.xmax;
+   az->x1 = ar->winrct.xmax + AZONEPAD_EDGE;
az->y1 = ar->winrct.ymin;
az->x2 = ar->winrct.xmax - AZONEPAD_EDGE;
az->y2 = ar->winrct.ymax;

___
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 [55159] trunk/blender/release/scripts/ startup/bl_ui/space_userpref.py: Bug report #34573

2013-03-10 Thread Ton Roosendaal
Revision: 55159
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55159
Author:   ton
Date: 2013-03-10 11:42:46 + (Sun, 10 Mar 2013)
Log Message:
---
Bug report #34573

User Preferences, Themes, UI: buttons to define own icon image now draws
greyed out, to show the option isn't working yet.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_userpref.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref.py   
2013-03-10 11:37:27 UTC (rev 55158)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref.py   
2013-03-10 11:42:46 UTC (rev 55159)
@@ -743,6 +743,7 @@
 padding = subsplit.split(percentage=0.15)
 colsub = padding.column()
 colsub = padding.column()
+colsub.active = False
 colsub.row().prop(ui, "icon_file")
 
 subsplit = row.split(percentage=0.85)

___
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 [55138] trunk/blender/source/blender/ windowmanager/intern/wm_playanim.c: Blender Anim player fixes:

2013-03-09 Thread Ton Roosendaal
Revision: 55138
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55138
Author:   ton
Date: 2013-03-09 14:57:06 + (Sat, 09 Mar 2013)
Log Message:
---
Blender Anim player fixes:

- RGBA images (without alpha) now don't draw with alpha blending enabled
- Checkerboard backdrop for alpha images now shows on size of image
- Window always clears now, in very dark grey (so you can see black)
- On resizing window, the aspect of image is being kept, keeping the
  image always visible within the window frame
- Image now centers OK. 
- On pause, playback now halts (it was drawing same image all the time)

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_playanim.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_playanim.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_playanim.c 
2013-03-09 14:42:10 UTC (rev 55137)
+++ trunk/blender/source/blender/windowmanager/intern/wm_playanim.c 
2013-03-09 14:57:06 UTC (rev 55138)
@@ -76,10 +76,16 @@
 #include "WM_api.h"  /* only for WM_main_playanim */
 
 struct PlayState;
-static void playanim_window_zoom(const struct PlayState *ps, const float 
zoom_offset);
+static void playanim_window_zoom(struct PlayState *ps, const float 
zoom_offset);
 
 typedef struct PlayState {
 
+   /* window and viewport size */
+   int win_x, win_y;
+   
+   /* current zoom level */
+   float zoom;
+
/* playback state */
short direction;
short next_frame;
@@ -207,7 +213,6 @@
 
 static struct ListBase picsbase = {NULL, NULL};
 static int fromdisk = FALSE;
-static float zoomx = 1.0, zoomy = 1.0;
 static double ptottime = 0.0, swaptime = 0.04;
 
 static PlayAnimPict *playanim_step(PlayAnimPict *playanim, int step)
@@ -237,8 +242,9 @@
return (ptottime < 0);
 }
 
-static void playanim_toscreen(PlayAnimPict *picture, struct ImBuf *ibuf, int 
fontid, int fstep)
+static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct 
ImBuf *ibuf, int fontid, int fstep)
 {
+   float offsx, offsy;
 
if (ibuf == NULL) {
printf("%s: no ibuf for picture '%s'\n", __func__, picture ? 
picture->name : "");
@@ -253,17 +259,29 @@
 
GHOST_ActivateWindowDrawingContext(g_WS.ghost_window);
 
-   glRasterPos2f(0.0f, 0.0f);
+   /* offset within window */
+   offsx = 0.5f * (((float)ps->win_x - ps->zoom * ibuf->x) / 
(float)ps->win_x);
+   offsy = 0.5f * (((float)ps->win_y - ps->zoom * ibuf->y) / 
(float)ps->win_y);
 
-   glEnable(GL_BLEND);
-   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+   CLAMP(offsx, 0.0f, 1.0f);
+   CLAMP(offsy, 0.0f, 1.0f);
+   glRasterPos2f(offsx, offsy);
 
-   fdrawcheckerboard(0.0f, 0.0f, ibuf->x, ibuf->y);
+   glClearColor(0.1, 0.1, 0.1, 0.0);
+   glClear(GL_COLOR_BUFFER_BIT);
+   
+   /* checkerboard for case alpha */
+   if (ibuf->planes == 32) {
+   glEnable(GL_BLEND);
+   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
+   fdrawcheckerboard(offsx, offsy, offsx + (ps->zoom * ibuf->x) / 
(float)ps->win_x, offsy + (ps->zoom * ibuf->y) / (float)ps->win_y);
+   }
+   
glDrawPixels(ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
 
glDisable(GL_BLEND);
-
+   
pupdate_time();
 
if (picture && (g_WS.qual & (WS_QUAL_SHIFT | WS_QUAL_LMOUSE)) && 
(fontid != -1)) {
@@ -286,7 +304,7 @@
GHOST_SwapWindowBuffers(g_WS.ghost_window);
 }
 
-static void build_pict_list(char *first, int totframes, int fstep, int fontid)
+static void build_pict_list(PlayState *ps, char *first, int totframes, int 
fstep, int fontid)
 {
char *mem, filepath[FILE_MAX];
 // short val;
@@ -302,7 +320,7 @@
int pic;
ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, 
IMB_PROXY_NONE);
if (ibuf) {
-   playanim_toscreen(NULL, ibuf, fontid, fstep);
+   playanim_toscreen(ps, NULL, ibuf, fontid, 
fstep);
IMB_freeImBuf(ibuf);
}
 
@@ -405,7 +423,7 @@
ibuf = IMB_loadiffname(picture->name, 
picture->IB_flags, NULL);
}
if (ibuf) {
-   playanim_toscreen(picture, ibuf, 
fontid, fstep);
+   playanim_toscreen(ps, picture, ibuf, 
fontid, fstep);
IMB_freeImBuf(ibuf);
}
pupdate_time();
@@ -709,28 +727,33 @@
case GHOST_kEventWindowSize:
case GHOST_kEventWindowMove:
{
-   int sizex

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55114] trunk/blender/source/blender/ windowmanager/intern/wm_playanim.c: Feature request:

2013-03-08 Thread Ton Roosendaal
Revision: 55114
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55114
Author:   ton
Date: 2013-03-08 13:03:04 + (Fri, 08 Mar 2013)
Log Message:
---
Feature request:

Blender's anim player (blender -a) now allows drop of image or movie file.
It then restarts itself completely (close window, open new).

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_playanim.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_playanim.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_playanim.c 
2013-03-08 10:59:43 UTC (rev 55113)
+++ trunk/blender/source/blender/windowmanager/intern/wm_playanim.c 
2013-03-08 13:03:04 UTC (rev 55114)
@@ -91,7 +91,7 @@
short wait2;
short stopped;
short go;
-
+   
int fstep;
 
/* current picture */
@@ -103,6 +103,9 @@
 
/* saves passing args */
struct ImBuf *curframe_ibuf;
+   
+   /* restarts player for file drop */
+   char dropped_file[FILE_MAX];
 } PlayState;
 
 /* for debugging */
@@ -735,6 +738,23 @@
ps->go = FALSE;
break;
}
+   case GHOST_kEventDraggingDropDone:
+   {
+   GHOST_TEventDragnDropData *ddd = 
GHOST_GetEventData(evt);
+   
+   if (ddd->dataType == GHOST_kDragnDropTypeFilenames) {
+   GHOST_TStringArray *stra = ddd->data;
+   int a;
+   
+   for (a = 0; a < stra->count; a++) {
+   BLI_strncpy(ps->dropped_file, (char 
*)stra->strings[a], sizeof(ps->dropped_file));
+   ps->go = FALSE;
+   printf("drop file %s\n", 
stra->strings[a]);
+   break; /* only one drop element 
supported now */
+   }
+   }
+   break;
+   }
default:
/* quiet warnings */
break;
@@ -785,12 +805,12 @@
GHOST_SetClientSize(g_WS.ghost_window, sizex, sizey);
 }
 
-void WM_main_playanim(int argc, const char **argv)
+/* return path for restart */
+static char *wm_main_playanim_intern(int argc, const char **argv)
 {
struct ImBuf *ibuf = NULL;
-   char filepath[FILE_MAX];
+   static char filepath[FILE_MAX]; /* abused to return dropped file path */
GHOST_TUns32 maxwinx, maxwiny;
-   /* short c233 = FALSE, yuvx = FALSE; */ /* UNUSED */
int i;
/* This was done to disambiguate the name for use under c++. */
struct anim *anim = NULL;
@@ -798,7 +818,7 @@
int sfra = -1;
int efra = -1;
int totblock;
-
+   
PlayState ps = {0};
 
/* ps.doubleb   = TRUE;*/ /* UNUSED */
@@ -813,6 +833,7 @@
ps.wait2 = FALSE;
ps.stopped   = FALSE;
ps.picture   = NULL;
+   ps.dropped_file[0] = 0;
/* resetmap = FALSE */
 
ps.fstep = 1;
@@ -1142,12 +1163,20 @@
 #else
/* we still miss freeing a lot!,
 * but many areas could skip initialization too for anim play */
-   IMB_exit();
-   BKE_images_exit();
+   
BLF_exit();
 #endif
GHOST_DisposeWindow(g_WS.ghost_system, g_WS.ghost_window);
 
+   /* early exit, IMB and BKE should be exited only in end */
+   if (ps.dropped_file) {
+   BLI_strncpy(filepath, ps.dropped_file, sizeof(filepath));
+   return filepath;
+   }
+   
+   IMB_exit();
+   BKE_images_exit();
+
totblock = MEM_get_memory_blocks_in_use();
if (totblock != 0) {
/* prints many bAKey, bArgument's which are tricky to fix */
@@ -1156,4 +1185,23 @@
MEM_printmemlist();
 #endif
}
+   
+   return NULL;
 }
+
+
+void WM_main_playanim(int argc, const char **argv)
+{
+   int looping = TRUE;
+   
+   while (looping) {
+   char *filepath = wm_main_playanim_intern(argc, argv);
+   
+   if (filepath) { /* use simple args */
+   argv[1] = "-a";
+   argv[2] = filepath;
+   argc = 3;
+   }
+   else looping = 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 [55112] trunk/blender/intern/ghost/intern/ GHOST_Path-api.cpp: Adding include for NULL define in c++

2013-03-08 Thread Ton Roosendaal
Revision: 55112
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55112
Author:   ton
Date: 2013-03-08 09:09:48 + (Fri, 08 Mar 2013)
Log Message:
---
Adding include for NULL define in c++

Modified Paths:
--
trunk/blender/intern/ghost/intern/GHOST_Path-api.cpp

Modified: trunk/blender/intern/ghost/intern/GHOST_Path-api.cpp
===
--- trunk/blender/intern/ghost/intern/GHOST_Path-api.cpp2013-03-08 
08:57:11 UTC (rev 55111)
+++ trunk/blender/intern/ghost/intern/GHOST_Path-api.cpp2013-03-08 
09:09:48 UTC (rev 55112)
@@ -29,6 +29,7 @@
  *  \ingroup GHOST
  */
 
+#include 
 
 #include "intern/GHOST_Debug.h"
 #include "GHOST_Types.h"

___
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 [55097] trunk/blender/source/blender/ editors/gpencil/gpencil_buttons.c: GPencil feature request:

2013-03-07 Thread Ton Roosendaal
Revision: 55097
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55097
Author:   ton
Date: 2013-03-07 18:01:10 + (Thu, 07 Mar 2013)
Log Message:
---
GPencil feature request:

Allow layers to be moved up and down, so you can control drawing order nicer.

Modified Paths:
--
trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c
===
--- trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c  
2013-03-07 17:53:16 UTC (rev 55096)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c  
2013-03-07 18:01:10 UTC (rev 55097)
@@ -86,7 +86,30 @@
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 }
 
+/* move layer up */
+static void gp_ui_layer_up_cb(bContext *C, void *gpd_v, void *gpl_v)
+{
+   bGPdata *gpd = gpd_v;
+   bGPDlayer *gpl = gpl_v;
+   
+   BLI_remlink(&gpd->layers, gpl);
+   BLI_insertlinkbefore(&gpd->layers, gpl->prev, gpl);
+   
+   WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
+}
 
+/* move layer down */
+static void gp_ui_layer_down_cb(bContext *C, void *gpd_v, void *gpl_v)
+{
+   bGPdata *gpd = gpd_v;
+   bGPDlayer *gpl = gpl_v;
+   
+   BLI_remlink(&gpd->layers, gpl);
+   BLI_insertlinkafter(&gpd->layers, gpl->next, gpl);
+   
+   WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
+}
+
 /* --- Drawing Code --- */
 
 /* draw the controls for a given layer */
@@ -174,6 +197,18 @@
/* name */
uiItemR(sub, &ptr, "info", 0, "", ICON_NONE);

+   /* move up/down */
+   if (gpl->prev) {
+   but = uiDefIconBut(block, BUT, 0, ICON_TRIA_UP, 0, 0, 
UI_UNIT_X, UI_UNIT_Y,
+  NULL, 0.0, 0.0, 0.0, 0.0, 
TIP_("Move layer up"));
+   uiButSetFunc(but, gp_ui_layer_up_cb, gpd, gpl);
+   }
+   if (gpl->next) {
+   but = uiDefIconBut(block, BUT, 0, ICON_TRIA_DOWN, 0, 0, 
UI_UNIT_X, UI_UNIT_Y,
+  NULL, 0.0, 0.0, 0.0, 
0.0, TIP_("Move layer down"));
+   uiButSetFunc(but, gp_ui_layer_down_cb, gpd, gpl);
+   }
+   
/* delete 'button' */
uiBlockSetEmboss(block, UI_EMBOSSN);
/* right-align ... */

___
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 [55092] trunk/blender/source/blender/ blenloader/intern/writefile.c: Speedup for Grease Pencil animators.

2013-03-07 Thread Ton Roosendaal
Revision: 55092
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55092
Author:   ton
Date: 2013-03-07 16:57:53 + (Thu, 07 Mar 2013)
Log Message:
---
Speedup for Grease Pencil animators.

Saving and loading gpencil was using different order for the individual list 
items.
On a 120 Mb gpencil project (yes, animators!) loading time went down from 1 
minute 
to a second or two.

Note that this to have effect, you need to save once.

Developer note: check this commit, it uses a new writelist function. You can 
speedup stuff tremendously with keeping saved and read data in sync.

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/writefile.c

Modified: trunk/blender/source/blender/blenloader/intern/writefile.c
===
--- trunk/blender/source/blender/blenloader/intern/writefile.c  2013-03-07 
16:12:36 UTC (rev 55091)
+++ trunk/blender/source/blender/blenloader/intern/writefile.c  2013-03-07 
16:57:53 UTC (rev 55092)
@@ -380,6 +380,17 @@
if (len) mywrite(wd, adr, len);
 }
 
+/* use this to force writing of lists in same order as reading (using 
link_list) */
+static void writelist(WriteData *wd, int filecode, const char *structname, 
ListBase *lb)
+{
+   Link *link = lb->first;
+   
+   while (link) {
+   writestruct(wd, filecode, structname, 1, link);
+   link = link->next;
+   }
+}
+
 /* *** writing some direct data structs used in more code parts 
 */
 /*These functions are used by blender's .blend system for file 
saving/loading.*/
 void IDP_WriteProperty_OnlyData(IDProperty *prop, void *wd);
@@ -2335,16 +2346,16 @@
writestruct(wd, ID_GD, "bGPdata", 1, gpd);

/* write grease-pencil layers to file */
+   writelist(wd, DATA, "bGPDlayer", &gpd->layers);
for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
-   writestruct(wd, DATA, "bGPDlayer", 1, gpl);

/* write this layer's frames to file */
+   writelist(wd, DATA, "bGPDframe", &gpl->frames);
for (gpf= gpl->frames.first; gpf; gpf= 
gpf->next) {
-   writestruct(wd, DATA, "bGPDframe", 1, 
gpf);

/* write strokes */
+   writelist(wd, DATA, "bGPDstroke", 
&gpf->strokes);
for (gps= gpf->strokes.first; gps; gps= 
gps->next) {
-   writestruct(wd, DATA, 
"bGPDstroke", 1, gps);
writestruct(wd, DATA, 
"bGPDspoint", gps->totpoints, gps->points);
}
}

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


  1   2   3   4   5   6   7   8   9   10   >