41 lines
1.8 KiB
Python
41 lines
1.8 KiB
Python
import modules.scripts as scripts
|
|
|
|
def grid_reference():
|
|
for data in scripts.scripts_data:
|
|
if data.script_class.__module__ == 'xyz_grid.py' and hasattr(data, "module"):
|
|
return data.module
|
|
|
|
def xyz_support(cache):
|
|
def apply_field(field):
|
|
def _(p, x, xs):
|
|
cache.update({field : x})
|
|
return _
|
|
|
|
def choices_bool():
|
|
return ["False", "True"]
|
|
|
|
def choices_method():
|
|
return ["Disabled", "Straight", "Straight Abs.", "Cross", "Cross Abs.", "Ones", "N.Random", "U.Random", "Multi-Res", "Multi-Res Abs."]
|
|
|
|
def choices_scaling():
|
|
return ["Flat", "Cos", "Sin", "1 - Cos", "1 - Sin"]
|
|
|
|
xyz_grid = grid_reference()
|
|
|
|
extra_axis_options = [
|
|
xyz_grid.AxisOption("[Vec.CC] Enable", str, apply_field("Enable"), choices=choices_bool),
|
|
xyz_grid.AxisOption("[Vec.CC] Alt.", str, apply_field("Alt"), choices=choices_bool),
|
|
xyz_grid.AxisOption("[Vec.CC] Brightness", float, apply_field("Brightness")),
|
|
xyz_grid.AxisOption("[Vec.CC] Contrast", float, apply_field("Contrast")),
|
|
xyz_grid.AxisOption("[Vec.CC] Saturation", float, apply_field("Saturation")),
|
|
xyz_grid.AxisOption("[Vec.CC] R", float, apply_field("R")),
|
|
xyz_grid.AxisOption("[Vec.CC] G", float, apply_field("G")),
|
|
xyz_grid.AxisOption("[Vec.CC] B", float, apply_field("B")),
|
|
xyz_grid.AxisOption("[Adv.CC] Proc. H.Fix", str, apply_field("DoHR"), choices=choices_bool),
|
|
xyz_grid.AxisOption("[Adv.CC] Method", str, apply_field("Method"), choices=choices_method),
|
|
xyz_grid.AxisOption("[Adv.CC] Scaling", str, apply_field("Scaling"), choices=choices_scaling),
|
|
xyz_grid.AxisOption("[Adv.CC] Randomize", int, apply_field("Random"))
|
|
]
|
|
|
|
xyz_grid.axis_options.extend(extra_axis_options)
|