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
2f4c557d
Commit
2f4c557d
authored
5 years ago
by
Spivak Vladimir (cwolf3d)
Browse files
Options
Downloads
Patches
Plain Diff
Fix T72654: Bolt Factory: Missing Data after Change Bolt.
parent
6d78df97
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
add_mesh_BoltFactory/Boltfactory.py
+17
-22
17 additions, 22 deletions
add_mesh_BoltFactory/Boltfactory.py
with
17 additions
and
22 deletions
add_mesh_BoltFactory/Boltfactory.py
+
17
−
22
View file @
2f4c557d
...
@@ -342,26 +342,23 @@ class add_mesh_bolt(Operator, AddObjectHelper):
...
@@ -342,26 +342,23 @@ class add_mesh_bolt(Operator, AddObjectHelper):
def
execute
(
self
,
context
):
def
execute
(
self
,
context
):
if
bpy
.
context
.
mode
==
"
OBJECT
"
:
if
bpy
.
context
.
mode
==
"
OBJECT
"
:
if
self
.
change
==
True
and
self
.
change
!=
None
:
if
context
.
selected_objects
!=
[]
and
context
.
active_object
and
\
(
'
Bolt
'
in
context
.
active_object
.
data
.
keys
())
and
(
self
.
change
==
True
):
obj
=
context
.
active_object
obj
=
context
.
active_object
if
'
Bolt
'
in
obj
.
data
.
keys
():
oldmesh
=
obj
.
data
oldmesh
=
obj
.
data
oldmeshname
=
obj
.
data
.
name
oldmeshname
=
obj
.
data
.
name
mesh
=
createMesh
.
Create_New_Mesh
(
self
,
context
)
mesh
=
createMesh
.
Create_New_Mesh
(
self
,
context
)
obj
.
data
=
mesh
obj
.
data
=
mesh
try
:
try
:
bpy
.
ops
.
object
.
vertex_group_remove
(
all
=
True
)
bpy
.
ops
.
object
.
vertex_group_remove
(
all
=
True
)
except
:
except
:
pass
pass
for
material
in
oldmesh
.
materials
:
obj
.
data
.
materials
.
append
(
material
)
for
material
in
oldmesh
.
materials
:
bpy
.
data
.
meshes
.
remove
(
oldmesh
)
obj
.
data
.
materials
.
append
(
material
)
obj
.
data
.
name
=
oldmeshname
bpy
.
data
.
meshes
.
remove
(
oldmesh
)
obj
.
data
.
name
=
oldmeshname
else
:
mesh
=
createMesh
.
Create_New_Mesh
(
self
,
context
)
obj
=
object_utils
.
object_data_add
(
context
,
mesh
,
operator
=
None
)
else
:
else
:
mesh
=
createMesh
.
Create_New_Mesh
(
self
,
context
)
mesh
=
createMesh
.
Create_New_Mesh
(
self
,
context
)
obj
=
object_utils
.
object_data_add
(
context
,
mesh
,
operator
=
None
)
obj
=
object_utils
.
object_data_add
(
context
,
mesh
,
operator
=
None
)
...
@@ -408,10 +405,8 @@ def Bolt_contex_menu(self, context):
...
@@ -408,10 +405,8 @@ def Bolt_contex_menu(self, context):
def
menu_func_bolt
(
self
,
context
):
def
menu_func_bolt
(
self
,
context
):
layout
=
self
.
layout
layout
=
self
.
layout
layout
.
separator
()
layout
.
separator
()
self
.
layout
.
operator
(
oper
=
self
.
layout
.
operator
(
add_mesh_bolt
.
bl_idname
,
text
=
"
Bolt
"
,
icon
=
"
MOD_SCREW
"
)
add_mesh_bolt
.
bl_idname
,
oper
.
change
=
False
text
=
"
Bolt
"
,
icon
=
"
MOD_SCREW
"
)
classes
=
(
classes
=
(
add_mesh_bolt
,
add_mesh_bolt
,
...
...
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