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
07f4730a
Commit
07f4730a
authored
7 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup: redundant lookups
parent
4bac8438
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
camera_turnaround.py
+5
-5
5 additions, 5 deletions
camera_turnaround.py
with
5 additions
and
5 deletions
camera_turnaround.py
+
5
−
5
View file @
07f4730a
...
@@ -21,7 +21,7 @@ bl_info = {
...
@@ -21,7 +21,7 @@ bl_info = {
"
author
"
:
"
Antonio Vazquez (antonioya)
"
,
"
author
"
:
"
Antonio Vazquez (antonioya)
"
,
"
version
"
:
(
0
,
2
,
5
),
"
version
"
:
(
0
,
2
,
5
),
"
blender
"
:
(
2
,
68
,
0
),
"
blender
"
:
(
2
,
68
,
0
),
"
location
"
:
"
View3D > Toolshelf > Turnaround
c
amera
"
,
"
location
"
:
"
View3D > Toolshelf >
Animation Tab >
Turnaround
C
amera
"
,
"
description
"
:
"
Add a camera rotation around selected object
"
,
"
description
"
:
"
Add a camera rotation around selected object
"
,
"
wiki_url
"
:
"
https://wiki.blender.org/index.php/Extensions:2.6/Py/
"
"
wiki_url
"
:
"
https://wiki.blender.org/index.php/Extensions:2.6/Py/
"
"
Scripts/Animation/TurnaroundCamera
"
,
"
Scripts/Animation/TurnaroundCamera
"
,
...
@@ -58,7 +58,7 @@ class RunAction(Operator):
...
@@ -58,7 +58,7 @@ class RunAction(Operator):
scene
=
context
.
scene
scene
=
context
.
scene
turn_camera
=
scene
.
turn_camera
turn_camera
=
scene
.
turn_camera
selectobject
=
context
.
active_object
selectobject
=
context
.
active_object
camera
=
bpy
.
data
.
objects
[
bpy
.
context
.
scene
.
camera
.
name
]
camera
=
context
.
scene
.
camera
savedcursor
=
bpy
.
context
.
scene
.
cursor_location
.
copy
()
# cursor position
savedcursor
=
bpy
.
context
.
scene
.
cursor_location
.
copy
()
# cursor position
savedframe
=
scene
.
frame_current
savedframe
=
scene
.
frame_current
if
turn_camera
.
use_cursor
is
False
:
if
turn_camera
.
use_cursor
is
False
:
...
@@ -68,7 +68,7 @@ class RunAction(Operator):
...
@@ -68,7 +68,7 @@ class RunAction(Operator):
# Create empty and parent
# Create empty and parent
# -------------------------
# -------------------------
bpy
.
ops
.
object
.
empty_add
(
type
=
'
PLAIN_AXES
'
)
bpy
.
ops
.
object
.
empty_add
(
type
=
'
PLAIN_AXES
'
)
myempty
=
bpy
.
data
.
objects
[
bpy
.
context
.
active_object
.
name
]
myempty
=
context
.
active_object
myempty
.
location
=
selectobject
.
location
myempty
.
location
=
selectobject
.
location
savedstate
=
myempty
.
matrix_world
savedstate
=
myempty
.
matrix_world
...
@@ -89,7 +89,7 @@ class RunAction(Operator):
...
@@ -89,7 +89,7 @@ class RunAction(Operator):
# -------------------------
# -------------------------
bpy
.
ops
.
object
.
select_all
(
False
)
bpy
.
ops
.
object
.
select_all
(
False
)
myempty
.
select
=
True
myempty
.
select
=
True
bpy
.
context
.
scene
.
objects
.
active
=
myempty
context
.
scene
.
objects
.
active
=
myempty
# save current configuration
# save current configuration
savedinterpolation
=
context
.
user_preferences
.
edit
.
keyframe_new_interpolation_type
savedinterpolation
=
context
.
user_preferences
.
edit
.
keyframe_new_interpolation_type
# change interpolation mode
# change interpolation mode
...
@@ -97,7 +97,7 @@ class RunAction(Operator):
...
@@ -97,7 +97,7 @@ class RunAction(Operator):
# create first frame
# create first frame
myempty
.
rotation_euler
=
(
0
,
0
,
0
)
myempty
.
rotation_euler
=
(
0
,
0
,
0
)
myempty
.
empty_draw_size
=
0.1
myempty
.
empty_draw_size
=
0.1
bpy
.
context
.
scene
.
frame_set
(
scene
.
frame_start
)
context
.
scene
.
frame_set
(
scene
.
frame_start
)
myempty
.
keyframe_insert
(
data_path
=
'
rotation_euler
'
,
frame
=
scene
.
frame_start
)
myempty
.
keyframe_insert
(
data_path
=
'
rotation_euler
'
,
frame
=
scene
.
frame_start
)
# Clear the Camera Animations if the option is checked
# Clear the Camera Animations if the option is checked
...
...
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