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
d7b87f2e
Commit
d7b87f2e
authored
13 years ago
by
Brendon Murphy
Browse files
Options
Downloads
Patches
Plain Diff
fix for active layers & align to view errors.
thanks to jawra for the updates.
parent
28ed349f
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
object_add_chain.py
+7
-12
7 additions, 12 deletions
object_add_chain.py
with
7 additions
and
12 deletions
object_add_chain.py
+
7
−
12
View file @
d7b87f2e
...
...
@@ -37,12 +37,8 @@ def Add_Chain():
##Adds Empty to scene
bpy
.
ops
.
object
.
add
(
type
=
'
EMPTY
'
,
view_align
=
False
,
enter_editmode
=
False
,
location
=
(
0
,
0
,
0
),
rotation
=
(
0
,
0
,
0
),
layers
=
(
True
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
))
bpy
.
ops
.
object
.
add
(
type
=
'
EMPTY
'
,
view_align
=
False
,
enter_editmode
=
False
,
location
=
(
0
,
0
,
0
),
rotation
=
(
0
,
0
,
0
),)
##Changes name of Empty to rot_link adds variable emp
emp
=
bpy
.
context
.
object
...
...
@@ -52,12 +48,7 @@ def Add_Chain():
emp
.
rotation_euler
=
[
1.570796
,
0
,
0
]
##Adds Curve Path to scene
bpy
.
ops
.
curve
.
primitive_nurbs_path_add
(
view_align
=
False
,
enter_editmode
=
False
,
location
=
(
0
,
0
,
0
),
rotation
=
(
0
,
0
,
0
),
layers
=
(
True
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
,
False
))
bpy
.
ops
.
curve
.
primitive_nurbs_path_add
(
view_align
=
False
,
enter_editmode
=
False
,
location
=
(
0
,
0
,
0
),
rotation
=
(
0
,
0
,
0
),)
##Change Curve name to deform adds variable curv
curv
=
bpy
.
context
.
object
...
...
@@ -70,6 +61,10 @@ def Add_Chain():
##Positions Torus primitive to center of scene
bpy
.
context
.
active_object
.
location
=
[
0
,
0
,
0
]
##Reseting Torus rotation in case of 'Align to view' option enabled
bpy
.
context
.
active_object
.
rotation_euler
=
[
0
,
0
,
0
]
##Changes Torus name to chain adds variable tor
tor
=
bpy
.
context
.
object
...
...
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