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
a612ccea
Commit
a612ccea
authored
11 years ago
by
Paul Geraskin
Browse files
Options
Downloads
Patches
Plain Diff
[TextureAtlas] small refactoring of autoUnwrap.
parent
7a08a9d5
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
uv_texture_atlas.py
+17
-12
17 additions, 12 deletions
uv_texture_atlas.py
with
17 additions
and
12 deletions
uv_texture_atlas.py
+
17
−
12
View file @
a612ccea
...
...
@@ -525,7 +525,7 @@ class CreateLightmap(Operator):
for
object
in
NON_MESH_LIST
:
obj_group
.
objects
.
unlink
(
object
)
NON_MESH_LIST
.
clear
()
# clear array
NON_MESH_LIST
.
clear
()
# clear array
return
{
'
FINISHED
'
}
...
...
@@ -638,17 +638,22 @@ class MergeObjects(Operator):
bpy
.
ops
.
object
.
select_all
(
action
=
'
DESELECT
'
)
ob_merge
.
select
=
True
scene
.
objects
.
active
=
ob_merge
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
EDIT
'
)
bpy
.
ops
.
mesh
.
select_all
(
action
=
'
SELECT
'
)
if
self
.
unwrap
is
True
and
scene
.
ms_lightmap_groups
[
self
.
group_name
].
unwrap_type
==
'
0
'
:
bpy
.
ops
.
uv
.
smart_project
(
angle_limit
=
72.0
,
island_margin
=
0.2
,
user_area_weight
=
0.0
)
elif
self
.
unwrap
is
True
and
scene
.
ms_lightmap_groups
[
self
.
group_name
].
unwrap_type
==
'
1
'
:
bpy
.
ops
.
uv
.
lightmap_pack
(
PREF_CONTEXT
=
'
ALL_FACES
'
,
PREF_PACK_IN_ONE
=
True
,
PREF_NEW_UVLAYER
=
False
,
PREF_APPLY_IMAGE
=
False
,
PREF_IMG_PX_SIZE
=
1024
,
PREF_BOX_DIV
=
48
,
PREF_MARGIN_DIV
=
0.2
)
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
,
toggle
=
False
)
if
self
.
unwrap
is
True
:
unwrapType
=
scene
.
ms_lightmap_groups
[
self
.
group_name
].
unwrap_type
if
unwrapType
==
'
0
'
or
unwrapType
==
'
1
'
:
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
EDIT
'
)
bpy
.
ops
.
mesh
.
select_all
(
action
=
'
SELECT
'
)
if
unwrapType
==
'
0
'
:
bpy
.
ops
.
uv
.
smart_project
(
angle_limit
=
72.0
,
island_margin
=
0.2
,
user_area_weight
=
0.0
)
elif
unwrapType
==
'
1
'
:
bpy
.
ops
.
uv
.
lightmap_pack
(
PREF_CONTEXT
=
'
ALL_FACES
'
,
PREF_PACK_IN_ONE
=
True
,
PREF_NEW_UVLAYER
=
False
,
PREF_APPLY_IMAGE
=
False
,
PREF_IMG_PX_SIZE
=
1024
,
PREF_BOX_DIV
=
48
,
PREF_MARGIN_DIV
=
0.2
)
bpy
.
ops
.
object
.
mode_set
(
mode
=
'
OBJECT
'
,
toggle
=
False
)
return
{
'
FINISHED
'
}
...
...
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