wolfhece.pyvertexvectors._vectorproperties ========================================== .. py:module:: wolfhece.pyvertexvectors._vectorproperties .. autoapi-nested-parse:: GUI-enabled vector properties with Wolf_Param dialog and textures. Module Contents --------------- .. py:class:: vectorproperties(lines: list[str] = None, parent: wolfhece.pyvertexvectors._vector.vector = None) Bases: :py:obj:`wolfhece.pyvertexvectors._models.vectorpropertiesModel` .. autoapi-inheritance-diagram:: wolfhece.pyvertexvectors._vectorproperties.vectorproperties :parts: 1 :private-bases: GUI-enabled vector properties with Wolf_Param dialog and image textures. Inherits all data storage, I/O, and color helpers from :class:`vectorpropertiesModel`. Adds ``Wolf_Param`` property dialogs, ``genericImagetexture`` management, and wxPython interaction. .. py:attribute:: myprops :type: wolfhece.PyParams.Wolf_Param :value: None .. py:attribute:: textureimage :type: wolfhece.wolf_texture.genericImagetexture :value: None .. py:method:: init_extra() Override to add GUI-specific ``textureimage`` attribute. .. py:property:: image_path :type: pathlib.Path Path to the attached image file. .. py:method:: load_unload_image() Load an attached image .. py:method:: _get_prop(props: wolfhece.PyParams.Wolf_Param, section: str, key: str, default=None) Get a property value from ``Wolf_Param`` with a fallback default. .. py:method:: _parse_width_profile(raw) -> list | None Convert a width profile string to a list or ``None``. Delegates to the base-class implementation on :class:`~wolfhece.pyvertexvectors._models.vectorpropertiesModel`. See that method for the supported dense and sparse formats. .. py:method:: _convert_alignment_to_int(align: str, default: int = 1) -> int Convert alignment text to an integer enum used by Wolf_Param. .. py:method:: _convert_int_to_alignment(value: int, default: str = 'left') -> str Convert integer enum value to alignment text. .. py:method:: _is_shader_rendering_active() -> bool Return True when the parent zone currently renders vectors with shaders. .. py:method:: _remove_shader_ui_params() Remove shader-only parameters from the properties UI dictionaries. .. py:method:: _ensure_props_schema_matches_renderer() Rebuild the parameter schema when shader/list rendering mode changes. .. py:method:: unload_image() Unload the attached image .. py:method:: fill_property(props: wolfhece.PyParams.Wolf_Param = None, updateOGL: bool = True) Apply values from the properties dialog. Called when the user presses *Apply* in the properties UI. :param props: Property container; defaults to ``self.myprops``. :param updateOGL: If True, refresh the OpenGL display list. .. py:method:: _defaultprop() Create the default properties for the vector and the associated UI .. py:method:: destroyprop() Nullify the properties UI Destroy has been called, so the UI is not visible anymore .. py:method:: show() Show the properties Firstly, set default values Then, add the current properties to the UI .. py:method:: show_properties() Show the properties -- alias of show() .. py:method:: hide_properties() Hide the properties .. py:method:: update_myprops() Update the properties .. py:method:: update_image_texture() Update the image texture if it exists .. py:method:: _offset_image_texture(delta_x: float, delta_y: float) Offset the image texture by a delta in X and Y directions. :param delta_x: Translation along X. :param delta_y: Translation along Y. .. py:method:: _reset_cached_offset() Reset the cached offset for the image texture