Selaa lähdekoodia

Add sailing warships

Also lets models have a default view for each form. Fixes some incorrect
behaviors with the setup of entities to go along with this (e.g. if there
was no default form, the last form would wind up being the default, rather
than the first, if default views were specified.
master
Fen Dweller 3 vuotta sitten
vanhempi
commit
7fd934933c
72 muutettua tiedostoa jossa 332037 lisäystä ja 8 poistoa
  1. +7
    -1
      macrovision.js
  2. +15
    -1
      media/attribution.js
  3. +4121
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Angled.svg
  4. +9941
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Back Corner.svg
  5. +4208
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Back.svg
  6. +1433
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Bottom.svg
  7. +5156
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Corner.svg
  8. +2735
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Front.svg
  9. +3335
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Side.svg
  10. +3422
    -0
      media/vehicles/Sailing Warships/HMS Cerberus-Top.svg
  11. +7469
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Angled.svg
  12. +15386
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Back Corner.svg
  13. +8795
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Back.svg
  14. +2234
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Bottom.svg
  15. +10025
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Corner.svg
  16. +3200
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Front.svg
  17. +6014
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Side.svg
  18. +8288
    -0
      media/vehicles/Sailing Warships/HMS Implacable-Top.svg
  19. +5963
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Angled.svg
  20. +13907
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Back Corner.svg
  21. +7193
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Back.svg
  22. +2297
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Bottom.svg
  23. +9044
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Corner.svg
  24. +2447
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Front.svg
  25. +5627
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Side.svg
  26. +7343
    -0
      media/vehicles/Sailing Warships/HMS Indefatigable-Top.svg
  27. +2123
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Angled.svg
  28. +3545
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Back Corner.svg
  29. +3491
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Back.svg
  30. +731
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Bottom.svg
  31. +2747
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Corner.svg
  32. +1022
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Front.svg
  33. +1874
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Side.svg
  34. +2396
    -0
      media/vehicles/Sailing Warships/HMS Pickle-Top.svg
  35. +4895
    -0
      media/vehicles/Sailing Warships/Le Requin-Angled.svg
  36. +4634
    -0
      media/vehicles/Sailing Warships/Le Requin-Back Corner.svg
  37. +1508
    -0
      media/vehicles/Sailing Warships/Le Requin-Back.svg
  38. +2267
    -0
      media/vehicles/Sailing Warships/Le Requin-Bottom.svg
  39. +4652
    -0
      media/vehicles/Sailing Warships/Le Requin-Corner.svg
  40. +1966
    -0
      media/vehicles/Sailing Warships/Le Requin-Front.svg
  41. +3032
    -0
      media/vehicles/Sailing Warships/Le Requin-Side.svg
  42. +5489
    -0
      media/vehicles/Sailing Warships/Le Requin-Top.svg
  43. +2354
    -0
      media/vehicles/Sailing Warships/Lynx-Angled.svg
  44. +2414
    -0
      media/vehicles/Sailing Warships/Lynx-Back Corner.svg
  45. +1823
    -0
      media/vehicles/Sailing Warships/Lynx-Back.svg
  46. +695
    -0
      media/vehicles/Sailing Warships/Lynx-Bottom.svg
  47. +2321
    -0
      media/vehicles/Sailing Warships/Lynx-Corner.svg
  48. +1322
    -0
      media/vehicles/Sailing Warships/Lynx-Front.svg
  49. +1577
    -0
      media/vehicles/Sailing Warships/Lynx-Side.svg
  50. +2225
    -0
      media/vehicles/Sailing Warships/Lynx-Top.svg
  51. +6839
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Angled.svg
  52. +15197
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Back Corner.svg
  53. +7487
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Back.svg
  54. +2807
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Bottom.svg
  55. +8447
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Corner.svg
  56. +3494
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Front.svg
  57. +6014
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Side.svg
  58. +7274
    -0
      media/vehicles/Sailing Warships/Santísima Trinidad-Top.svg
  59. +8687
    -0
      media/vehicles/Sailing Warships/USS Constitution-Angled.svg
  60. +17360
    -0
      media/vehicles/Sailing Warships/USS Constitution-Back Corner.svg
  61. +8966
    -0
      media/vehicles/Sailing Warships/USS Constitution-Back.svg
  62. +1883
    -0
      media/vehicles/Sailing Warships/USS Constitution-Bottom.svg
  63. +9476
    -0
      media/vehicles/Sailing Warships/USS Constitution-Corner.svg
  64. +5462
    -0
      media/vehicles/Sailing Warships/USS Constitution-Front.svg
  65. +6098
    -0
      media/vehicles/Sailing Warships/USS Constitution-Side.svg
  66. +5798
    -0
      media/vehicles/Sailing Warships/USS Constitution-Top.svg
  67. +4
    -0
      presets/objects.js
  68. +1
    -0
      presets/vehicles.js
  69. +6
    -1
      scripts/blender/addons/macrovision/ops.py
  70. +19
    -0
      scripts/blender/addons/macrovision/props.py
  71. +5
    -0
      scripts/blender/addons/macrovision/ui.py
  72. +5
    -5
      scripts/process-model.py

+ 7
- 1
macrovision.js Näytä tiedosto

@@ -1735,6 +1735,12 @@ function makeEntity(info, views, sizes, forms = {}) {
}
});

