Skip to content
Snippets Groups Projects
Commit c13d2430 authored by Francesco Siddi's avatar Francesco Siddi
Browse files

Merge pull request #151 from callym/windows-fixes

Windows fixes
parents 7d50a7db a3cb7dcb
No related branches found
No related tags found
No related merge requests found
import os import os
import tempfile
import socket import socket
class Config(object): class Config(object):
DEBUG = True DEBUG = True
PORT = 7777 PORT = 7777
...@@ -20,7 +22,7 @@ class Config(object): ...@@ -20,7 +22,7 @@ class Config(object):
SETTINGS_PATH_LINUX = "" SETTINGS_PATH_LINUX = ""
SETTINGS_PATH_OSX = "" SETTINGS_PATH_OSX = ""
SETTINGS_PATH_WIN = "" SETTINGS_PATH_WIN = ""
TMP_FOLDER = '/tmp/' TMP_FOLDER = tempfile.gettempdir()
THUMBNAIL_EXTENSIONS = set(['png']) THUMBNAIL_EXTENSIONS = set(['png'])
MANAGER_STORAGE = '{0}/static/storage'.format( MANAGER_STORAGE = '{0}/static/storage'.format(
os.path.join(os.path.dirname(__file__))) os.path.join(os.path.dirname(__file__)))
...@@ -70,7 +70,11 @@ def runserver(): ...@@ -70,7 +70,11 @@ def runserver():
render_config = JobType( render_config = JobType(
name='simple_blender_render', name='simple_blender_render',
value=json.dumps(configuration)) properties=json.dumps(configuration))
db.session.add(render_config)
render_config = JobType(
name='blender_simple_render',
properties=json.dumps(configuration))
db.session.add(render_config) db.session.add(render_config)
db.session.commit() db.session.commit()
# Bake config # Bake config
...@@ -90,7 +94,7 @@ def runserver(): ...@@ -90,7 +94,7 @@ def runserver():
bake_config = JobType( bake_config = JobType(
name='blender_bake_anim_cache', name='blender_bake_anim_cache',
value=json.dumps(configuration)) properties=json.dumps(configuration))
db.session.add(bake_config) db.session.add(bake_config)
db.session.commit() db.session.commit()
......
import os import os
import tempfile
class Config(object): class Config(object):
SQLALCHEMY_DATABASE_URI='sqlite:///' + os.path.join(os.path.dirname(__file__), '../server.sqlite') SQLALCHEMY_DATABASE_URI='sqlite:///' + os.path.join(os.path.dirname(__file__), '../server.sqlite')
DEBUG=True DEBUG=True
PORT=9999 PORT=9999
HOST='0.0.0.0' # or 'localhost' HOST='0.0.0.0' # or 'localhost'
TMP_FOLDER = '/tmp/' TMP_FOLDER = tempfile.gettempdir()
THUMBNAIL_EXTENSIONS = set(['png']) THUMBNAIL_EXTENSIONS = set(['png'])
SERVER_STORAGE = '{0}/static/storage'.format( SERVER_STORAGE = '{0}/static/storage'.format(
os.path.join(os.path.dirname(__file__))) os.path.join(os.path.dirname(__file__)))
...@@ -15,10 +15,12 @@ import sqlalchemy as sa ...@@ -15,10 +15,12 @@ import sqlalchemy as sa
def upgrade(): def upgrade():
op.add_column('job', sa.Column('user_id', sa.Integer(), nullable=True)) with op.batch_alter_table('job') as batch_op:
op.create_foreign_key(None, 'job', 'user', ['user_id'], ['id']) batch_op.add_column(sa.Column('user_id', sa.Integer(), nullable=True))
batch_op.create_foreign_key('job-user_id', 'user', ['user_id'], ['id'])
def downgrade(): def downgrade():
op.drop_constraint(None, 'job', type_='foreignkey') with op.batch_alter_table('job') as batch_op:
op.drop_column('job', 'user_id') batch_op.drop_constraint('job-user_id', type_='foreignkey')
batch_op.drop_column('user_id')
...@@ -16,15 +16,17 @@ from sqlalchemy.dialects import mysql ...@@ -16,15 +16,17 @@ from sqlalchemy.dialects import mysql
def upgrade(): def upgrade():
### commands auto generated by Alembic - please adjust! ### ### commands auto generated by Alembic - please adjust! ###
op.add_column('job', sa.Column('tasks_status', sa.String(256), nullable=True)) with op.batch_alter_table('job') as batch_op:
op.drop_column('job', 'tasks_count') batch_op.add_column(sa.Column('tasks_status', sa.String(256), nullable=True))
op.drop_column('job', 'tasks_completed') batch_op.drop_column('tasks_count')
batch_op.drop_column('tasks_completed')
### end Alembic commands ### ### end Alembic commands ###
def downgrade(): def downgrade():
### commands auto generated by Alembic - please adjust! ### ### commands auto generated by Alembic - please adjust! ###
op.add_column('job', sa.Column('tasks_completed', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True)) with op.batch_alter_table('job') as batch_op:
op.add_column('job', sa.Column('tasks_count', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True)) batch_op.add_column(sa.Column('tasks_completed', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
op.drop_column('job', 'tasks_status') batch_op.add_column(sa.Column('tasks_count', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
batch_op.drop_column('tasks_status')
### end Alembic commands ### ### end Alembic commands ###
import tempfile
class Config(object): class Config(object):
DEBUG = False DEBUG = False
FLAMENCO_MANAGER = 'localhost:7777' FLAMENCO_MANAGER = 'localhost:7777'
HOST = '0.0.0.0' # or localhost HOST = '0.0.0.0' # or localhost
PORT = 5000 PORT = 5000
TMP_FOLDER = '/tmp/' TMP_FOLDER = tempfile.gettempdir()
...@@ -257,12 +257,12 @@ class bamToRenderfarm (bpy.types.Operator): ...@@ -257,12 +257,12 @@ class bamToRenderfarm (bpy.types.Operator):
return {'CANCELLED'} return {'CANCELLED'}
# We retrieve the username via the .blender_id profiles file. If no file # We retrieve the username via the .blender_id profiles file. If no file
# is available we fail silently and set the username to "" # is available we fail silently and set the username to "default"
profile = ProfilesUtility.get_active_profile() profile = ProfilesUtility.get_active_profile()
if profile: if profile:
username = profile['username'] username = profile['username']
else: else:
username = "" username = "default"
job_settings = { job_settings = {
'frames': "{0}-{1}".format(scn.frame_start, scn.frame_end), 'frames': "{0}-{1}".format(scn.frame_start, scn.frame_end),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment