Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-08-06 18:23:48 +0400
committerThomas Dinges <blender@dingto.org>2009-08-06 18:23:48 +0400
commitf10647e203188ef0af57c646aa870b08d7e4d223 (patch)
tree0533a5771d2e48d709e55608a8d127b9cc675401 /release
parent07ed54218795bf14a3049f8e1a9ab1011e239656 (diff)
2.5 Smoke:
Moved the Smoke Buttons into the Physic Tab.
Diffstat (limited to 'release')
-rw-r--r--release/ui/buttons_data_modifier.py24
-rw-r--r--release/ui/buttons_physics_smoke.py65
2 files changed, 66 insertions, 23 deletions
diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py
index 03950c707d2..f92bbd1581e 100644
--- a/release/ui/buttons_data_modifier.py
+++ b/release/ui/buttons_data_modifier.py
@@ -303,29 +303,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
layout.itemR(md, "lock_y_axis")
def SMOKE(self, layout, ob, md):
- layout.itemR(md, "smoke_type")
-
- if md.smoke_type == 'TYPE_DOMAIN':
- layout.itemS()
- layout.itemR(md.domain_settings, "maxres")
- layout.itemR(md.domain_settings, "color")
- layout.itemR(md.domain_settings, "amplify")
- layout.itemR(md.domain_settings, "highres")
- layout.itemR(md.domain_settings, "noise_type")
- layout.itemR(md.domain_settings, "visibility")
- layout.itemR(md.domain_settings, "alpha")
- layout.itemR(md.domain_settings, "beta")
- layout.itemR(md.domain_settings, "fluid_group")
- layout.itemR(md.domain_settings, "eff_group")
- layout.itemR(md.domain_settings, "coll_group")
- elif md.smoke_type == 'TYPE_FLOW':
- layout.itemS()
- layout.itemR(md.flow_settings, "outflow")
- layout.itemR(md.flow_settings, "density")
- layout.itemR(md.flow_settings, "temperature")
- layout.item_pointerR(md.flow_settings, "psys", ob, "particle_systems")
- elif md.smoke_type == 'TYPE_COLL':
- layout.itemS()
+ layout.itemL(text="See Smoke panel.")
def SMOOTH(self, layout, ob, md):
split = layout.split()
diff --git a/release/ui/buttons_physics_smoke.py b/release/ui/buttons_physics_smoke.py
new file mode 100644
index 00000000000..82363d29e91
--- /dev/null
+++ b/release/ui/buttons_physics_smoke.py
@@ -0,0 +1,65 @@
+
+import bpy
+
+class PhysicButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "physics"
+
+ def poll(self, context):
+ ob = context.object
+ rd = context.scene.render_data
+ return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
+
+class PHYSICS_PT_smoke(PhysicButtonsPanel):
+ __label__ = "Smoke"
+
+ def draw(self, context):
+ layout = self.layout
+
+ md = context.smoke
+ ob = context.object
+
+ split = layout.split()
+ split.operator_context = 'EXEC_DEFAULT'
+
+ if md:
+ # remove modifier + settings
+ split.set_context_pointer("modifier", md)
+ split.itemO("object.modifier_remove", text="Remove")
+
+ row = split.row(align=True)
+ row.itemR(md, "render", text="")
+ row.itemR(md, "realtime", text="")
+
+ else:
+ # add modifier
+ split.item_enumO("object.modifier_add", "type", 'SMOKE', text="Add")
+ split.itemL()
+
+ if md:
+ layout.itemR(md, "smoke_type")
+
+ if md.smoke_type == 'TYPE_DOMAIN':
+ layout.itemS()
+ layout.itemR(md.domain_settings, "maxres")
+ layout.itemR(md.domain_settings, "color")
+ layout.itemR(md.domain_settings, "amplify")
+ layout.itemR(md.domain_settings, "highres")
+ layout.itemR(md.domain_settings, "noise_type")
+ layout.itemR(md.domain_settings, "visibility")
+ layout.itemR(md.domain_settings, "alpha")
+ layout.itemR(md.domain_settings, "beta")
+ layout.itemR(md.domain_settings, "fluid_group")
+ layout.itemR(md.domain_settings, "eff_group")
+ layout.itemR(md.domain_settings, "coll_group")
+ elif md.smoke_type == 'TYPE_FLOW':
+ layout.itemS()
+ layout.itemR(md.flow_settings, "outflow")
+ layout.itemR(md.flow_settings, "density")
+ layout.itemR(md.flow_settings, "temperature")
+ layout.item_pointerR(md.flow_settings, "psys", ob, "particle_systems")
+ elif md.smoke_type == 'TYPE_COLL':
+ layout.itemS()
+
+bpy.types.register(PHYSICS_PT_smoke)