obsproject / obsproject/obs-studio
Lua scripting OBS_ALIGN_* constants return nil
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
Operating System Info
Windows 10
Other OS
No response
OBS Studio Version
29.1.1
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/B4wPbEJh7WVBPCL0
OBS Studio Crash Log URL
No response
Expected Behavior
The values for obs.OBS_ALIGN_LEFT and others should return their defined bitmask values.
Current Behavior
Currently they return nil forcing to define them yourself in the Lua script.
Steps to Reproduce
- Write a simple script with
script_load - Output the OBS_ALIGN_LEFT in the script log using
obs.script_log - The output should be
nil
Anything else we should know?
This should either be defined for the Lua API or explicitly stated in the documentation that constants that were defined with macros and not enums can't be used as actual exported values. I assume the values would also be null for Python scripts as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Lua script_load and obs.script_log steps with obs.OBS_ALIGN_LEFT and the other OBS_ALIGN_* constants. Trace how the Lua API exposes constants defined as macros rather than enums, and check whether the same limitation applies to Python scripts. Done means the constants return their defined bitmask values or the API documentation explicitly states that they are unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100