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
c6519481
Commit
c6519481
authored
14 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
clear some pep8 complaints
parent
01b2f679
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
io_anim_camera.py
+0
-1
0 additions, 1 deletion
io_anim_camera.py
io_import_scene_lwo.py
+2
-0
2 additions, 0 deletions
io_import_scene_lwo.py
modules/add_utils.py
+11
-10
11 additions, 10 deletions
modules/add_utils.py
space_view3d_copy_attributes.py
+5
-5
5 additions, 5 deletions
space_view3d_copy_attributes.py
with
18 additions
and
16 deletions
io_anim_camera.py
+
0
−
1
View file @
c6519481
...
...
@@ -77,7 +77,6 @@ def writeCameras(context, filepath, frame_start, frame_end, only_selected=False)
fw
(
"
cameras[
'
%s
'
] = obj
\n
"
%
obj
.
name
)
fw
(
"
\n
"
)
for
f
in
frame_range
:
scene
.
frame_set
(
f
)
fw
(
"
# new frame
\n
"
)
...
...
This diff is collapsed.
Click to expand it.
io_import_scene_lwo.py
+
2
−
0
View file @
c6519481
...
...
@@ -1242,9 +1242,11 @@ class IMPORT_OT_lwo(bpy.types.Operator):
def
menu_func
(
self
,
context
):
self
.
layout
.
operator
(
IMPORT_OT_lwo
.
bl_idname
,
text
=
"
LightWave Object (.lwo)
"
)
def
register
():
bpy
.
types
.
INFO_MT_file_import
.
append
(
menu_func
)
def
unregister
():
bpy
.
types
.
INFO_MT_file_import
.
remove
(
menu_func
)
...
...
This diff is collapsed.
Click to expand it.
modules/add_utils.py
+
11
−
10
View file @
c6519481
...
...
@@ -26,6 +26,7 @@ import bpy
import
mathutils
from
bpy.props
import
FloatVectorProperty
class
AddObjectHelper
:
'''
Helper Class for Add Object Operators
'''
location
=
FloatVectorProperty
(
name
=
'
Location
'
,
description
=
'
Location of new Object
'
)
...
...
@@ -66,11 +67,11 @@ def add_object_align_init(context, operator):
def
add_object_data
(
context
,
obdata
,
operator
=
None
):
'''
Create Object from data
context: Blender Context
obdata: Object data (mesh, curve, camera,...)
operator: the active operator (self)
Returns the Object
'''
...
...
@@ -115,26 +116,26 @@ def flatten_vector_list(list):
'''
flatten a list of vetcors to use in foreach_set and the like
'''
if
not
list
:
return
None
result
=
[]
result
=
[]
for
vec
in
list
:
result
.
extend
([
i
for
i
in
vec
])
return
result
def
list_to_vector_list
(
list
,
dimension
=
3
):
'''
make Vector objects out of a list
'''
#test if list contains right number of elements
result
=
[]
for
i
in
range
(
0
,
len
(
list
),
dimension
):
try
:
vec
=
mathutils
.
Vector
(
[
list
[
i
+
ind
]
for
ind
in
range
(
dimension
)]
)
vec
=
mathutils
.
Vector
([
list
[
i
+
ind
]
for
ind
in
range
(
dimension
)])
except
:
print
(
'
Number of elemnts doesnt match into the vectors.
'
)
return
None
result
.
append
(
vec
)
return
result
This diff is collapsed.
Click to expand it.
space_view3d_copy_attributes.py
+
5
−
5
View file @
c6519481
...
...
@@ -100,8 +100,8 @@ def getmat(bone, active, context, ignoreparent):
'''
data_bone
=
context
.
active_object
.
data
.
bones
[
bone
.
name
]
#all matrices are in armature space unless commented otherwise
otherloc
=
active
.
matrix
#
final 4x4 mat of target, location.
bonemat_local
=
Matrix
(
data_bone
.
matrix_local
)
#
self rest matrix
otherloc
=
active
.
matrix
#
final 4x4 mat of target, location.
bonemat_local
=
Matrix
(
data_bone
.
matrix_local
)
#
self rest matrix
if
data_bone
.
parent
:
parentposemat
=
Matrix
(
context
.
active_object
.
pose
.
bones
[
data_bone
.
parent
.
name
].
matrix
)
...
...
@@ -253,7 +253,7 @@ class CopySelectedPoseConstraints(bpy.types.Operator):
generic_copy
(
old_constraint
,
new_constraint
)
return
{
'
FINISHED
'
}
pose_ops
=
[]
#
list of pose mode copy operators
pose_ops
=
[]
#
list of pose mode copy operators
genops
(
pose_copies
,
pose_ops
,
"
pose.copy_
"
,
pose_poll_func
,
pLoopExec
)
...
...
@@ -387,7 +387,7 @@ def obWei(ob, active, context):
for
i
in
range
(
0
,
len
(
active
.
vertex_groups
)):
groups
=
active
.
vertex_groups
[
i
]
vgroups_IndexName
[
groups
.
index
]
=
groups
.
name
data
=
{}
# vert_indices, [(vgroup_index, weights)]
data
=
{}
# vert_indices, [(vgroup_index, weights)]
for
v
in
me_source
.
vertices
:
vg
=
v
.
groups
vi
=
v
.
index
...
...
@@ -728,7 +728,7 @@ def register():
kc
=
bpy
.
context
.
window_manager
.
keyconfigs
[
'
Blender
'
]
km
=
kc
.
keymaps
.
get
(
"
Object Mode
"
)
if
km
is
None
:
km
=
kc
.
keymaps
.
new
(
name
=
"
Object Mode
"
)
km
=
kc
.
keymaps
.
new
(
name
=
"
Object Mode
"
)
kmi
=
km
.
items
.
new
(
'
wm.call_menu
'
,
'
C
'
,
'
PRESS
'
,
ctrl
=
True
)
kmi
.
properties
.
name
=
'
VIEW3D_MT_copypopup
'
km
=
kc
.
keymaps
.
get
(
"
Pose
"
)
...
...
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