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
f888aca1
Commit
f888aca1
authored
2 years ago
by
Daniel Salazar
Browse files
Options
Downloads
Patches
Plain Diff
AnimAll: Preparation to support vertex creases when the API permits it
parent
f42d5a87
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
animation_animall.py
+39
-22
39 additions, 22 deletions
animation_animall.py
with
39 additions
and
22 deletions
animation_animall.py
+
39
−
22
View file @
f888aca1
...
@@ -42,24 +42,29 @@ class AnimallProperties(bpy.types.PropertyGroup):
...
@@ -42,24 +42,29 @@ class AnimallProperties(bpy.types.PropertyGroup):
description
=
"
Insert keyframes on active UV coordinates
"
,
description
=
"
Insert keyframes on active UV coordinates
"
,
default
=
False
default
=
False
)
)
key_ebevel
:
BoolProperty
(
name
=
"
Edge Bevel
"
,
description
=
"
Insert keyframes on edge bevel weight
"
,
default
=
False
)
key_vbevel
:
BoolProperty
(
key_vbevel
:
BoolProperty
(
name
=
"
Vertex Bevel
"
,
name
=
"
Vertex Bevel
"
,
description
=
"
Insert keyframes on vertex bevel weight
"
,
description
=
"
Insert keyframes on vertex bevel weight
"
,
default
=
False
default
=
False
)
)
key_crease
:
BoolProperty
(
key_ebevel
:
BoolProperty
(
name
=
"
Crease
"
,
name
=
"
Edge Bevel
"
,
description
=
"
Insert keyframes on edge creases
"
,
description
=
"
Insert keyframes on edge bevel weight
"
,
default
=
False
)
# key_vcrease: BoolProperty(
# name="Vertex Crease",
# description="Insert keyframes on vertex crease weight",
# default=False
# )
key_ecrease
:
BoolProperty
(
name
=
"
Edge Crease
"
,
description
=
"
Insert keyframes on edge crease weight
"
,
default
=
False
default
=
False
)
)
key_vgroups
:
BoolProperty
(
key_vgroups
:
BoolProperty
(
name
=
"
Vertex Group
"
,
name
=
"
Vertex Group
"
,
description
=
"
Insert keyframes on active
V
ertex group values
"
,
description
=
"
Insert keyframes on active
v
ertex group values
"
,
default
=
False
default
=
False
)
)
key_attribute
:
BoolProperty
(
key_attribute
:
BoolProperty
(
...
@@ -156,14 +161,16 @@ class VIEW3D_PT_animall(Panel):
...
@@ -156,14 +161,16 @@ class VIEW3D_PT_animall(Panel):
row
.
prop
(
animall_properties
,
"
key_points
"
)
row
.
prop
(
animall_properties
,
"
key_points
"
)
row
.
prop
(
animall_properties
,
"
key_shape
"
)
row
.
prop
(
animall_properties
,
"
key_shape
"
)
row
=
col
.
row
()
row
=
col
.
row
()
row
.
prop
(
animall_properties
,
"
key_ebevel
"
)
row
.
prop
(
animall_properties
,
"
key_vbevel
"
)
row
.
prop
(
animall_properties
,
"
key_vbevel
"
)
row
.
prop
(
animall_properties
,
"
key_ebevel
"
)
row
=
col
.
row
()
row
=
col
.
row
()
row
.
prop
(
animall_properties
,
"
key_crease
"
)
row
.
prop
(
animall_properties
,
"
key_
e
crease
"
)
row
.
prop
(
animall_properties
,
"
key_uvs
"
)
row
.
prop
(
animall_properties
,
"
key_uvs
"
)
row
=
col
.
row
()
row
=
col
.
row
()
row
.
prop
(
animall_properties
,
"
key_attribute
"
)
row
.
prop
(
animall_properties
,
"
key_attribute
"
)
row
.
prop
(
animall_properties
,
"
key_vgroups
"
)
row
.
prop
(
animall_properties
,
"
key_vgroups
"
)
row
=
col
.
row
()
# Vertex group update operator
# Vertex group update operator
if
(
context
.
active_object
is
not
None
if
(
context
.
active_object
is
not
None
...
@@ -311,18 +318,23 @@ class ANIM_OT_insert_keyframe_animall(Operator):
...
@@ -311,18 +318,23 @@ class ANIM_OT_insert_keyframe_animall(Operator):
if
not
animall_properties
.
key_selected
or
vert
.
select
:
if
not
animall_properties
.
key_selected
or
vert
.
select
:
insert_key
(
vert
,
'
bevel_weight
'
,
group
=
"
Vertex %s
"
%
v_i
)
insert_key
(
vert
,
'
bevel_weight
'
,
group
=
"
Vertex %s
"
%
v_i
)
if
animall_properties
.
key_ebevel
:
for
e_i
,
edge
in
enumerate
(
data
.
edges
):
if
not
animall_properties
.
key_selected
or
edge
.
select
:
insert_key
(
edge
,
'
bevel_weight
'
,
group
=
"
Edge %s
"
%
e_i
)
if
animall_properties
.
key_vgroups
:
if
animall_properties
.
key_vgroups
:
for
v_i
,
vert
in
enumerate
(
data
.
vertices
):
for
v_i
,
vert
in
enumerate
(
data
.
vertices
):
if
not
animall_properties
.
key_selected
or
vert
.
select
:
if
not
animall_properties
.
key_selected
or
vert
.
select
:
for
group
in
vert
.
groups
:
for
group
in
vert
.
groups
:
insert_key
(
group
,
'
weight
'
,
group
=
"
Vertex %s
"
%
v_i
)
insert_key
(
group
,
'
weight
'
,
group
=
"
Vertex %s
"
%
v_i
)
if
animall_properties
.
key_
ebevel
:
#
if animall_properties.key_
vcrease
:
for
e
_i
,
edge
in
enumerate
(
data
.
edg
es
):
#
for
v
_i,
vert
in enumerate(data.
vertic
es):
if
not
animall_properties
.
key_selected
or
edge
.
select
:
#
if not animall_properties.key_selected or
vert
.select:
insert_key
(
edge
,
'
bevel_weight
'
,
group
=
"
Edge
%s
"
%
e
_i
)
#
insert_key(
vert, 'crease
', group="
Vertex
%s" %
v
_i)
if
animall_properties
.
key_crease
:
if
animall_properties
.
key_
e
crease
:
for
e_i
,
edge
in
enumerate
(
data
.
edges
):
for
e_i
,
edge
in
enumerate
(
data
.
edges
):
if
not
animall_properties
.
key_selected
or
edge
.
select
:
if
not
animall_properties
.
key_selected
or
edge
.
select
:
insert_key
(
edge
,
'
crease
'
,
group
=
"
Edge %s
"
%
e_i
)
insert_key
(
edge
,
'
crease
'
,
group
=
"
Edge %s
"
%
e_i
)
...
@@ -437,20 +449,25 @@ class ANIM_OT_delete_keyframe_animall(Operator):
...
@@ -437,20 +449,25 @@ class ANIM_OT_delete_keyframe_animall(Operator):
if
not
animall_properties
.
key_selected
or
vert
.
select
:
if
not
animall_properties
.
key_selected
or
vert
.
select
:
delete_key
(
vert
,
'
bevel_weight
'
)
delete_key
(
vert
,
'
bevel_weight
'
)
if
animall_properties
.
key_ebevel
:
for
edge
in
data
.
edges
:
if
not
animall_properties
.
key_selected
or
edge
.
select
:
delete_key
(
edge
,
'
bevel_weight
'
)
if
animall_properties
.
key_vgroups
:
if
animall_properties
.
key_vgroups
:
for
vert
in
data
.
vertices
:
for
vert
in
data
.
vertices
:
if
not
animall_properties
.
key_selected
or
vert
.
select
:
if
not
animall_properties
.
key_selected
or
vert
.
select
:
for
group
in
vert
.
groups
:
for
group
in
vert
.
groups
:
delete_key
(
group
,
'
weight
'
)
delete_key
(
group
,
'
weight
'
)
if
animall_properties
.
key_
ebevel
:
#
if animall_properties.key_
vcrease
:
for
edge
in
data
.
edg
es
:
#
for
vert
in data.
vertic
es:
if
not
animall_properties
.
key_selected
or
edge
.
select
:
#
if not animall_properties.key_selected or
vert
.select:
delete_key
(
edge
,
'
bevel_weight
'
)
#
delete_key(
vert, 'crease
')
if
animall_properties
.
key_crease
:
if
animall_properties
.
key_
e
crease
:
for
edge
in
data
.
edges
:
for
edge
in
data
.
edges
:
if
not
animall_properties
.
key_selected
or
vert
.
select
:
if
not
animall_properties
.
key_selected
or
edge
.
select
:
delete_key
(
edge
,
'
crease
'
)
delete_key
(
edge
,
'
crease
'
)
if
animall_properties
.
key_shape
:
if
animall_properties
.
key_shape
:
...
...
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