Post #4729: Think of it simply. You can use it when you want to hold your own unique values.
📋 Metadata
- Author: Pluglug
- Date: 2023-05-16 15:06:05
- Type:
answer - Quality Score: 7/10
- Reply to: post_04728
- Replies (1): post_04742
🏷️ Tags
⚙️ Related PME Features
- Property Editor
- Python Scripting
💬 Content
Think of it simply. You can use it when you want to hold your own unique values.
To be honest, I can’t think of any other explanation.
For example, if you need an alarm clock, you’ll need a property for the time the alarm goes off. You may also need a property to toggle the alarm ON/OFF. If you want to choose the type of alarm sound, you can set that as a property as well.
And then, you can execute the script using the values stored in the properties.
import datetime
# Store the values
alarm_enabled = True
alarm_time = datetime.time(10, 0) # 10 AM
def test_alarm():
current_time = datetime.datetime.now().time()
if alarm_enabled:
if current_time >= alarm_time:
print("The alarm is ringing! Time to wake up!")
else:
print("The alarm is not ringing yet. You can sleep more!")
else:
print("The alarm is not enabled. Let's sleep till noon!")
# Test the state of the alarm
test_alarm()
PME Property allows you to store and manage properties within PME, but its functionality and usage purposes should be considered similar to Blender’s custom properties. So please look into that. You should also find many usage examples.
Search results for ‘custom properties’ - Blender Artists Community
Custom Properties - Scripting for Artists - Blender Studio
❤️ 1 likes