Fix #141948: No error on arbitrary assignments to PropertyGroup
Declare `__slots__` to prevent arbitrary assignment.
This commit is contained in:
@@ -673,8 +673,7 @@ def cli_extension(argv):
|
||||
|
||||
|
||||
class BlExtDummyGroup(bpy.types.PropertyGroup):
|
||||
# Dummy.
|
||||
pass
|
||||
__slots__ = ()
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -2113,6 +2113,8 @@ def import_panel_user_extension(context, layout):
|
||||
|
||||
|
||||
class GLTF2_filter_action(bpy.types.PropertyGroup):
|
||||
__slots__ = ()
|
||||
|
||||
keep: bpy.props.BoolProperty(name="Keep Animation")
|
||||
action: bpy.props.PointerProperty(type=bpy.types.Action)
|
||||
|
||||
|
||||
@@ -25,10 +25,14 @@ from bpy.props import (
|
||||
|
||||
|
||||
class SelectionEntry(PropertyGroup):
|
||||
__slots__ = ()
|
||||
|
||||
name: StringProperty(name="Bone Name", override={'LIBRARY_OVERRIDABLE'})
|
||||
|
||||
|
||||
class SelectionSet(PropertyGroup):
|
||||
__slots__ = ()
|
||||
|
||||
name: StringProperty(name="Set Name", override={'LIBRARY_OVERRIDABLE'})
|
||||
bone_ids: CollectionProperty(
|
||||
type=SelectionEntry,
|
||||
|
||||
@@ -29,6 +29,8 @@ from bpy.app.translations import (
|
||||
|
||||
|
||||
class NodeSetting(PropertyGroup):
|
||||
__slots__ = ()
|
||||
|
||||
value: StringProperty(
|
||||
name="Value",
|
||||
description="Python expression to be evaluated "
|
||||
|
||||
@@ -2665,6 +2665,8 @@ class WM_OT_toolbar_prompt(Operator):
|
||||
|
||||
|
||||
class BatchRenameAction(bpy.types.PropertyGroup):
|
||||
__slots__ = ()
|
||||
|
||||
# category: StringProperty()
|
||||
type: EnumProperty(
|
||||
name="Operation",
|
||||
|
||||
Reference in New Issue
Block a user