Object.entries(this.forms).forEach(([formKey, form]) => {
if (this.defaultForm === undefined) {
this.defaultForm = formKey;
}
});

Object.entries(this.views).forEach(([viewKey, view]) => {
view.parent = this;
if (this.defaultView === undefined) {
@@ -1744,7 +1750,7 @@ function makeEntity(info, views, sizes, forms = {}) {
}

if (view.default) {
if (forms === {} || this.defaultForm === view.form) {
if (forms === {} || this.defaultForm === view.form || this.defaultForm === undefined) {
this.defaultView = viewKey;
this.view = viewKey;
this.form = view.form;


+ 15
- 1
media/attribution.js Näytä tiedosto

@@ -24877,7 +24877,17 @@ const attributionData = {
"mechwarrior-online"
]
},

{
prefix: "./media/vehicles/Sailing Warships",
all: "https://gamemodels3d.com/",
authors: [
"gamemodels3d",
"naval-action"
],
owners: [
"naval-action"
]
},
],
people: {
"ahastar": {
@@ -32220,6 +32230,10 @@ const attributionData = {
"name": "MechWarrior Online",
"url": "https://mwomercs.com"
},
"naval-action": {
"name": "Naval Action",
"url": "https://www.navalaction.com"
},
}
}



+ 4121
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 9941
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 4208
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1433
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 5156
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2735
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 3335
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 3422
- 0
media/vehicles/Sailing Warships/HMS Cerberus-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 7469
- 0
media/vehicles/Sailing Warships/HMS Implacable-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 15386
- 0
media/vehicles/Sailing Warships/HMS Implacable-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 8795
- 0
media/vehicles/Sailing Warships/HMS Implacable-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2234
- 0
media/vehicles/Sailing Warships/HMS Implacable-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 10025
- 0
media/vehicles/Sailing Warships/HMS Implacable-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 3200
- 0
media/vehicles/Sailing Warships/HMS Implacable-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 6014
- 0
media/vehicles/Sailing Warships/HMS Implacable-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 8288
- 0
media/vehicles/Sailing Warships/HMS Implacable-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 5963
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 13907
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 7193
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2297
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 9044
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2447
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 5627
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 7343
- 0
media/vehicles/Sailing Warships/HMS Indefatigable-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2123
- 0
media/vehicles/Sailing Warships/HMS Pickle-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 3545
- 0
media/vehicles/Sailing Warships/HMS Pickle-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 3491
- 0
media/vehicles/Sailing Warships/HMS Pickle-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 731
- 0
media/vehicles/Sailing Warships/HMS Pickle-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2747
- 0
media/vehicles/Sailing Warships/HMS Pickle-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1022
- 0
media/vehicles/Sailing Warships/HMS Pickle-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1874
- 0
media/vehicles/Sailing Warships/HMS Pickle-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2396
- 0
media/vehicles/Sailing Warships/HMS Pickle-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 4895
- 0
media/vehicles/Sailing Warships/Le Requin-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 4634
- 0
media/vehicles/Sailing Warships/Le Requin-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1508
- 0
media/vehicles/Sailing Warships/Le Requin-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2267
- 0
media/vehicles/Sailing Warships/Le Requin-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 4652
- 0
media/vehicles/Sailing Warships/Le Requin-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1966
- 0
media/vehicles/Sailing Warships/Le Requin-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 3032
- 0
media/vehicles/Sailing Warships/Le Requin-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 5489
- 0
media/vehicles/Sailing Warships/Le Requin-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2354
- 0
media/vehicles/Sailing Warships/Lynx-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2414
- 0
media/vehicles/Sailing Warships/Lynx-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1823
- 0
media/vehicles/Sailing Warships/Lynx-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 695
- 0
media/vehicles/Sailing Warships/Lynx-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2321
- 0
media/vehicles/Sailing Warships/Lynx-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1322
- 0
media/vehicles/Sailing Warships/Lynx-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1577
- 0
media/vehicles/Sailing Warships/Lynx-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2225
- 0
media/vehicles/Sailing Warships/Lynx-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 6839
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 15197
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 7487
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 2807
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 8447
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 3494
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 6014
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 7274
- 0
media/vehicles/Sailing Warships/Santísima Trinidad-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 8687
- 0
media/vehicles/Sailing Warships/USS Constitution-Angled.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 17360
- 0
media/vehicles/Sailing Warships/USS Constitution-Back Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 8966
- 0
media/vehicles/Sailing Warships/USS Constitution-Back.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 1883
- 0
media/vehicles/Sailing Warships/USS Constitution-Bottom.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 9476
- 0
media/vehicles/Sailing Warships/USS Constitution-Corner.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 5462
- 0
media/vehicles/Sailing Warships/USS Constitution-Front.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 6098
- 0
media/vehicles/Sailing Warships/USS Constitution-Side.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 5798
- 0
media/vehicles/Sailing Warships/USS Constitution-Top.svg
File diff suppressed because it is too large
Näytä tiedosto


+ 4
- 0
presets/objects.js Näytä tiedosto

@@ -175,6 +175,10 @@ function makeModel(data) {
form: form.name
}

if (data.default_view == view.name) {
views[viewId].default = true
}

if (view.area) {
views[viewId].attributes["area"] = {
name: "Area",


+ 1
- 0
presets/vehicles.js
File diff suppressed because it is too large
Näytä tiedosto


+ 6
- 1
scripts/blender/addons/macrovision/ops.py Näytä tiedosto

@@ -480,6 +480,11 @@ class MVExport(bpy.types.Operator):
all_data["forms"].append(data)
coll.hide_render = True

all_data["sort"] = context.scene.mv_sort

if context.scene.mv_override_default_view:
all_data["default_view"] = context.scene.mv_default_view

with open(workdir.joinpath("data.json"), "w") as file:
json.dump(all_data, file)

@@ -487,7 +492,7 @@ class MVExport(bpy.types.Operator):

class MVImportObj(bpy.types.Operator, ImportHelper):
bl_idname = "mv.import_obj"
bl_label = "Import from a directory of .zip files containing .obj files"
bl_label = "Import .obj files"
filepath: StringProperty(subtype="FILE_PATH")
filename_ext = "."
use_filter_folder = True


+ 19
- 0
scripts/blender/addons/macrovision/props.py Näytä tiedosto

@@ -132,6 +132,25 @@ scene_props["mv_clobber"] = bpy.props.BoolProperty(
description = "Overwrite existing form data",
default = False
)

scene_props["mv_sort"] = bpy.props.BoolProperty(
name = "Sort",
description = "Tell Macrovision to sort the forms",
default = False
)

scene_props["mv_override_default_view"] = bpy.props.BoolProperty(
name = "Override Default View",
description = "Specify which view should be the default.",
default = False
)

scene_props["mv_default_view"] = bpy.props.StringProperty(
name = "Default View",
description = "The default view to display for each form.",
default = ""
)

collection_props["mv_entity_volume"] = bpy.props.PointerProperty(
type = MVScientificNumber,
)


+ 5
- 0
scripts/blender/addons/macrovision/ui.py Näytä tiedosto

@@ -73,6 +73,11 @@ class MVScenePanel(bpy.types.Panel):
box.label(text="Execute")

box.prop(context.scene, "mv_clobber")
box.prop(context.scene, "mv_sort")
box.prop(context.scene, "mv_override_default_view")

if context.scene.mv_override_default_view:
box.prop(context.scene, "mv_default_view")

op_props = box.operator("mv.export")



+ 5
- 5
scripts/process-model.py Näytä tiedosto

@@ -77,11 +77,11 @@ for data in all_data["forms"]:

procs = []

procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "RGB", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "1000,0", "-background", "#FFFFFF", "-flatten", input_base], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "GB", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "1000,0", "-background", "#FFFFFF", "-negate", "-flatten", input_dark], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "RB", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "1000,0", "-background", "#FFFFFF", "-negate", "-flatten", input_medium], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "RG", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "1000,0", "-background", "#FFFFFF", "-negate", "-flatten", input_light], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-fill", "black", "-fuzz", "10%", "+opaque", "#FFFFFF", "-channel", "RGB", "-modulate", "1000,0", "-background", "#FFFFFF", "-negate", "-flatten", input_bright], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "RGB", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "200,0", "-background", "#FFFFFF", "-flatten", input_base], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "GB", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "200,0", "-background", "#FFFFFF", "-negate", "-flatten", input_dark], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "RB", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "200,0", "-background", "#FFFFFF", "-negate", "-flatten", input_medium], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-channel", "RG", "-evaluate", "set", "0", "-channel", "RGB", "-modulate", "200,0", "-background", "#FFFFFF", "-negate", "-flatten", input_light], shell=False))
procs.append(subprocess.Popen(["magick", "convert", input, "-fill", "black", "-fuzz", "10%", "+opaque", "#FFFFFF", "-channel", "RGB", "-modulate", "200,0", "-background", "#FFFFFF", "-negate", "-flatten", input_bright], shell=False))

# to correct for extra height from lines
procs.append(subprocess.Popen(["magick", "convert", input_noline_raw, "-channel", "RGB", "-evaluate", "set", "0", "-background", "#FFFFFF", "-flatten", input_noline], shell=False))


Loading…
Peruuta
Tallenna