Merge pull request #11703 from Roy-043/Draft-implement-new-get_param-functions-step-1
Draft: implement new get_param functions (step 1)
This commit is contained in:
@@ -44,7 +44,6 @@ from draftgeoutils.linear_algebra import (linearFromPoints,
|
||||
determinant)
|
||||
|
||||
# Needs math, Part, and vector tools
|
||||
from draftgeoutils.general import PARAMGRP as params
|
||||
from draftgeoutils.general import NORM
|
||||
|
||||
from draftgeoutils.general import (precision,
|
||||
|
||||
@@ -31,10 +31,10 @@ See also the `upgrade` function.
|
||||
## \addtogroup draftfunctions
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
import draftutils.gui_utils as gui_utils
|
||||
import draftfunctions.cut as cut
|
||||
|
||||
from draftfunctions import cut
|
||||
from draftutils import utils
|
||||
from draftutils import params
|
||||
from draftutils import gui_utils
|
||||
from draftutils.messages import _msg
|
||||
from draftutils.translate import translate
|
||||
|
||||
@@ -119,9 +119,8 @@ def downgrade(objects, delete=False, force=None):
|
||||
def splitFaces(objects):
|
||||
"""Split faces contained in objects into new objects."""
|
||||
result = False
|
||||
params = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
|
||||
preserveFaceColor = params.GetBool("preserveFaceColor") # True
|
||||
preserveFaceNames = params.GetBool("preserveFaceNames") # True
|
||||
preserveFaceColor = params.get_param("preserveFaceColor")
|
||||
preserveFaceNames = params.get_param("preserveFaceNames")
|
||||
for o in objects:
|
||||
if App.GuiUp and preserveFaceColor and o.ViewObject:
|
||||
voDColors = o.ViewObject.DiffuseColor
|
||||
|
||||
@@ -28,12 +28,13 @@
|
||||
## \addtogroup draftfunctions
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
import draftutils.gui_utils as gui_utils
|
||||
import draftutils.groups as groups
|
||||
import draftfunctions.join as join
|
||||
import draftmake.make_copy as make_copy
|
||||
import draftmake.make_line as make_line
|
||||
from draftfunctions import join
|
||||
from draftmake import make_copy
|
||||
from draftmake import make_line
|
||||
from draftutils import groups
|
||||
from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
|
||||
|
||||
def move(objectslist, vector, copy=False):
|
||||
@@ -150,7 +151,7 @@ def move(objectslist, vector, copy=False):
|
||||
if utils.get_type(parent) == "Layer":
|
||||
parent.Proxy.addObject(parent ,newobj)
|
||||
|
||||
if copy and utils.get_param("selectBaseObjects", False):
|
||||
if copy and params.get_param("selectBaseObjects"):
|
||||
gui_utils.select(objectslist)
|
||||
else:
|
||||
gui_utils.select(newobjlist)
|
||||
|
||||
@@ -31,8 +31,9 @@ import math
|
||||
|
||||
import FreeCAD as App
|
||||
import DraftVecUtils
|
||||
import draftutils.gui_utils as gui_utils
|
||||
import draftutils.utils as utils
|
||||
from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
|
||||
from draftmake.make_rectangle import make_rectangle
|
||||
from draftmake.make_wire import make_wire
|
||||
@@ -238,7 +239,7 @@ def offset(obj, delta, copy=False, bind=False, sym=False, occ=False):
|
||||
elif utils.get_type(obj) == 'Part':
|
||||
print("unsupported object") # TODO
|
||||
newobj = obj
|
||||
if copy and utils.get_param("selectBaseObjects",False):
|
||||
if copy and params.get_param("selectBaseObjects"):
|
||||
gui_utils.select(newobj)
|
||||
else:
|
||||
gui_utils.select(obj)
|
||||
|
||||
@@ -31,12 +31,13 @@ import math
|
||||
|
||||
import FreeCAD as App
|
||||
import DraftVecUtils
|
||||
import draftutils.utils as utils
|
||||
import draftutils.gui_utils as gui_utils
|
||||
import draftutils.groups as groups
|
||||
import draftfunctions.join as join
|
||||
import draftmake.make_line as make_line
|
||||
import draftmake.make_copy as make_copy
|
||||
from draftfunctions import join
|
||||
from draftmake import make_copy
|
||||
from draftmake import make_line
|
||||
from draftutils import groups
|
||||
from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
|
||||
|
||||
def rotate(objectslist, angle, center=App.Vector(0, 0, 0),
|
||||
@@ -154,7 +155,7 @@ def rotate(objectslist, angle, center=App.Vector(0, 0, 0),
|
||||
if utils.get_type(parent) == "Layer":
|
||||
parent.Proxy.addObject(parent ,newobj)
|
||||
|
||||
if copy and utils.get_param("selectBaseObjects", False):
|
||||
if copy and params.get_param("selectBaseObjects"):
|
||||
gui_utils.select(objectslist)
|
||||
else:
|
||||
gui_utils.select(newobjlist)
|
||||
|
||||
@@ -29,11 +29,12 @@
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
import DraftVecUtils
|
||||
import draftutils.utils as utils
|
||||
import draftutils.gui_utils as gui_utils
|
||||
import draftfunctions.join as join
|
||||
import draftmake.make_copy as make_copy
|
||||
import draftmake.make_line as make_line
|
||||
from draftfunctions import join
|
||||
from draftmake import make_copy
|
||||
from draftmake import make_line
|
||||
from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
|
||||
|
||||
def scale(objectslist, scale=App.Vector(1,1,1),
|
||||
@@ -129,7 +130,7 @@ def scale(objectslist, scale=App.Vector(1,1,1),
|
||||
if copy:
|
||||
gui_utils.format_object(newobj,obj)
|
||||
newobjlist.append(newobj)
|
||||
if copy and utils.get_param("selectBaseObjects",False):
|
||||
if copy and params.get_param("selectBaseObjects"):
|
||||
gui_utils.select(objectslist)
|
||||
else:
|
||||
gui_utils.select(newobjlist)
|
||||
|
||||
@@ -33,10 +33,10 @@ import lazy_loader.lazy_loader as lz
|
||||
import FreeCAD as App
|
||||
import DraftVecUtils
|
||||
import WorkingPlane
|
||||
import draftutils.utils as utils
|
||||
import draftfunctions.svgtext as svgtext
|
||||
|
||||
from draftfunctions import svgtext
|
||||
from draftfunctions.svgshapes import get_proj, get_circle, get_path
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils.messages import _wrn, _err
|
||||
|
||||
# Delay import of module until first use because it is heavy
|
||||
@@ -50,15 +50,14 @@ DraftGeomUtils = lz.LazyLoader("DraftGeomUtils", globals(), "DraftGeomUtils")
|
||||
|
||||
def get_line_style(line_style, scale):
|
||||
"""Return a linestyle scaled by a factor."""
|
||||
param = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
|
||||
style = None
|
||||
|
||||
if line_style == "Dashed":
|
||||
style = param.GetString("svgDashedLine", "2,2")
|
||||
style = params.get_param("svgDashedLine")
|
||||
elif line_style == "Dashdot":
|
||||
style = param.GetString("svgDashdotLine", "3,2,0.2,2")
|
||||
style = params.get_param("svgDashdotLine")
|
||||
elif line_style == "Dotted":
|
||||
style = param.GetString("svgDottedLine", "0.2,2")
|
||||
style = params.get_param("svgDottedLine")
|
||||
elif line_style:
|
||||
if "," in line_style:
|
||||
style = line_style
|
||||
|
||||
@@ -33,8 +33,8 @@ import lazy_loader.lazy_loader as lz
|
||||
import FreeCAD as App
|
||||
import DraftVecUtils
|
||||
import WorkingPlane
|
||||
import draftutils.utils as utils
|
||||
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils.messages import _msg, _wrn
|
||||
|
||||
# Delay import of module until first use because it is heavy
|
||||
@@ -90,8 +90,7 @@ def getProj(vec, plane=None):
|
||||
|
||||
def get_discretized(edge, plane):
|
||||
"""Get a discretized edge on a plane."""
|
||||
param = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
|
||||
pieces = param.GetFloat("svgDiscretization", 10.0)
|
||||
pieces = params.get_param("svgDiscretization")
|
||||
|
||||
if pieces == 0:
|
||||
pieces = 10
|
||||
|
||||
@@ -32,17 +32,17 @@ import re
|
||||
import lazy_loader.lazy_loader as lz
|
||||
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
import draftutils.gui_utils as gui_utils
|
||||
import draftfunctions.draftify as ext_draftify
|
||||
import draftfunctions.fuse as fuse
|
||||
import draftmake.make_line as make_line
|
||||
import draftmake.make_wire as make_wire
|
||||
import draftmake.make_block as make_block
|
||||
|
||||
from draftfunctions import draftify
|
||||
from draftfunctions import fuse
|
||||
from draftgeoutils.geometry import is_straight_line
|
||||
from draftmake import make_block
|
||||
from draftmake import make_line
|
||||
from draftmake import make_wire
|
||||
from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils.messages import _msg, _err
|
||||
from draftutils.translate import translate
|
||||
from draftgeoutils.geometry import is_straight_line
|
||||
|
||||
# Delay import of module until first use because it is heavy
|
||||
Part = lz.LazyLoader("Part", globals(), "Part")
|
||||
@@ -216,9 +216,8 @@ def upgrade(objects, delete=False, force=None):
|
||||
|
||||
def makeShell(objectslist):
|
||||
"""Make a shell or compound with the given objects."""
|
||||
params = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
|
||||
preserveFaceColor = params.GetBool("preserveFaceColor") # True
|
||||
preserveFaceNames = params.GetBool("preserveFaceNames") # True
|
||||
preserveFaceColor = params.get_param("preserveFaceColor")
|
||||
preserveFaceNames = params.get_param("preserveFaceNames")
|
||||
faces = []
|
||||
facecolors = [[], []] if preserveFaceColor else None
|
||||
for obj in objectslist:
|
||||
@@ -424,7 +423,7 @@ def upgrade(objects, delete=False, force=None):
|
||||
"makeFusion" : makeFusion,
|
||||
"makeShell" : makeShell,
|
||||
"makeFaces" : makeFaces,
|
||||
"draftify" : ext_draftify.draftify,
|
||||
"draftify" : draftify.draftify,
|
||||
"joinFaces" : joinFaces,
|
||||
"makeSketchFace" : makeSketchFace,
|
||||
"makeWires" : makeWires,
|
||||
@@ -484,7 +483,7 @@ def upgrade(objects, delete=False, force=None):
|
||||
# only one object: if not parametric, we "draftify" it
|
||||
elif (len(objects) == 1
|
||||
and not objects[0].isDerivedFrom("Part::Part2DObjectPython")):
|
||||
result = ext_draftify.draftify(objects[0])
|
||||
result = draftify.draftify(objects[0])
|
||||
if result:
|
||||
add_list.append(result)
|
||||
_msg(translate("draft","Found 1 non-parametric objects: draftifying it"))
|
||||
@@ -523,7 +522,7 @@ def upgrade(objects, delete=False, force=None):
|
||||
# only one object: if not parametric, we "draftify" it
|
||||
# elif (len(objects) == 1
|
||||
# and not objects[0].isDerivedFrom("Part::Part2DObjectPython")):
|
||||
# result = ext_draftify.draftify(objects[0])
|
||||
# result = draftify.draftify(objects[0])
|
||||
# if result:
|
||||
# _msg(translate("draft","Found 1 non-parametric objects: draftifying it"))
|
||||
elif (len(objects) == 1 and len(edges) == 1
|
||||
@@ -532,7 +531,7 @@ def upgrade(objects, delete=False, force=None):
|
||||
edge_type = DraftGeomUtils.geomType(e)
|
||||
# currently only support Line and Circle
|
||||
if edge_type in ("Line", "Circle"):
|
||||
result = ext_draftify.draftify(objects[0])
|
||||
result = draftify.draftify(objects[0])
|
||||
if result:
|
||||
add_list.append(result)
|
||||
_msg(translate("draft","Found 1 object: draftifying it"))
|
||||
|
||||
@@ -31,13 +31,13 @@ import lazy_loader.lazy_loader as lz
|
||||
|
||||
import FreeCAD as App
|
||||
import DraftVecUtils
|
||||
from draftutils import params
|
||||
|
||||
# Delay import of module until first use because it is heavy
|
||||
Part = lz.LazyLoader("Part", globals(), "Part")
|
||||
|
||||
## \addtogroup draftgeoutils
|
||||
# @{
|
||||
PARAMGRP = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
|
||||
|
||||
# Default normal direction for all geometry operations
|
||||
NORM = App.Vector(0, 0, 1)
|
||||
@@ -54,9 +54,9 @@ def precision():
|
||||
# 15 that the code would never consider 2 points are coincident
|
||||
# as internal float is not that precise)
|
||||
precisionMax = 10
|
||||
precisionInt = PARAMGRP.GetInt("precision", 6)
|
||||
precisionInt = (precisionInt if precisionInt <= 10 else precisionMax)
|
||||
return precisionInt # return PARAMGRP.GetInt("precision", 6)
|
||||
precisionInt = params.get_param("precision")
|
||||
precisionInt = precisionInt if precisionInt <= 10 else precisionMax
|
||||
return precisionInt
|
||||
|
||||
|
||||
def vec(edge, use_orientation = False):
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
## \addtogroup draftmake
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
import draftutils.gui_utils as gui_utils
|
||||
|
||||
from draftobjects.clone import Clone
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils import gui_utils
|
||||
|
||||
if App.GuiUp:
|
||||
from draftutils.todo import ToDo
|
||||
@@ -58,7 +58,7 @@ def make_clone(obj, delta=None, forcedraft=False):
|
||||
|
||||
"""
|
||||
|
||||
prefix = utils.get_param("ClonePrefix","")
|
||||
prefix = params.get_param("ClonePrefix")
|
||||
|
||||
cl = None
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
## \addtogroup draftmake
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
import draftutils.gui_utils as gui_utils
|
||||
import draftutils.utils as utils
|
||||
import draftobjects.label as label
|
||||
|
||||
from draftobjects import label
|
||||
from draftutils import gui_utils
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils.messages import _msg, _wrn, _err
|
||||
from draftutils.translate import translate
|
||||
|
||||
@@ -355,7 +355,7 @@ def make_label(target_point=App.Vector(0, 0, 0),
|
||||
|
||||
if App.GuiUp:
|
||||
ViewProviderLabel(new_obj.ViewObject)
|
||||
h = utils.get_param("textheight", 0.20)
|
||||
h = params.get_param("textheight")
|
||||
new_obj.ViewObject.FontSize = h
|
||||
|
||||
gui_utils.format_object(new_obj)
|
||||
|
||||
@@ -29,19 +29,16 @@
|
||||
## \addtogroup draftmake
|
||||
# @{
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
|
||||
from draftobjects.layer import Layer, LayerContainer
|
||||
from draftutils import params
|
||||
from draftutils import utils
|
||||
from draftutils.messages import _msg, _err
|
||||
from draftutils.translate import translate
|
||||
from draftobjects.layer import (Layer,
|
||||
LayerContainer)
|
||||
|
||||
if App.GuiUp:
|
||||
from draftviewproviders.view_layer import (ViewProviderLayer,
|
||||
ViewProviderLayerContainer)
|
||||
|
||||
view_group = App.ParamGet("User parameter:BaseApp/Preferences/View")
|
||||
|
||||
|
||||
def get_layer_container():
|
||||
"""Return a group object to put layers in.
|
||||
@@ -171,7 +168,7 @@ def make_layer(name=None,
|
||||
_err(translate("draft","Wrong input: must be a tuple of three floats 0.0 to 1.0."))
|
||||
return None
|
||||
else:
|
||||
c = view_group.GetUnsigned("DefaultShapeLineColor", 255)
|
||||
c = params.get_param_view("DefaultShapeLineColor")
|
||||
line_color = (((c >> 24) & 0xFF) / 255,
|
||||
((c >> 16) & 0xFF) / 255,
|
||||
((c >> 8) & 0xFF) / 255)
|
||||
@@ -188,7 +185,7 @@ def make_layer(name=None,
|
||||
_err(translate("draft","Wrong input: must be a tuple of three floats 0.0 to 1.0."))
|
||||
return None
|
||||
else:
|
||||
c = view_group.GetUnsigned("DefaultShapeColor", 4294967295)
|
||||
c = params.get_param_view("DefaultShapeColor")
|
||||
shape_color = (((c >> 24) & 0xFF) / 255,
|
||||
((c >> 16) & 0xFF) / 255,
|
||||
((c >> 8) & 0xFF) / 255)
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
|
||||
from draftutils import params
|
||||
from draftobjects.base import DraftObject
|
||||
|
||||
|
||||
@@ -69,7 +68,7 @@ class BezCurve(DraftObject):
|
||||
"The area of this object")
|
||||
obj.addProperty("App::PropertyArea", "Area", "Draft", _tip)
|
||||
|
||||
obj.MakeFace = utils.get_param("fillmode", True)
|
||||
obj.MakeFace = params.get_param("fillmode")
|
||||
obj.Closed = False
|
||||
obj.Degree = 3
|
||||
obj.Continuity = []
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
|
||||
from draftobjects.base import DraftObject
|
||||
from draftutils import params
|
||||
|
||||
|
||||
class BSpline(DraftObject):
|
||||
@@ -56,7 +55,7 @@ class BSpline(DraftObject):
|
||||
_tip = QT_TRANSLATE_NOOP("App::Property", "The area of this object")
|
||||
obj.addProperty("App::PropertyArea","Area", "Draft", _tip)
|
||||
|
||||
obj.MakeFace = utils.get_param("fillmode",True)
|
||||
obj.MakeFace = params.get_param("fillmode")
|
||||
obj.Closed = False
|
||||
obj.Points = []
|
||||
self.assureProperties(obj)
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
|
||||
from draftobjects.base import DraftObject
|
||||
from draftutils import params
|
||||
|
||||
|
||||
class Circle(DraftObject):
|
||||
@@ -62,7 +61,7 @@ class Circle(DraftObject):
|
||||
obj.addProperty("App::PropertyArea", "Area",
|
||||
"Draft", _tip)
|
||||
|
||||
obj.MakeFace = utils.get_param("fillmode", True)
|
||||
obj.MakeFace = params.get_param("fillmode")
|
||||
|
||||
def execute(self, obj):
|
||||
"""This method is run when the object is created or recomputed."""
|
||||
|
||||
@@ -30,9 +30,8 @@
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
import FreeCAD as App
|
||||
import draftutils.utils as utils
|
||||
|
||||
from draftobjects.base import DraftObject
|
||||
from draftutils import params
|
||||
|
||||
|
||||
class Ellipse(DraftObject):
|
||||
@@ -60,7 +59,7 @@ class Ellipse(DraftObject):
|
||||
_tip = QT_TRANSLATE_NOOP("App::Property","Area of this object")
|
||||
obj.addProperty("App::PropertyArea", "Area","Draft", _tip)
|
||||
|
||||
obj.MakeFace = utils.get_param("fillmode",True)
|
||||
obj.MakeFace = params.get_param("fillmode")
|
||||
|
||||
def execute(self, obj):
|
||||
if self.props_changed_placement_only():
|
||||
|
||||
@@ -32,9 +32,8 @@ from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
import FreeCAD as App
|
||||
import DraftGeomUtils
|
||||
|
||||
from draftutils.utils import get_param
|
||||
from draftobjects.base import DraftObject
|
||||
from draftutils import params
|
||||
|
||||
|
||||
class Polygon(DraftObject):
|
||||
@@ -71,7 +70,7 @@ class Polygon(DraftObject):
|
||||
"The area of this object")
|
||||
obj.addProperty("App::PropertyArea", "Area", "Draft", _tip)
|
||||
|
||||
obj.MakeFace = get_param("fillmode",True)
|
||||
obj.MakeFace = params.get_param("fillmode")
|
||||
obj.DrawMode = ['inscribed','circumscribed']
|
||||
obj.FacesNumber = 0
|
||||
obj.Radius = 1
|
||||
|
||||
@@ -31,9 +31,8 @@ from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
import FreeCAD as App
|
||||
import DraftGeomUtils
|
||||
|
||||
from draftutils.utils import get_param
|
||||
from draftobjects.base import DraftObject
|
||||
from draftutils import params
|
||||
|
||||
|
||||
class Rectangle(DraftObject):
|
||||
@@ -66,7 +65,7 @@ class Rectangle(DraftObject):
|
||||
_tip = QT_TRANSLATE_NOOP("App::Property", "The area of this object")
|
||||
obj.addProperty("App::PropertyArea", "Area", "Draft", _tip)
|
||||
|
||||
obj.MakeFace = get_param("fillmode",True)
|
||||
obj.MakeFace = params.get_param("fillmode")
|
||||
obj.Length=1
|
||||
obj.Height=1
|
||||
obj.Rows=1
|
||||
|
||||
@@ -33,9 +33,8 @@ from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
import FreeCAD as App
|
||||
import DraftGeomUtils
|
||||
import DraftVecUtils
|
||||
|
||||
from draftutils.utils import get_param
|
||||
from draftobjects.base import DraftObject
|
||||
from draftutils import params
|
||||
|
||||
|
||||
class Wire(DraftObject):
|
||||
@@ -92,7 +91,7 @@ class Wire(DraftObject):
|
||||
"The area of this object")
|
||||
obj.addProperty("App::PropertyArea","Area", "Draft",_tip)
|
||||
|
||||
obj.MakeFace = get_param("fillmode",True)
|
||||
obj.MakeFace = params.get_param("fillmode")
|
||||
obj.Closed = False
|
||||
|
||||
def execute(self, obj):
|
||||
|
||||
@@ -368,11 +368,11 @@ def _get_param_dictionary():
|
||||
# For the View parameters we do not check the preferences:
|
||||
param_dict["View"] = {
|
||||
"DefaultShapeColor": ("unsigned", 3435973887),
|
||||
"DefaultShapeLineColor": ("unsigned", 255),
|
||||
"DefaultShapeLineColor": ("unsigned", 421075455),
|
||||
"DefaultShapeLineWidth": ("int", 2),
|
||||
"DefaultShapePointSize": ("int", 2),
|
||||
"DefaultShapeTransparency": ("int", 0),
|
||||
"DefaultShapeVertexColor": ("unsigned", 255),
|
||||
"DefaultShapeVertexColor": ("unsigned", 421075455),
|
||||
}
|
||||
|
||||
# Preferences ui files are stored in resource files.
|
||||
@@ -496,6 +496,10 @@ def get_param_arch(entry):
|
||||
return get_param(entry, path="Mod/Arch")
|
||||
|
||||
|
||||
def get_param_view(entry):
|
||||
return get_param(entry, path="View")
|
||||
|
||||
|
||||
def set_param(entry, value, path="Mod/Draft"):
|
||||
"""Store a parameter value.
|
||||
|
||||
@@ -538,3 +542,7 @@ def set_param(entry, value, path="Mod/Draft"):
|
||||
|
||||
def set_param_arch(entry, value):
|
||||
return set_param(entry, value, path="Mod/Arch")
|
||||
|
||||
|
||||
def set_param_view(entry, value):
|
||||
return set_param(entry, value, path="View")
|
||||
|
||||
Reference in New Issue
Block a user