Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
9c518302
Commit
9c518302
authored
14 years ago
by
Doug Hammond
Browse files
Options
Downloads
Patches
Plain Diff
extensions_framework: added reset() method to declarative_property_group
parent
70eada0e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/extensions_framework/__init__.py
+8
-0
8 additions, 0 deletions
modules/extensions_framework/__init__.py
with
8 additions
and
0 deletions
modules/extensions_framework/__init__.py
+
8
−
0
View file @
9c518302
...
...
@@ -270,6 +270,14 @@ class declarative_property_group(bpy.types.PropertyGroup):
if
'
save_in_preset
'
in
prop
.
keys
()
and
prop
[
'
save_in_preset
'
]:
out
.
append
(
prop
)
return
out
def
reset
(
self
):
"""
Reset all properties in this group to the default value,
if specified
"""
for
prop
in
self
.
properties
:
pk
=
prop
.
keys
()
if
'
attr
'
in
pk
and
'
default
'
in
pk
and
hasattr
(
self
,
prop
[
'
attr
'
]):
setattr
(
self
,
prop
[
'
attr
'
],
prop
[
'
default
'
])
class
Addon
(
object
):
"""
A list of classes registered by this addon
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment