[Bf-extensions-cvs] [9a6e192f] master: netrender: move to contrib: T63750
meta-androcto
noreply at git.blender.org
Thu Jul 4 12:18:53 CEST 2019
Commit: 9a6e192fcecd676dea09233b35f12b8988d853e3
Author: meta-androcto
Date: Thu Jul 4 20:18:25 2019 +1000
Branches: master
https://developer.blender.org/rBA9a6e192fcecd676dea09233b35f12b8988d853e3
netrender: move to contrib: T63750
===================================================================
D netrender/__init__.py
D netrender/baking.py
D netrender/balancing.py
D netrender/client.py
D netrender/css/images/themes-preview.gif
D netrender/css/images/themes.gif
D netrender/css/images/ui-bg_flat_30_cccccc_40x100.png
D netrender/css/images/ui-bg_flat_50_5c5c5c_40x100.png
D netrender/css/images/ui-bg_glass_20_555555_1x400.png
D netrender/css/images/ui-bg_glass_40_0078a3_1x400.png
D netrender/css/images/ui-bg_glass_40_ffc73d_1x400.png
D netrender/css/images/ui-bg_gloss-wave_25_333333_500x100.png
D netrender/css/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
D netrender/css/images/ui-bg_inset-soft_25_000000_1x100.png
D netrender/css/images/ui-bg_inset-soft_30_f58400_1x100.png
D netrender/css/images/ui-icons_222222_256x240.png
D netrender/css/images/ui-icons_4b8e0b_256x240.png
D netrender/css/images/ui-icons_a83300_256x240.png
D netrender/css/images/ui-icons_cccccc_256x240.png
D netrender/css/images/ui-icons_ffffff_256x240.png
D netrender/css/jquery-ui.css
D netrender/css/jquery.themes.css
D netrender/js/jquery-ui.js
D netrender/js/jquery.js
D netrender/js/jquery.themes.js
D netrender/js/netrender-action.js
D netrender/js/netrender-widget.js
D netrender/js/netrender.js
D netrender/js/netrender_balance.js
D netrender/master.py
D netrender/master_html.py
D netrender/model.py
D netrender/netrender.css
D netrender/netrender.js
D netrender/newui.html
D netrender/operators.py
D netrender/repath.py
D netrender/slave.py
D netrender/thumbnail.py
D netrender/ui.py
D netrender/utils.py
D netrender/versioning.py
===================================================================
diff --git a/netrender/__init__.py b/netrender/__init__.py
deleted file mode 100644
index aae33c11..00000000
--- a/netrender/__init__.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# ##### 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 #####
-
-# This directory is a Python package.
-
-bl_info = {
- "name": "Network Renderer",
- "author": "Martin Poirier",
- "version": (1, 8, 1),
- "blender": (2, 60, 0),
- "location": "Render > Engine > Network Render",
- "description": "Distributed rendering for Blender",
- "warning": "Stable but still work in progress",
- "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
- "Scripts/Render/Net_render",
- "category": "Render",
-}
-
-
-# To support reload properly, try to access a package var, if it's there, reload everything
-if "init_data" in locals():
- import importlib
- importlib.reload(model)
- importlib.reload(operators)
- importlib.reload(client)
- importlib.reload(slave)
- importlib.reload(master)
- importlib.reload(master_html)
- importlib.reload(utils)
- importlib.reload(balancing)
- importlib.reload(ui)
- importlib.reload(repath)
- importlib.reload(versioning)
- importlib.reload(baking)
-else:
- from netrender import model
- from netrender import operators
- from netrender import client
- from netrender import slave
- from netrender import master
- from netrender import master_html
- from netrender import utils
- from netrender import balancing
- from netrender import ui
- from netrender import repath
- from netrender import versioning
- from netrender import baking
-
-jobs = []
-slaves = []
-blacklist = []
-
-init_file = ""
-valid_address = False
-init_data = True
-
-
-def register():
- import bpy
- bpy.utils.register_module(__name__)
-
-def unregister():
- import bpy
- bpy.utils.unregister_module(__name__)
diff --git a/netrender/baking.py b/netrender/baking.py
deleted file mode 100644
index f595a26b..00000000
--- a/netrender/baking.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# ##### 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 #####
-
-import bpy
-import sys, subprocess, re
-
-from netrender.utils import *
-
-
-def commandToTask(command):
- i = command.index("|")
- ri = command.rindex("|")
- return (command[:i], command[i+1:ri], command[ri+1:])
-
-def taskToCommand(task):
- return "|".join(task)
-
-def bake(job, tasks):
- main_file = job.files[0]
- job_full_path = main_file.filepath
-
- task_commands = []
- for task in tasks:
- task_commands.extend(task)
-
- process = subprocess.Popen(
- [bpy.app.binary_path,
- "-b",
- "-y",
- "-noaudio",
- job_full_path,
- "-P", __file__,
- "--",
- ] + task_commands,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
- )
-
- return process
-
-result_pattern = re.compile("BAKE FILE\[ ([0-9]+) \]: (.*)")
-def resultsFromOuput(lines):
- results = []
- for line in lines:
- match = result_pattern.match(line)
-
- if match:
- task_id = int(match.groups()[0])
- task_filename = match.groups()[1]
-
- results.append((task_id, task_filename))
-
- return results
-
-def bake_cache(obj, point_cache, task_index):
- if point_cache.is_baked:
- bpy.ops.ptcache.free_bake({"point_cache": point_cache})
-
- point_cache.use_disk_cache = True
- point_cache.use_external = False
-
- bpy.ops.ptcache.bake({"point_cache": point_cache}, bake=True)
-
- results = cache_results(obj, point_cache)
-
- print()
-
- for filename in results:
- print("BAKE FILE[", task_index, "]:", filename)
-
-
-def cache_results(obj, point_cache):
- name = cacheName(obj, point_cache)
- default_path = cachePath(bpy.data.filepath)
-
- cache_path = bpy.path.abspath(point_cache.filepath) if point_cache.use_external else default_path
-
- index = "%02i" % point_cache.index
-
- if os.path.exists(cache_path):
- pattern = re.compile(name + "_([0-9]+)_" + index + "\.bphys")
-
- cache_files = []
-
- for cache_file in sorted(os.listdir(cache_path)):
- match = pattern.match(cache_file)
-
- if match:
- cache_files.append(os.path.join(cache_path, cache_file))
-
- cache_files.sort()
-
- return cache_files
-
- return []
-
-def process_generic(obj, index, task_index):
- modifier = obj.modifiers[index]
- point_cache = modifier.point_cache
- bake_cache(obj, point_cache, task_index)
-
-def process_smoke(obj, index, task_index):
- modifier = obj.modifiers[index]
- point_cache = modifier.domain_settings.point_cache
- bake_cache(obj, point_cache, task_index)
-
-def process_particle(obj, index, task_index):
- psys = obj.particle_systems[index]
- point_cache = psys.point_cache
- bake_cache(obj, point_cache, task_index)
-
-def process_paint(obj, index, task_index):
- modifier = obj.modifiers[index]
- for surface in modifier.canvas_settings.canvas_surfaces:
- bake_cache(obj, surface.point_cache, task_index)
-
-def process_null(obj, index, task_index):
- raise ValueException("No baking possible with arguments: " + " ".join(sys.argv))
-
-process_funcs = {}
-process_funcs["CLOTH"] = process_generic
-process_funcs["SOFT_BODY"] = process_generic
-process_funcs["PARTICLE_SYSTEM"] = process_particle
-process_funcs["SMOKE"] = process_smoke
-process_funcs["DYNAMIC_PAINT"] = process_paint
-
-if __name__ == "__main__":
- try:
- i = sys.argv.index("--")
- except:
- i = 0
-
- if i:
- task_args = sys.argv[i+1:]
- for i in range(0, len(task_args), 3):
- bake_type = task_args[i]
- obj = bpy.data.objects[task_args[i+1]]
- index = int(task_args[i+2])
-
- process_funcs.get(bake_type, process_null)(obj, index, i)
diff --git a/netrender/balancing.py b/netrender/balancing.py
deleted file mode 100644
index e60165dd..00000000
--- a/netrender/balancing.py
+++ /dev/null
@@ -1,257 +0,0 @@
-# ##### 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 #####
-
-import time
-
-from netrender.utils import *
-import netrender.model
-
-class RatingRule:
- def __init__(self):
- self.enabled = True
- self.editable = False
-
- def id(self):
- return str(id(self))
-
- def rate(self, job):
- return 0
-
-class ExclusionRule:
- def __init__(self):
- self.enabled = True
- self.editable = True
- def id(self):
- return str(id(self))
-
- def test(self, job):
- return False
-
-class PriorityRule:
- def __init__(self):
- self.enabled = True
- self.editable = True
- def id(self):
- return str(id(self))
-
- def test(self, job):
- return False
-
-class Balancer:
- def __init__(self):
- self.rules = []
- self.priorities = []
- self.exceptions = []
-
- def ruleByID(self, rule_id):
- for rule in self.rules:
- if rule.id() == rule_id:
- return rule
- for rule in self.priorities:
- if rule.id() == rule_id:
- return rule
- for rule in self.exceptions:
- if rule.id() == rule_id:
- return rule
-
- return None
-
- def addRule(self, rule):
- self.rules.append(rule)
-
- def addPriority(self, priority):
- self.priorities.append(priority)
-
- def addException(self, exception):
- self.exceptions.append(exception)
-
- def applyRules(self, job):
- return sum((rule.rate(job) for rule in self.rules if rule.enabled))
-
- def applyPriorities(self, job):
- for priority in self.priorities:
- if priority.enabled and priority.test(job):
- return True # priorities are first
-
- return False
-
- def applyExceptions(self, job):
- for exception in self.excep
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list