Λογότυπο Custom Properties

Custom Properties

Κοινότητα
TMHSDigital
custom-properties

Define and bind custom properties with bpy.props annotations, PropertyGroup and PointerProperty, and choose where to store them (Scene, Object, WindowManager, AddonPreferences). Use when the user attaches settings or data to datablocks so it survives save and load, is unsure where add-on settings belong, or writes a property as an assignment instead of an annotation and gets a deprecation warning or a _PropertyDeferred value. Targets 5.2 LTS.

Επισκόπηση

ΕκδότηςTMHSDigital
ΑποθετήριοBlender-Developer-Tools
Όνομα δεξιότηταςcustom-properties
Αστέρια
20
Forks
5
Συνοδευτικά αρχεία
Μόνο οδηγίες
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Αυτοτελής

    Όλα όσα χρειάζεται το μοντέλο περιλαμβάνονται στις οδηγίες — χωρίς επιπλέον αρχεία για συγχρονισμό.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε από TMHSDigital στο GitHub. Διαβάστε το πηγαίο περιεχόμενο πριν εγκαταστήσετε τη δεξιότητα.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Custom Properties στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/custom-properties
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Νέα δεξιότητα → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που διαβάζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TMHSDigital/Blender-Developer-Tools.git /tmp/Blender-Developer-Tools
mkdir -p .claude/skills
cp -r /tmp/Blender-Developer-Tools/skills/custom-properties .claude/skills/custom-properties
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Custom Properties σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Custom Properties μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Custom Properties δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλα κατά τη συνομιλία

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

Custom Properties

Trigger

Use this skill when the user:

  • Wants to attach data to objects, scenes, or other Blender datablocks that survives save and load
  • Mentions bpy.props, PropertyGroup, PointerProperty, "custom properties"
  • Is unsure where to store add-on settings
  • Sees a deprecation warning about property assignment

Required inputs

  • What you want to store: a single number, a small struct, a list of items, or a complex hierarchy
  • Where it should live: Scene (per-document), Object (per-object), WindowManager (session-only), AddonPreferences (per-user)
  • Whether it must persist through save/load (almost always yes)

The type annotation form (mandatory since 2.8)

python
import bpy


class MY_ADDON_PG_settings(bpy.types.PropertyGroup):
    intensity: bpy.props.FloatProperty(
        name="Intensity",
        description="How strong the effect is",
        default=1.0,
        min=0.0,
        max=10.0,
    )
    use_smoothing: bpy.props.BoolProperty(name="Smooth", default=True)
    mode: bpy.props.EnumProperty(
        name="Mode",
        items=[
            ('FAST', "Fast", "Lower quality, faster"),
            ('GOOD', "Good", "Balanced"),
            ('BEST', "Best", "Best quality, slower"),
        ],
        default='GOOD',
    )

The properties are declared with : (PEP 526 annotations), not = (assignment). Blender's metaclass scans the annotation namespace and registers each bpy.props.* it finds.

The assignment form (intensity = bpy.props.FloatProperty(...)) is deprecated 2.8+ syntax. It silently does the wrong thing in some Blender versions and is rejected in others. Always use annotations.

See the rule type-annotate-props-and-defend-context for the rationale and the lint pattern.

The bpy.props types

TypeStores
BoolPropertyOne bool
IntPropertyOne signed int
FloatPropertyOne float
StringPropertyA unicode string, optionally a subtype='FILE_PATH'
EnumPropertyOne choice from a fixed list, with optional options={'ENUM_FLAG'} for multi-select
BoolVectorPropertyA fixed-size array of bools (size up to 32)
IntVectorPropertyA fixed-size array of ints
FloatVectorPropertyA fixed-size array of floats, often with subtype='COLOR' or subtype='TRANSLATION'
PointerPropertyA reference to another PropertyGroup (or built-in datablock type)
CollectionPropertyAn ordered, named list of PropertyGroup instances

Use subtype to get UI semantics for free: 'COLOR' opens a color picker, 'FILE_PATH' opens a file dialog, 'TRANSLATION'/'XYZ'/'EULER' get the right unit display.

Where to store the data

Custom properties are bound to a Blender type as a class attribute:

python
bpy.types.Scene.my_addon = bpy.props.PointerProperty(type=MY_ADDON_PG_settings)

This makes bpy.data.scenes['Scene'].my_addon.intensity work for every Scene in the file.

The four conventional storage locations and their tradeoffs:

LocationPersistenceScopeUse for
bpy.types.Scene.xSaved with the .blendPer-Scene (per-document)Add-on state that should travel with the file (export settings, custom render passes, baked data references)
bpy.types.Object.xSaved with the .blendPer-ObjectPer-object metadata (constraint config, custom rig data, asset tags)
bpy.types.WindowManager.xSession-only, not savedGlobal to the running BlenderTransient state (last used path, current modal step, temp UI flags)
AddonPreferencesSaved with the user preferencesPer-user, globalAPI keys, default paths, "always do X" preferences

You can also bind to bpy.types.Mesh, bpy.types.Material, bpy.types.Armature, etc. for datablock-specific data.

Picking storage

  • Will the user expect to save and reopen the file with these values? Yes -> Scene or Object.
  • Per-document or per-object? Per-document -> Scene. Per-object -> Object.
  • User-global, like an API key? -> AddonPreferences.
  • Transient session state, like the current step of a wizard? -> WindowManager.

The PropertyGroup plus PointerProperty pattern

Group your add-on's settings into one PropertyGroup and bind that group via a single PointerProperty:

python
class MY_ADDON_PG_settings(bpy.types.PropertyGroup):
    intensity: bpy.props.FloatProperty(default=1.0)
    use_smoothing: bpy.props.BoolProperty(default=True)


def register():
    bpy.utils.register_class(MY_ADDON_PG_settings)
    bpy.types.Scene.my_addon = bpy.props.PointerProperty(type=MY_ADDON_PG_settings)


def unregister():
    del bpy.types.Scene.my_addon
    bpy.utils.unregister_class(MY_ADDON_PG_settings)

You then access:

python
scene = context.scene
scene.my_addon.intensity = 2.0

This is far cleaner than binding individual FloatPropertys directly to Scene. It also gives you a clear unregister target.

del first, then unregister_class

The order matters. The bound PointerProperty references the PropertyGroup class. If you unregister the class first, the binding becomes dangling and Blender crashes on next save. Always:

python
def unregister():
    del bpy.types.Scene.my_addon
    bpy.utils.unregister_class(MY_ADDON_PG_settings)

Unbinding a type-level property is del bpy.types.Scene.my_addon on all Blender versions. See the snippet cross-version-property-delete.py for removing a custom ID property (also del, version-stable).

CollectionProperty (lists)

python
class MY_ADDON_PG_item(bpy.types.PropertyGroup):
    name: bpy.props.StringProperty()
    enabled: bpy.props.BoolProperty(default=True)


class MY_ADDON_PG_settings(bpy.types.PropertyGroup):
    items: bpy.props.CollectionProperty(type=MY_ADDON_PG_item)
    active_index: bpy.props.IntProperty(default=0)

Add an item:

python
new_item = scene.my_addon.items.add()
new_item.name = "First"

Remove by index:

python
scene.my_addon.items.remove(0)

CollectionProperty plus a paired active_index: IntProperty is the canonical pattern for bpy.types.UIList integration.

AddonPreferences

For per-user, global data:

python
class MY_ADDON_AP_preferences(bpy.types.AddonPreferences):
    bl_idname = __package__  # the add-on's package name

    api_key: bpy.props.StringProperty(name="API Key", subtype='PASSWORD')
    default_export_path: bpy.props.StringProperty(name="Default Export Path", subtype='DIR_PATH')

    def draw(self, context):
        layout = self.layout
        layout.prop(self, "api_key")
        layout.prop(self, "default_export_path")

Access via:

python
prefs = context.preferences.addons[__package__].preferences
api_key = prefs.api_key

AddonPreferences data persists in the user's preferences (userpref.blend), not the current document. Do not store per-document state here.

Why "just use Python attributes" does not work

python
# WRONG: raises AttributeError: 'Scene' object has no attribute 'my_intensity'
bpy.context.scene.my_intensity = 1.5

Blender datablocks do not accept arbitrary Python attributes: the assignment fails immediately, on 4.5 LTS and 5.x alike. Only registered bpy.props (or ID properties set with scene["key"] = value) exist on a datablock and are saved into the .blend file.

This is a frequent AI mistake when generating quick scripts. Always wrap state in a PropertyGroup bound via PointerProperty if it must persist.

