wolfhece.pyvertexvectors._vectorproperties

GUI-enabled vector properties with Wolf_Param dialog and textures.

Module Contents

class wolfhece.pyvertexvectors._vectorproperties.vectorproperties(lines: list[str] = None, parent: wolfhece.pyvertexvectors._vector.vector = None)[source]

Bases: wolfhece.pyvertexvectors._models.vectorpropertiesModel

Inheritance diagram of wolfhece.pyvertexvectors._vectorproperties.vectorproperties

GUI-enabled vector properties with Wolf_Param dialog and image textures.

Inherits all data storage, I/O, and color helpers from vectorpropertiesModel. Adds Wolf_Param property dialogs, genericImagetexture management, and wxPython interaction.

myprops: wolfhece.PyParams.Wolf_Param = None[source]
textureimage: wolfhece.wolf_texture.genericImagetexture = None[source]
init_extra()[source]

Override to add GUI-specific textureimage attribute.

property image_path: pathlib.Path[source]

Path to the attached image file.

load_unload_image()[source]

Load an attached image

_get_prop(props: wolfhece.PyParams.Wolf_Param, section: str, key: str, default=None)[source]

Get a property value from Wolf_Param with a fallback default.

_parse_width_profile(raw) list | None[source]

Convert a width profile string to a list or None.

Delegates to the base-class implementation on vectorpropertiesModel. See that method for the supported dense and sparse formats.

_convert_alignment_to_int(align: str, default: int = 1) int[source]

Convert alignment text to an integer enum used by Wolf_Param.

_convert_int_to_alignment(value: int, default: str = 'left') str[source]

Convert integer enum value to alignment text.

_is_shader_rendering_active() bool[source]

Return True when the parent zone currently renders vectors with shaders.

_remove_shader_ui_params()[source]

Remove shader-only parameters from the properties UI dictionaries.

_ensure_props_schema_matches_renderer()[source]

Rebuild the parameter schema when shader/list rendering mode changes.

unload_image()[source]

Unload the attached image

fill_property(props: wolfhece.PyParams.Wolf_Param = None, updateOGL: bool = True)[source]

Apply values from the properties dialog.

Called when the user presses Apply in the properties UI.

Parameters:
  • props – Property container; defaults to self.myprops.

  • updateOGL – If True, refresh the OpenGL display list.

_defaultprop()[source]

Create the default properties for the vector and the associated UI

destroyprop()[source]

Nullify the properties UI

Destroy has been called, so the UI is not visible anymore

show()[source]

Show the properties

Firstly, set default values Then, add the current properties to the UI

show_properties()[source]

Show the properties – alias of show()

hide_properties()[source]

Hide the properties

update_myprops()[source]

Update the properties

update_image_texture()[source]

Update the image texture if it exists

_offset_image_texture(delta_x: float, delta_y: float)[source]

Offset the image texture by a delta in X and Y directions.

Parameters:
  • delta_x – Translation along X.

  • delta_y – Translation along Y.

_reset_cached_offset()[source]

Reset the cached offset for the image texture