[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29599] branches/soc-2010-leifandersen: Svn merge: svn merge -r 29372:29598 https://svn.blender.org/svnroot/ bf-blender/trunk/blender/ .
Leif Andersen
leif.a.andersen at gmail.com
Mon Jun 21 23:53:34 CEST 2010
Revision: 29599
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29599
Author: leifandersen
Date: 2010-06-21 23:53:33 +0200 (Mon, 21 Jun 2010)
Log Message:
-----------
Svn merge: svn merge -r 29372:29598 https://svn.blender.org/svnroot/bf-blender/trunk/blender/ .
There was a few conflicts, I accepted theirs full for all of it.
Modified Paths:
--------------
branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemX11.cpp
branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_WindowX11.cpp
branches/soc-2010-leifandersen/release/scripts/io/netrender/master.py
branches/soc-2010-leifandersen/release/scripts/io/netrender/repath.py
branches/soc-2010-leifandersen/release/scripts/modules/bpy_types.py
branches/soc-2010-leifandersen/release/scripts/modules/rna_info.py
branches/soc-2010-leifandersen/release/scripts/ui/properties_physics_softbody.py
branches/soc-2010-leifandersen/release/scripts/ui/space_sequencer.py
branches/soc-2010-leifandersen/release/scripts/ui/space_userpref.py
branches/soc-2010-leifandersen/release/scripts/ui/space_view3d.py
branches/soc-2010-leifandersen/source/blender/blenkernel/BKE_key.h
branches/soc-2010-leifandersen/source/blender/blenkernel/BKE_paint.h
branches/soc-2010-leifandersen/source/blender/blenkernel/BKE_sequencer.h
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/blender.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/collision.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/depsgraph.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/effect.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/image.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/key.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/object.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/particle_system.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/report.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/scene.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/sequencer.c
branches/soc-2010-leifandersen/source/blender/blenkernel/intern/softbody.c
branches/soc-2010-leifandersen/source/blender/blenlib/BLI_pbvh.h
branches/soc-2010-leifandersen/source/blender/blenlib/BLI_rect.h
branches/soc-2010-leifandersen/source/blender/blenlib/BLI_uvproject.h
branches/soc-2010-leifandersen/source/blender/blenlib/intern/path_util.c
branches/soc-2010-leifandersen/source/blender/blenlib/intern/pbvh.c
branches/soc-2010-leifandersen/source/blender/blenlib/intern/rct.c
branches/soc-2010-leifandersen/source/blender/blenlib/intern/uvproject.c
branches/soc-2010-leifandersen/source/blender/blenloader/intern/readfile.c
branches/soc-2010-leifandersen/source/blender/editors/animation/anim_channels_defines.c
branches/soc-2010-leifandersen/source/blender/editors/animation/anim_channels_edit.c
branches/soc-2010-leifandersen/source/blender/editors/animation/fmodifier_ui.c
branches/soc-2010-leifandersen/source/blender/editors/animation/keyframing.c
branches/soc-2010-leifandersen/source/blender/editors/animation/keyingsets.c
branches/soc-2010-leifandersen/source/blender/editors/armature/armature_intern.h
branches/soc-2010-leifandersen/source/blender/editors/armature/armature_ops.c
branches/soc-2010-leifandersen/source/blender/editors/armature/editarmature_sketch.c
branches/soc-2010-leifandersen/source/blender/editors/armature/poselib.c
branches/soc-2010-leifandersen/source/blender/editors/curve/editcurve.c
branches/soc-2010-leifandersen/source/blender/editors/interface/interface_anim.c
branches/soc-2010-leifandersen/source/blender/editors/interface/interface_panel.c
branches/soc-2010-leifandersen/source/blender/editors/interface/interface_regions.c
branches/soc-2010-leifandersen/source/blender/editors/interface/interface_templates.c
branches/soc-2010-leifandersen/source/blender/editors/physics/particle_edit.c
branches/soc-2010-leifandersen/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2010-leifandersen/source/blender/editors/sculpt_paint/sculpt_intern.h
branches/soc-2010-leifandersen/source/blender/editors/space_action/action_edit.c
branches/soc-2010-leifandersen/source/blender/editors/space_action/action_select.c
branches/soc-2010-leifandersen/source/blender/editors/space_action/space_action.c
branches/soc-2010-leifandersen/source/blender/editors/space_buttons/space_buttons.c
branches/soc-2010-leifandersen/source/blender/editors/space_graph/graph_edit.c
branches/soc-2010-leifandersen/source/blender/editors/space_graph/graph_select.c
branches/soc-2010-leifandersen/source/blender/editors/space_graph/space_graph.c
branches/soc-2010-leifandersen/source/blender/editors/space_image/image_buttons.c
branches/soc-2010-leifandersen/source/blender/editors/space_image/image_ops.c
branches/soc-2010-leifandersen/source/blender/editors/space_logic/logic_ops.c
branches/soc-2010-leifandersen/source/blender/editors/space_logic/logic_window.c
branches/soc-2010-leifandersen/source/blender/editors/space_nla/nla_channels.c
branches/soc-2010-leifandersen/source/blender/editors/space_nla/nla_edit.c
branches/soc-2010-leifandersen/source/blender/editors/space_nla/nla_select.c
branches/soc-2010-leifandersen/source/blender/editors/space_node/node_select.c
branches/soc-2010-leifandersen/source/blender/editors/space_outliner/outliner.c
branches/soc-2010-leifandersen/source/blender/editors/space_sequencer/sequencer_add.c
branches/soc-2010-leifandersen/source/blender/editors/space_sequencer/sequencer_draw.c
branches/soc-2010-leifandersen/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2010-leifandersen/source/blender/editors/space_sequencer/sequencer_intern.h
branches/soc-2010-leifandersen/source/blender/editors/space_sequencer/sequencer_ops.c
branches/soc-2010-leifandersen/source/blender/editors/space_sequencer/sequencer_select.c
branches/soc-2010-leifandersen/source/blender/editors/space_sequencer/space_sequencer.c
branches/soc-2010-leifandersen/source/blender/editors/space_text/text_draw.c
branches/soc-2010-leifandersen/source/blender/editors/space_view3d/CMakeLists.txt
branches/soc-2010-leifandersen/source/blender/editors/space_view3d/space_view3d.c
branches/soc-2010-leifandersen/source/blender/editors/space_view3d/view3d_edit.c
branches/soc-2010-leifandersen/source/blender/editors/transform/transform.c
branches/soc-2010-leifandersen/source/blender/editors/transform/transform_conversions.c
branches/soc-2010-leifandersen/source/blender/editors/transform/transform_ops.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_action.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_actuator.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_boid.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_controller.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_fcurve.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_object.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_particle.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_scene.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_sculpt_paint.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_sensor.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2010-leifandersen/source/blender/makesrna/intern/rna_space.c
branches/soc-2010-leifandersen/source/blender/modifiers/intern/MOD_uvproject.c
branches/soc-2010-leifandersen/source/blender/python/doc/sphinx_doc_gen.py
branches/soc-2010-leifandersen/source/blender/render/intern/source/imagetexture.c
branches/soc-2010-leifandersen/source/blender/render/intern/source/rayobject_instance.c
branches/soc-2010-leifandersen/source/blender/windowmanager/WM_types.h
branches/soc-2010-leifandersen/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
branches/soc-2010-leifandersen/source/gameengine/Ketsji/BL_BlenderShader.h
branches/soc-2010-leifandersen/source/gameengine/Ketsji/KX_BlenderMaterial.h
branches/soc-2010-leifandersen/source/gameengine/Ketsji/KX_ObjectActuator.cpp
branches/soc-2010-leifandersen/source/gameengine/Ketsji/KX_Scene.cpp
branches/soc-2010-leifandersen/source/gameengine/Rasterizer/RAS_BucketManager.cpp
branches/soc-2010-leifandersen/source/gameengine/Rasterizer/RAS_BucketManager.h
branches/soc-2010-leifandersen/source/gameengine/VideoTexture/blendVideoTex.cpp
Added Paths:
-----------
branches/soc-2010-leifandersen/release/scripts/modules/blend_render_info.py
Modified: branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-06-21 21:25:54 UTC (rev 29598)
+++ branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-06-21 21:53:33 UTC (rev 29599)
@@ -271,6 +271,8 @@
GHOST_TSuccess GHOST_SystemWin32::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
{
+ if (!GetActiveWindow())
+ return GHOST_kFailure;
return ::SetCursorPos(x, y) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}
Modified: branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemX11.cpp 2010-06-21 21:25:54 UTC (rev 29598)
+++ branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_SystemX11.cpp 2010-06-21 21:53:33 UTC (rev 29599)
@@ -465,7 +465,7 @@
/* could also clamp to screen bounds
* wrap with a window outside the view will fail atm */
- bounds.wrapPoint(x_new, y_new, 2); /* offset of one incase blender is at screen bounds */
+ bounds.wrapPoint(x_new, y_new, 8); /* offset of one incase blender is at screen bounds */
window->getCursorGrabAccum(x_accum, y_accum);
if(x_new != xme.x_root || y_new != xme.y_root) {
Modified: branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_WindowX11.cpp 2010-06-21 21:25:54 UTC (rev 29598)
+++ branches/soc-2010-leifandersen/intern/ghost/intern/GHOST_WindowX11.cpp 2010-06-21 21:53:33 UTC (rev 29599)
@@ -57,6 +57,9 @@
#define MWM_HINTS_DECORATIONS (1L << 1)
+
+// #define GHOST_X11_GRAB
+
/*
* A Client can't change the window property, that is
* the work of the window manager. In case, we send
@@ -1442,7 +1445,9 @@
setWindowCursorVisibility(false);
}
+#ifdef GHOST_X11_GRAB
XGrabPointer(m_display, m_window, False, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
+#endif
}
else {
if (m_cursorGrab==GHOST_kGrabHide) {
@@ -1460,7 +1465,9 @@
/* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */
setCursorGrabAccum(0, 0);
m_cursorGrabBounds.m_l= m_cursorGrabBounds.m_r= -1; /* disable */
+#ifdef GHOST_X11_GRAB
XUngrabPointer(m_display, CurrentTime);
+#endif
}
XFlush(m_display);
Modified: branches/soc-2010-leifandersen/release/scripts/io/netrender/master.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/io/netrender/master.py 2010-06-21 21:25:54 UTC (rev 29598)
+++ branches/soc-2010-leifandersen/release/scripts/io/netrender/master.py 2010-06-21 21:53:33 UTC (rev 29599)
@@ -19,6 +19,7 @@
import sys, os
import http, http.client, http.server, urllib, socket, socketserver, threading
import subprocess, shutil, time, hashlib
+import pickle
import select # for select.error
from netrender.utils import *
@@ -870,15 +871,19 @@
self.send_head(http.client.NO_CONTENT)
class RenderMasterServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
- def __init__(self, address, handler_class, path):
+ def __init__(self, address, handler_class, path, subdir=True):
super().__init__(address, handler_class)
self.jobs = []
self.jobs_map = {}
self.slaves = []
self.slaves_map = {}
self.job_id = 0
- self.path = path + "master_" + str(os.getpid()) + os.sep
+ if subdir:
+ self.path = path + "master_" + str(os.getpid()) + os.sep
+ else:
+ self.path = path
+
self.slave_timeout = 5 # 5 mins: need a parameter for that
self.balancer = netrender.balancing.Balancer()
@@ -892,6 +897,22 @@
if not os.path.exists(self.path):
os.mkdir(self.path)
+ def restore(self, jobs, slaves, balancer = None):
+ self.jobs = jobs
+ self.jobs_map = {}
+
+ for job in self.jobs:
+ self.jobs_map[job.id] = job
+ self.job_id = max(self.job_id, int(job.id))
+
+ self.slaves = slaves
+ for slave in self.slaves:
+ self.slaves_map[slave.id] = slave
+
+ if balancer:
+ self.balancer = balancer
+
+
def nextJobID(self):
self.job_id += 1
return str(self.job_id)
@@ -1010,8 +1031,29 @@
def clearMaster(path):
shutil.rmtree(path)
+def createMaster(address, clear, path):
+ filepath = os.path.join(path, "blender_master.data")
+
+ if not clear and os.path.exists(filepath):
+ print("loading saved master:", filepath)
+ with open(filepath, 'rb') as f:
+ path, jobs, slaves = pickle.load(f)
+
+ httpd = RenderMasterServer(address, RenderHandler, path, subdir=False)
+ httpd.restore(jobs, slaves)
+
+ return httpd
+
+ return RenderMasterServer(address, RenderHandler, path)
+
+def saveMaster(path, httpd):
+ filepath = os.path.join(path, "blender_master.data")
+
+ with open(filepath, 'wb') as f:
+ pickle.dump((httpd.path, httpd.jobs, httpd.slaves), f, pickle.HIGHEST_PROTOCOL)
+
def runMaster(address, broadcast, clear, path, update_stats, test_break):
- httpd = RenderMasterServer(address, RenderHandler, path)
+ httpd = createMaster(address, clear, path)
httpd.timeout = 1
httpd.stats = update_stats
@@ -1040,4 +1082,6 @@
httpd.server_close()
if clear:
clearMaster(httpd.path)
+ else:
+ saveMaster(path, httpd)
Modified: branches/soc-2010-leifandersen/release/scripts/io/netrender/repath.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/io/netrender/repath.py 2010-06-21 21:25:54 UTC (rev 29598)
+++ branches/soc-2010-leifandersen/release/scripts/io/netrender/repath.py 2010-06-21 21:53:33 UTC (rev 29599)
@@ -47,7 +47,9 @@
new_path = path + ".remap" + ext
- all = main_file.filepath == main_file.original_path
+ # Disable for now. Partial repath should work anyway
+ #all = main_file.filepath != main_file.original_path
+ all = False
for rfile in job.files[1:]:
if all or rfile.original_path != rfile.filepath:
Copied: branches/soc-2010-leifandersen/release/scripts/modules/blend_render_info.py (from rev 29598, trunk/blender/release/scripts/modules/blend_render_info.py)
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/modules/blend_render_info.py (rev 0)
+++ branches/soc-2010-leifandersen/release/scripts/modules/blend_render_info.py 2010-06-21 21:53:33 UTC (rev 29599)
@@ -0,0 +1,99 @@
+#!/usr/bin/python
+
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
+# This module can get render info without running from inside blender.
+#
+# This struct wont change according to Ton.
+# Note that the size differs on 32/64bit
+#
+# typedef struct BHead {
+# int code, len;
+# void *old;
+# int SDNAnr, nr;
+# } BHead;
+
+def read_blend_rend_chunk(path):
+
+ import struct
+
+ file = open(path, 'rb')
+
+ head = file.read(7)
+
+ if head[0:2] == b'\x1f\x8b': # gzip magic
+ import gzip
+ file.close()
+ file = gzip.open(path, 'rb')
+ head = file.read(7)
+
+ if head != b'BLENDER':
+ print("not a blend file:", path)
+ file.close()
+ return []
+
+ is_64_bit = (file.read(1) == b'-')
+
+ # true for PPC, false for X86
+ is_big_endian = (file.read(1) == b'V')
+
+ # Now read the bhead chunk!!!
+ file.read(3) # skip the version
+
+ scenes = []
+
+ sizeof_bhead = 24 if is_64_bit else 20
+
+ while file.read(4) == b'REND':
+ sizeof_bhead_left = sizeof_bhead - 4
+
+ rend_length = struct.unpack('>i' if is_big_endian else '<i', file.read(4))[0]
+ sizeof_bhead_left -= 4
+
+ # We dont care about the rest of the bhead struct
+ file.read(sizeof_bhead_left)
+
+ # Now we want the scene name, start and end frame. this is 32bites long
+ start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', file.read(8))
+
+ scene_name = file.read(24)
+
+ scene_name = scene_name[:scene_name.index(b'\0')]
+
+ try:
+ scene_name = str(scene_name, 'utf8')
+ except TypeError:
+ pass
+
+ scenes.append((start_frame, end_frame, scene_name))
+
+ return scenes
+
+
+def main():
+ import sys
+ for arg in sys.argv[1:]:
+ if arg.lower().endswith('.blend'):
+ for value in read_blend_rend_chunk(arg):
+ print("%d %d %s" % value)
+
+if __name__ == '__main__':
+ main()
Modified: branches/soc-2010-leifandersen/release/scripts/modules/bpy_types.py
===================================================================
--- branches/soc-2010-leifandersen/release/scripts/modules/bpy_types.py 2010-06-21 21:25:54 UTC (rev 29598)
+++ branches/soc-2010-leifandersen/release/scripts/modules/bpy_types.py 2010-06-21 21:53:33 UTC (rev 29599)
@@ -531,6 +531,11 @@
self.clear()
self.write(string)
+ @property
+ def users_logic(self):
+ """Logic bricks that use this text"""
+ import bpy
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list