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
bacbe518
Commit
bacbe518
authored
10 years ago
by
Brendon Murphy
Browse files
Options
Downloads
Patches
Plain Diff
remove from shift/a, add to "Create" tab. panel use fixes editmode context issues.
parent
33655612
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
+14
-14
14 additions, 14 deletions
object_add_chain.py
with
14 additions
and
14 deletions
object_add_chain.py
+
14
−
14
View file @
bacbe518
...
@@ -20,7 +20,7 @@ bl_info = {
...
@@ -20,7 +20,7 @@ bl_info = {
"
name
"
:
"
Add Chain
"
,
"
name
"
:
"
Add Chain
"
,
"
author
"
:
"
Brian Hinton (Nichod)
"
,
"
author
"
:
"
Brian Hinton (Nichod)
"
,
"
version
"
:
(
0
,
1
,
1
),
"
version
"
:
(
0
,
1
,
1
),
"
blender
"
:
(
2
,
68
,
0
),
"
blender
"
:
(
2
,
71
,
0
),
"
location
"
:
"
View3D > Add > Mesh
"
,
"
location
"
:
"
View3D > Add > Mesh
"
,
"
description
"
:
"
Adds Chain with curve guide for easy creation
"
,
"
description
"
:
"
Adds Chain with curve guide for easy creation
"
,
"
warning
"
:
""
,
"
warning
"
:
""
,
...
@@ -30,7 +30,7 @@ bl_info = {
...
@@ -30,7 +30,7 @@ bl_info = {
}
}
import
bpy
import
bpy
from
bpy.types
import
Operator
,
Panel
def
Add_Chain
():
def
Add_Chain
():
##Adds Empty to scene
##Adds Empty to scene
...
@@ -137,36 +137,36 @@ def Add_Chain():
...
@@ -137,36 +137,36 @@ def Add_Chain():
##Change Curve Modifier Parameters
##Change Curve Modifier Parameters
cur
.
object
=
curv
cur
.
object
=
curv
#makes AddChain an operator
class
AddChain
(
bpy
.
types
.
Operator
):
class
AddChain
(
bpy
.
types
.
Operator
):
"""
Add a Chain
"""
"""
Add a Chain
"""
bl_idname
=
"
mesh.primitive_chain_add
"
bl_idname
=
"
mesh.primitive_chain_add
"
bl_label
=
"
Add Chain
"
bl_label
=
"
Add Chain
"
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
bl_options
=
{
'
REGISTER
'
,
'
UNDO
'
}
def
execute
(
self
,
context
):
def
execute
(
self
,
context
):
Add_Chain
()
Add_Chain
()
return
{
'
FINISHED
'
}
return
{
'
FINISHED
'
}
# Register the operator
class
add_chain
(
Panel
):
def
menu_func
(
self
,
context
):
bl_space_type
=
'
VIEW_3D
'
self
.
layout
.
operator
(
AddChain
.
bl_idname
,
text
=
"
Chain
"
,
icon
=
'
PLUGIN
'
)
bl_region_type
=
'
TOOLS
'
bl_category
=
'
Create
'
bl_label
=
"
Add Chain
"
bl_context
=
"
objectmode
"
bl_options
=
{
'
DEFAULT_CLOSED
'
}
def
draw
(
self
,
context
):
layout
=
self
.
layout
layout
.
operator
(
AddChain
.
bl_idname
,
text
=
"
Chain
"
)
def
register
():
def
register
():
bpy
.
utils
.
register_module
(
__name__
)
bpy
.
utils
.
register_module
(
__name__
)
pass
# Add "Chain" menu to the "Add Mesh" menu.
bpy
.
types
.
INFO_MT_mesh_add
.
append
(
menu_func
)
def
unregister
():
def
unregister
():
bpy
.
utils
.
unregister_module
(
__name__
)
bpy
.
utils
.
unregister_module
(
__name__
)
pass
# Remove "Chain" menu from the "Add Mesh" menu.
bpy
.
types
.
INFO_MT_mesh_add
.
remove
(
menu_func
)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
register
()
register
()
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