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
d60a762d
Commit
d60a762d
authored
13 years ago
by
Brendon Murphy
Browse files
Options
Downloads
Patches
Plain Diff
fix for object_select by name
fix for remove doubles
parent
f01e6b1b
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
mesh_bsurfaces.py
+21
-7
21 additions, 7 deletions
mesh_bsurfaces.py
with
21 additions
and
7 deletions
mesh_bsurfaces.py
+
21
−
7
View file @
d60a762d
...
...
@@ -278,9 +278,12 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
ob_gp_strokes
.
name
=
"
SURFSK_temp_strokes
"
bpy
.
ops
.
object
.
select_all
(
'
INVOKE_REGION_WIN
'
,
action
=
'
DESELECT
'
)
bpy
.
ops
.
object
.
select_name
(
'
INVOKE_REGION_WIN
'
,
name
=
ob_gp_strokes
.
name
)
myobject
=
bpy
.
data
.
objects
[
ob_gp_strokes
.
name
]
bpy
.
context
.
scene
.
objects
.
active
=
myobject
myobject
.
select
=
True
# bpy.ops.object.select_name('INVOKE_REGION_WIN', name = ob_gp_strokes.name)
bpy
.
context
.
scene
.
objects
.
active
=
bpy
.
context
.
scene
.
objects
[
ob_gp_strokes
.
name
]
...
...
@@ -298,7 +301,9 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
bpy
.
ops
.
object
.
editmode_toggle
(
'
INVOKE_REGION_WIN
'
)
bpy
.
ops
.
object
.
select_all
(
'
INVOKE_REGION_WIN
'
,
action
=
'
DESELECT
'
)
bpy
.
ops
.
object
.
select_name
(
'
INVOKE_REGION_WIN
'
,
name
=
ob_gp_strokes
.
name
)
myobject
=
bpy
.
data
.
objects
[
ob_gp_strokes
.
name
]
bpy
.
context
.
scene
.
objects
.
active
=
myobject
myobject
.
select
=
True
bpy
.
context
.
scene
.
objects
.
active
=
bpy
.
context
.
scene
.
objects
[
ob_gp_strokes
.
name
]
...
...
@@ -594,7 +599,10 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
vert_num_in_spline
+=
1
bpy
.
ops
.
object
.
select_all
(
'
INVOKE_REGION_WIN
'
,
action
=
'
DESELECT
'
)
bpy
.
ops
.
object
.
select_name
(
'
INVOKE_REGION_WIN
'
,
name
=
ob_ctrl_pts
.
name
)
myobject
=
bpy
.
data
.
objects
[
ob_ctrl_pts
.
name
]
bpy
.
context
.
scene
.
objects
.
active
=
myobject
myobject
.
select
=
True
# bpy.ops.object.select_name('INVOKE_REGION_WIN', name = ob_ctrl_pts.name)
bpy
.
context
.
scene
.
objects
.
active
=
bpy
.
data
.
objects
[
ob_ctrl_pts
.
name
]
...
...
@@ -678,12 +686,18 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
#### Delete object with control points and object from grease pencil convertion.
bpy
.
ops
.
object
.
select_all
(
'
INVOKE_REGION_WIN
'
,
action
=
'
DESELECT
'
)
bpy
.
ops
.
object
.
select_name
(
'
INVOKE_REGION_WIN
'
,
name
=
ob_ctrl_pts
.
name
)
myobject
=
bpy
.
data
.
objects
[
ob_ctrl_pts
.
name
]
bpy
.
context
.
scene
.
objects
.
active
=
myobject
myobject
.
select
=
True
# bpy.ops.object.select_name('INVOKE_REGION_WIN', name = ob_ctrl_pts.name)
bpy
.
context
.
scene
.
objects
.
active
=
bpy
.
data
.
objects
[
ob_ctrl_pts
.
name
]
bpy
.
ops
.
object
.
delete
()
bpy
.
ops
.
object
.
select_all
(
'
INVOKE_REGION_WIN
'
,
action
=
'
DESELECT
'
)
bpy
.
ops
.
object
.
select_name
(
'
INVOKE_REGION_WIN
'
,
name
=
ob_gp_strokes
.
name
)
myobject
=
bpy
.
data
.
objects
[
ob_gp_strokes
.
name
]
bpy
.
context
.
scene
.
objects
.
active
=
myobject
myobject
.
select
=
True
# bpy.ops.object.select_name('INVOKE_REGION_WIN', name = ob_gp_strokes.name)
bpy
.
context
.
scene
.
objects
.
active
=
bpy
.
data
.
objects
[
ob_gp_strokes
.
name
]
bpy
.
ops
.
object
.
delete
()
...
...
@@ -724,7 +738,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
bpy
.
context
.
scene
.
objects
.
active
=
bpy
.
data
.
objects
[
self
.
main_object
.
name
]
bpy
.
ops
.
object
.
join
(
'
INVOKE_REGION_WIN
'
)
bpy
.
ops
.
object
.
editmode_toggle
(
'
INVOKE_REGION_WIN
'
)
bpy
.
ops
.
mesh
.
remove_doubles
(
'
INVOKE_REGION_WIN
'
,
limi
t
=
0.0001
)
bpy
.
ops
.
mesh
.
remove_doubles
(
'
INVOKE_REGION_WIN
'
,
mergedis
t
=
0.0001
)
bpy
.
ops
.
mesh
.
normals_make_consistent
(
'
INVOKE_REGION_WIN
'
,
inside
=
False
)
bpy
.
ops
.
mesh
.
select_all
(
'
INVOKE_REGION_WIN
'
,
action
=
'
DESELECT
'
)
...
...
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