-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigs.py
88 lines (74 loc) · 3.09 KB
/
configs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import bpy
import os
from bpy.props import *
from bpy.types import CollectionProperty
class MasterConfigurations(bpy.types.PropertyGroup):
@classmethod
def register(Configurations):
default_path = os.environ.get("TEMP")
if not default_path:
if os.name == 'nt':
default_path = "c:/tmp/"
else:
default_path = "/tmp/"
elif not default_path.endswith(os.sep):
default_path += os.sep
Configurations.path = StringProperty(
name="Path",
description="Path for files",
maxlen = 128,
default = default_path,
subtype='FILE_PATH')
Configurations.self_address = StringProperty(
name="Self IP ",
description="IP of this machine",
maxlen = 128,
default = "[default]")
Configurations.port_no = StringProperty(
name="Port",
description="Port number",
maxlen = 128,
default = "8000")
Configurations.serviceThread=None
@classmethod
def unregister(cls):
del bpy.types.Scene.Masterconfigs
class SlaveConfigurations(bpy.types.PropertyGroup):
@classmethod
def register(Configurations):
default_path = os.environ.get("TEMP")
if not default_path:
if os.name == 'nt':
default_path = "c:/tmp/"
else:
default_path = "/tmp/"
elif not default_path.endswith(os.sep):
default_path += os.sep
Configurations.path = StringProperty(
name="Path",
description="Path for temp files",
maxlen = 128,
default = default_path,
subtype='FILE_PATH')
Configurations.master_address = StringProperty(
name="Master IP ",
description="IP of Master",
maxlen = 128,
default = "[default]")
Configurations.self_address = StringProperty(
name="Self IP ",
description="IP of Self",
maxlen = 128,
default = "[default]")
Configurations.port_no = StringProperty(
name="Port",
description="Port number",
maxlen = 128,
default = "8000")
@classmethod
def unregister(cls):
del bpy.types.Scene.SlaveConfig
bpy.utils.register_class(MasterConfigurations)
bpy.utils.register_class(SlaveConfigurations)
bpy.types.Scene.MasterConfigs = PointerProperty(type=MasterConfigurations, name="Network Render", description="Network Render Settings for Master")
bpy.types.Scene.SlaveConfigs = PointerProperty(type=SlaveConfigurations, name="Network Render22", description="Network Render Settings for Slave")