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
4ac0fa2a
Commit
4ac0fa2a
authored
9 years ago
by
Brendon Murphy
Browse files
Options
Downloads
Patches
Plain Diff
initial fix for T40706 disable local view, disable cycles
parent
bca93f4f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object_cloud_gen.py
+38
-28
38 additions, 28 deletions
object_cloud_gen.py
with
38 additions
and
28 deletions
object_cloud_gen.py
+
38
−
28
View file @
4ac0fa2a
...
...
@@ -22,8 +22,8 @@ bl_info = {
"
name
"
:
"
Cloud Generator
"
,
"
author
"
:
"
Nick Keeline(nrk)
"
,
"
version
"
:
(
1
,
0
),
"
blender
"
:
(
2
,
7
1
,
0
),
"
location
"
:
"
Tool Shelf > Create Tab
"
,
"
blender
"
:
(
2
,
7
5
,
0
),
"
location
"
:
"
Blender Render:
Tool Shelf > Create Tab
"
,
"
description
"
:
"
Creates Volumetric Clouds
"
,
"
wiki_url
"
:
"
http://wiki.blender.org/index.php/Extensions:2.6/Py/
"
"
Scripts/Object/Cloud_Gen
"
,
...
...
@@ -306,39 +306,43 @@ class VIEW3D_PT_tools_cloud(Panel):
bl_options
=
{
'
DEFAULT_CLOSED
'
}
def
draw
(
self
,
context
):
active_obj
=
context
.
active_object
layout
=
self
.
layout
col
=
layout
.
column
(
align
=
True
)
if
context
.
scene
.
render
.
engine
==
"
BLENDER_RENDER
"
:
active_obj
=
context
.
active_object
layout
=
self
.
layout
col
=
layout
.
column
(
align
=
True
)
WhatToDo
=
getActionToDo
(
active_obj
)
WhatToDo
=
getActionToDo
(
active_obj
)
if
WhatToDo
==
'
DEGENERATE
'
:
col
.
operator
(
"
cloud.generate_cloud
"
,
text
=
"
DeGenerate
"
)
elif
WhatToDo
==
'
CLOUD_CONVERT_TO_MESH
'
:
col
.
operator
(
"
cloud.generate_cloud
"
,
text
=
"
Convert to Mesh
"
)
elif
WhatToDo
==
'
NO_SELECTION_DO_NOTHING
'
:
col
.
label
(
text
=
"
Select one or more
"
)
col
.
label
(
text
=
"
objects to generate
"
)
col
.
label
(
text
=
"
a cloud
"
)
if
WhatToDo
==
'
DEGENERATE
'
:
col
.
operator
(
"
cloud.generate_cloud
"
,
text
=
"
DeGenerate
"
)
elif
WhatToDo
==
'
CLOUD_DO_NOTHING
'
:
col
.
label
(
text
=
"
Must select
"
)
col
.
label
(
text
=
"
bound box
"
)
elif
WhatToDo
==
'
CLOUD_CONVERT_TO_MESH
'
:
col
.
operator
(
"
cloud.generate_cloud
"
,
text
=
"
Convert to Mesh
"
)
elif
WhatToDo
==
'
GENERATE
'
:
col
.
operator
(
"
cloud.generate_cloud
"
,
text
=
"
Generate Cloud
"
)
elif
WhatToDo
==
'
NO_SELECTION_DO_NOTHING
'
:
col
.
label
(
text
=
"
Select one or more
"
)
col
.
label
(
text
=
"
objects to generate
"
)
col
.
label
(
text
=
"
a cloud
"
)
col
.
prop
(
context
.
scene
,
"
cloud_type
"
)
col
.
prop
(
context
.
scene
,
"
cloudparticles
"
)
col
.
prop
(
context
.
scene
,
"
cloudsmoothing
"
)
else
:
col
.
label
(
text
=
"
Select one or more
"
)
col
.
label
(
text
=
"
objects to generate
"
)
col
.
label
(
text
=
"
a cloud
"
)
elif
WhatToDo
==
'
CLOUD_DO_NOTHING
'
:
col
.
label
(
text
=
"
Must select
"
)
col
.
label
(
text
=
"
bound box
"
)
elif
WhatToDo
==
'
GENERATE
'
:
col
.
operator
(
"
cloud.generate_cloud
"
,
text
=
"
Generate Cloud
"
)
col
.
prop
(
context
.
scene
,
"
cloud_type
"
)
col
.
prop
(
context
.
scene
,
"
cloudparticles
"
)
col
.
prop
(
context
.
scene
,
"
cloudsmoothing
"
)
else
:
col
.
label
(
text
=
"
Select one or more
"
)
col
.
label
(
text
=
"
objects to generate
"
)
col
.
label
(
text
=
"
a cloud
"
)
if
context
.
scene
.
render
.
engine
==
"
CYCLES
"
:
layout
=
self
.
layout
layout
.
label
(
text
=
"
Blender Render Only
"
)
class
GenerateCloud
(
Operator
):
"""
Create a Cloud,Undo Cloud, or convert to Mesh Cloud depending on selection
"""
bl_idname
=
"
cloud.generate_cloud
"
...
...
@@ -353,8 +357,14 @@ class GenerateCloud(Operator):
else
:
return
(
context
.
active_object
.
type
==
'
MESH
'
)
def
execute
(
self
,
context
):
# Make variable that is the current .blend file main data blocks
space_data
=
bpy
.
context
.
space_data
if
True
in
space_data
.
layers_local_view
:
self
.
report
({
'
INFO
'
},
'
Global Perspective mode only unable to continue.
'
)
return
{
'
FINISHED
'
}
blend_data
=
context
.
blend_data
# Make variable that is the active object selected by user
...
...
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