low.actions

900+ HWP action wrappers.

actions._Actions

low.actions._Actions(app)

Dynamic action dispatcher with instance caching.

Actions are resolved via getattr using the _action_info dict. Resolved _Action instances are cached so repeated access does not trigger repeated COM calls.

Usage: app.actions.CharShape # cached _Action app.actions.get_pset_class(…) # introspect without COM app.actions.refresh() # clear cache β€˜CharShape’ in app.actions # membership test

Methods

Name Description
get_description Get action description without creating _Action.
get_pset_class Get the ParameterSet class for an action WITHOUT creating _Action.
list_actions List all available action names.
refresh Invalidate cache; next access creates fresh _Action with HWP defaults.

get_description

low.actions._Actions.get_description(action_name)

Get action description without creating _Action.

get_pset_class

low.actions._Actions.get_pset_class(action_name)

Get the ParameterSet class for an action WITHOUT creating _Action.

This is a cheap introspection β€” no COM calls.

Returns: ParameterSet subclass, or None if the action has no pset.

Raises: KeyError: if action_name is unknown.

list_actions

low.actions._Actions.list_actions(with_pset_only=False)

List all available action names.

Args: with_pset_only: if True, return only actions that have a ParameterSet.

refresh

low.actions._Actions.refresh(name=None)

Invalidate cache; next access creates fresh _Action with HWP defaults.

Args: name: action name to refresh. None clears entire cache.

actions._Action

low.actions._Action(app, action_key)

ν•œκΈ€ Action 클래슀. app.api.CreateAction() 둜 μƒμ„±λ˜λŠ” HWP μ•‘μ…˜μ„ 감싼 얇은 래퍼.

λ¬Έμ„œ 바인딩 κ·œμΉ™ (v0.0.4+): CreateAction() 은 호좜 μ‹œμ μ˜ ν™œμ„± λ¬Έμ„œ 에 λ°”μΈλ”©λœ action 을 λ°˜ν™˜ν•©λ‹ˆλ‹€. κ³Όκ±°μ—λŠ” __init__ μ—μ„œ ν•œ 번만 ν˜ΈμΆœν–ˆκΈ° λ•Œλ¬Έμ— 이후 λ‹€λ₯Έ λ¬Έμ„œλ‘œ μ „ν™˜ν•΄λ„ action 이 μ›λž˜ λ¬Έμ„œμ— 계속 writes ν•˜λŠ” 버그가 μžˆμ—ˆμŠ΅λ‹ˆλ‹€.

μ΄μ œλŠ” act 와 pset 을 ν™œμ„± λ¬Έμ„œ ID λ³„λ‘œ lazy-cache ν•©λ‹ˆλ‹€. 동일 λ¬Έμ„œμ—μ„œλŠ” μΊμ‹œ 히트, λ‹€λ₯Έ λ¬Έμ„œλ‘œ μ „ν™˜ν•˜λ©΄ μžλ™μœΌλ‘œ μƒˆ action 을 μƒμ„±ν•©λ‹ˆλ‹€. Public API λŠ” κΈ°μ‘΄κ³Ό λ™μΌν•©λ‹ˆλ‹€.

Attributes

Name Description
act ν˜„μž¬ ν™œμ„± λ¬Έμ„œμ— λ°”μΈλ”©λœ IXHwpAction.
pset ν˜„μž¬ ν™œμ„± λ¬Έμ„œμ— λ°”μΈλ”©λœ wrapped ParameterSet.

Methods

Name Description
get_pset Return ParameterSet bound to global HParameterSet node (HAction pattern).
run Execute the action using pset-based approach.

get_pset

low.actions._Action.get_pset()

Return ParameterSet bound to global HParameterSet node (HAction pattern).

This is the β€˜HAction’ style described in HWP Automation docs (p.60): HAction.GetDefault(actname, HParameterSet.HXxx.HSet) HParameterSet.HXxx. = value HAction.Execute(actname, HParameterSet.HXxx.HSet)

The returned ParameterSet shares state with the global HParameterSet, unlike .pset which uses a local pset from CreateSet().

run

low.actions._Action.run(parameterset=None)

Execute the action using pset-based approach. Direct execution with pset objects without HSet synchronization.

Back to top