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
556c218a
Commit
556c218a
authored
13 years ago
by
Doug Hammond
Browse files
Options
Downloads
Patches
Plain Diff
extensions_framework: update property creation code to support new property types and their options
parent
879788ca
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/extensions_framework/__init__.py
+25
-14
25 additions, 14 deletions
modules/extensions_framework/__init__.py
with
25 additions
and
14 deletions
modules/extensions_framework/__init__.py
+
25
−
14
View file @
556c218a
...
@@ -68,43 +68,54 @@ def init_properties(obj, props, cache=True):
...
@@ -68,43 +68,54 @@ def init_properties(obj, props, cache=True):
if
prop
[
'
type
'
]
==
'
bool
'
:
if
prop
[
'
type
'
]
==
'
bool
'
:
t
=
bpy
.
props
.
BoolProperty
t
=
bpy
.
props
.
BoolProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
'
name
'
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
'
description
'
,
'
default
'
]}
"
description
"
,
"
default
"
,
"
options
"
,
"
subtype
"
,
"
update
"
]}
elif
prop
[
'
type
'
]
==
'
bool_vector
'
:
t
=
bpy
.
props
.
BoolVectorProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
"
description
"
,
"
default
"
,
"
options
"
,
"
subtype
"
,
"
size
"
,
"
update
"
]}
elif
prop
[
'
type
'
]
==
'
collection
'
:
elif
prop
[
'
type
'
]
==
'
collection
'
:
t
=
bpy
.
props
.
CollectionProperty
t
=
bpy
.
props
.
CollectionProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
ptype
"
,
"
name
"
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
ptype
"
,
"
name
"
,
"
description
"
]}
"
description
"
,
"
default
"
,
"
options
"
]}
a
[
'
type
'
]
=
a
[
'
ptype
'
]
a
[
'
type
'
]
=
a
[
'
ptype
'
]
del
a
[
'
ptype
'
]
del
a
[
'
ptype
'
]
elif
prop
[
'
type
'
]
==
'
enum
'
:
elif
prop
[
'
type
'
]
==
'
enum
'
:
t
=
bpy
.
props
.
EnumProperty
t
=
bpy
.
props
.
EnumProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
items
"
,
"
name
"
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
items
"
,
"
name
"
,
"
description
"
,
"
default
"
]}
"
description
"
,
"
default
"
,
"
options
"
,
"
update
"
]}
elif
prop
[
'
type
'
]
==
'
float
'
:
elif
prop
[
'
type
'
]
==
'
float
'
:
t
=
bpy
.
props
.
FloatProperty
t
=
bpy
.
props
.
FloatProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
"
description
"
,
"
min
"
,
"
max
"
,
"
soft_min
"
,
"
soft_max
"
,
"
description
"
,
"
default
"
,
"
min
"
,
"
max
"
,
"
soft_min
"
,
"
soft_max
"
,
"
default
"
,
"
precision
"
]}
"
step
"
,
"
precision
"
,
"
options
"
,
"
subtype
"
,
"
unit
"
,
"
update
"
]}
elif
prop
[
'
type
'
]
==
'
float_vector
'
:
elif
prop
[
'
type
'
]
==
'
float_vector
'
:
t
=
bpy
.
props
.
FloatVectorProperty
t
=
bpy
.
props
.
FloatVectorProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
"
description
"
,
"
min
"
,
"
max
"
,
"
soft_min
"
,
"
soft_max
"
,
"
description
"
,
"
default
"
,
"
min
"
,
"
max
"
,
"
soft_min
"
,
"
soft_max
"
,
"
default
"
,
"
precision
"
,
"
size
"
,
"
subtype
"
]}
"
step
"
,
"
precision
"
,
"
options
"
,
"
subtype
"
,
"
size
"
,
"
update
"
]}
elif
prop
[
'
type
'
]
==
'
int
'
:
elif
prop
[
'
type
'
]
==
'
int
'
:
t
=
bpy
.
props
.
IntProperty
t
=
bpy
.
props
.
IntProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
"
description
"
,
"
min
"
,
"
max
"
,
"
soft_min
"
,
"
soft_max
"
,
"
description
"
,
"
default
"
,
"
min
"
,
"
max
"
,
"
soft_min
"
,
"
soft_max
"
,
"
default
"
]}
"
step
"
,
"
options
"
,
"
subtype
"
,
"
update
"
]}
elif
prop
[
'
type
'
]
==
'
int_vector
'
:
t
=
bpy
.
props
.
IntVectorProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
"
description
"
,
"
default
"
,
"
min
"
,
"
max
"
,
"
soft_min
"
,
"
soft_max
"
,
"
options
"
,
"
subtype
"
,
"
size
"
,
"
update
"
]}
elif
prop
[
'
type
'
]
==
'
pointer
'
:
elif
prop
[
'
type
'
]
==
'
pointer
'
:
t
=
bpy
.
props
.
PointerProperty
t
=
bpy
.
props
.
PointerProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
ptype
"
,
"
name
"
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
ptype
"
,
"
name
"
,
"
description
"
]}
"
description
"
,
"
options
"
,
"
update
"
]}
a
[
'
type
'
]
=
a
[
'
ptype
'
]
a
[
'
type
'
]
=
a
[
'
ptype
'
]
del
a
[
'
ptype
'
]
del
a
[
'
ptype
'
]
elif
prop
[
'
type
'
]
==
'
string
'
:
elif
prop
[
'
type
'
]
==
'
string
'
:
t
=
bpy
.
props
.
StringProperty
t
=
bpy
.
props
.
StringProperty
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
a
=
{
k
:
v
for
k
,
v
in
prop
.
items
()
if
k
in
[
"
name
"
,
"
description
"
,
"
maxlen
"
,
"
default
"
,
"
subtype
"
]}
"
description
"
,
"
default
"
,
"
maxlen
"
,
"
options
"
,
"
subtype
"
,
"
update
"
]}
else
:
else
:
continue
continue
...
...
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