-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfixtheme.ps1
71 lines (56 loc) · 2.99 KB
/
fixtheme.ps1
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
$file = [System.IO.Path]::Join($pwd, $args[0])
$theme = New-Object xml
$theme.PreserveWhitespace = $true
$theme.Load($file)
$nodes = $theme.SelectNodes("//*[@roundness]")
foreach ($node in $nodes) {
$node.roundness = "0.25"
}
$nodes = $theme.SelectNodes("//*[@panel_roundness]")
foreach ($node in $nodes) {
$node.panel_roundness = "0.25"
}
$color_wire = "#262626"
$color_object_selected = "#f13a00"
$color_object_active = "#ffcc40"
$color_vertex_select = "#00ccff"
$color_edge_select = "#00bbee"
$color_face = "#ffffff1a"
$color_face_select = "#00ccff20"
$color_edit_active = "#fa00ffb9"
$theme.bpy.Theme.view_3d.ThemeView3D.wire = $color_wire
$theme.bpy.Theme.view_3d.ThemeView3D.wire_edit = $color_wire
$theme.bpy.Theme.view_3d.ThemeView3D.object_selected = $color_object_selected
$theme.bpy.Theme.view_3d.ThemeView3D.object_active = $color_object_active
$theme.bpy.Theme.view_3d.ThemeView3D.vertex_select = $color_vertex_select
$theme.bpy.Theme.view_3d.ThemeView3D.edge_select = $color_edge_select
$theme.bpy.Theme.view_3d.ThemeView3D.face = $color_face
$theme.bpy.Theme.view_3d.ThemeView3D.face_select = $color_face_select
$theme.bpy.Theme.view_3d.ThemeView3D.face_dot = $color_vertex_select
$theme.bpy.Theme.view_3d.ThemeView3D.editmesh_active = $color_edit_active
$theme.bpy.Theme.view_3d.ThemeView3D.space.ThemeSpaceGradient.gradients.ThemeGradientColors.background_type = "SINGLE_COLOR"
$theme.bpy.Theme.view_3d.ThemeView3D.extra_edge_len = "#ffffff"
$theme.bpy.Theme.view_3d.ThemeView3D.extra_edge_angle = "#ff00ff"
$theme.bpy.Theme.view_3d.ThemeView3D.extra_face_angle = "#ffff00"
$theme.bpy.Theme.view_3d.ThemeView3D.extra_face_area = "#00ff00"
$theme.bpy.Theme.view_3d.ThemeView3D.vertex_size = "2"
$theme.bpy.Theme.image_editor.ThemeImageEditor.vertex_select = $color_vertex_select
$theme.bpy.Theme.image_editor.ThemeImageEditor.edge_select = $color_edge_select
$theme.bpy.Theme.image_editor.ThemeImageEditor.face = $color_face
$theme.bpy.Theme.image_editor.ThemeImageEditor.face_select = $color_face_select
$theme.bpy.Theme.image_editor.ThemeImageEditor.face_dot = $color_vertex_select
$theme.bpy.Theme.image_editor.ThemeImageEditor.editmesh_active = $color_edit_active
$theme.bpy.Theme.node_editor.ThemeNodeEditor.group_node = "#426628d9"
$theme.bpy.Theme.node_editor.ThemeNodeEditor.noodle_curving = "3"
$theme.bpy.Theme.outliner.ThemeOutliner.selected_object = $color_object_selected
$theme.bpy.Theme.outliner.ThemeOutliner.active_object = $color_object_active
$settings = New-Object System.Xml.XmlWriterSettings
$settings.OmitXmlDeclaration = $true
$settings.NewLineOnAttributes = $true
$settings.Indent = $true
$settings.NewLineChars ="`r`n"
$settings.Encoding = New-Object System.Text.UTF8Encoding( $false )
$out = [System.IO.Path]::Join($pwd, "DCONFIG.xml")
$w = [System.Xml.XmlWriter]::Create($out, $settings)
$theme.Save($w)
$w.Close()