Common AI mistakes

  1. Assignment form for properties:

    python
    class Bad(bpy.types.PropertyGroup):
        intensity = bpy.props.FloatProperty(default=0.5)  # silently broken

    See the rule type-annotate-props-and-defend-context.

  2. Storing complex state on Python attributes:

    python
    scene.my_data = {"items": [...]}  # AttributeError: not a registered property

    Ad-hoc ID properties (scene["my_data"] = ...) do save, but they are untyped and invisible to the UI; use a PropertyGroup for anything an add-on owns.

  3. Wrong unregister order (unregister class before deleting binding) -> crash on save.

  4. Binding individual properties directly to Scene instead of grouping into a PropertyGroup. Hard to unregister cleanly, pollutes the namespace.

  5. Storing per-document state in AddonPreferences -> data leaks across files.

  6. Confusing subtype='FILE_PATH' and 'DIR_PATH'. 'FILE_PATH' lets the user pick a file, 'DIR_PATH' a directory.

  7. Reading a registered property as an ID property on 5.x: scene["my_prop"], "my_prop" in scene.keys(), del scene["my_prop"], or a driver path of '["my_prop"]'. These worked on 4.x and raise KeyError / ValueError (or silently skip the prop) on 5.0+. Use scene.my_prop, scene.property_unset("my_prop"), scene.is_property_set("my_prop") and the plain "my_prop" path. See the compatibility section below.

Compatibility paths (4.5 LTS vs 5.0+)

Registered properties are not ID properties on 5.0+

On 4.x a value assigned to a registered bpy.props property was stored as an ID property, so dict-style access reached it. On 5.0+ it lives in a separate system-property group. Measured with bpy.types.Scene.my_prop = IntProperty(default=1) and scene.my_prop = 5:

Access4.5 LTS5.0+ (5.1.2, 5.2.1)
scene.my_prop55
scene["my_prop"]5KeyError
scene.get("my_prop")5None
"my_prop" in scene.keys()TrueFalse
del scene["my_prop"]resets to defaultKeyError
scene.path_resolve('["my_prop"]') (driver / keyframe path)5ValueError
scene.path_resolve("my_prop")55
scene.property_unset("my_prop"), scene.is_property_set("my_prop")workwork

So the cross-version code needs no branch: use attribute access to read and write, property_unset() to reset, is_property_set() to test, and the plain "my_prop" path for drivers and keyframes. keys() lists only user custom properties on 5.0+; the raw storage is id.bl_system_properties_get() (5.0+ only), which you should rarely need. A value saved by 4.5 still loads as the attribute on 5.2. Witness: examples/cross-version-property-delete/ (exit 8, falsifier --subscript-registered).

Deleting

Two distinct operations, both version-stable via del:

  • Unbind a type-level property (e.g. a PointerProperty bound to bpy.types.Scene): del bpy.types.Scene.my_addon. Same on 4.5 LTS and 5.0+.
  • Remove a custom ID property (the dict-style obj["key"]): del obj["key"]. Same on 4.5 LTS and 5.0+. The snippet cross-version-property-delete.py shows this.

Do not reach for property_unset() here. It resets a registered RNA property to its default, which is neither unbinding a type property nor removing an ID property. Conversely, del id["name"] is not a way to reset a registered property: it raises KeyError on 5.0+.

Related

  • addon-scaffolding for the registration boilerplate that wraps property registration
  • ui-panels for layout.prop reading these properties
  • Rule type-annotate-props-and-defend-context

Runnable examples

Each example runs headless, asserts the contract, and exits non-zero when it breaks. Run one with blender --background --python <script> --; pass a falsifier flag to watch the check fail.

Snippets

Short standalone patterns to copy. Each one runs in CI on 5.2 and 4.5 with a check and a falsifier.

References

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Custom Properties;

Define and bind custom properties with bpy.props annotations, PropertyGroup and PointerProperty, and choose where to store them (Scene, Object, WindowManager, AddonPreferences). Use when the user attaches settings or data to datablocks so it survives save and load, is unsure where add-on settings belong, or writes a property as an assignment instead of an annotation and gets a deprecation warning or a _PropertyDeferred value. Targets 5.2 LTS.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Custom Properties στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Custom Properties είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη Custom Properties στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε το https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/custom-properties. Το TypingMind διαβάζει το αρχείο SKILL.md και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Custom Properties;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη Custom Properties;

Με όσα θέλετε. Εφόσον ένα μοντέλο υποστηρίζει δεξιότητες, μπορείτε να χρησιμοποιήσετε τη Custom Properties με αυτό — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama και άλλα — όλα στο TypingMind με τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Custom Properties;

Δημοσιεύεται στο GitHub από τον χρήστη TMHSDigital. Ελέγξτε το αποθετήριο για τους όρους αδειοδότησης. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