diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-04-12 07:06:49 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-04-12 07:06:49 +0400 |
commit | 7135edb75daca55f0ab5e3b601fd73d486c9d060 (patch) | |
tree | 84a99cbd70c98b7b686c00aeed79b69ad5df4d8a /release/scripts/ui/properties_data_mesh.py | |
parent | 091f70e92d2160f0326ec75ed175fc206b2477b9 (diff) |
BGE: TexFace panel (from patch #21780 from Mitchell Stokes + some changes)
the patch exposes a rna property to get the active edit mode face. This is a hack.
However it's a small patch (a.k.a. easy to revert later if needed).
The official plan is to wait for BMesh before tackling it properly. Nevertheless TexFace panel is really important for BGE.
Missing: operators to copy the current parameters to other selected faces.
* note: what I changed from the original patch is the UI script. The pool wasn't defined and it was using tabs.
Diffstat (limited to 'release/scripts/ui/properties_data_mesh.py')
-rw-r--r-- | release/scripts/ui/properties_data_mesh.py | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py index d48d2ec8046..0c14a040f2a 100644 --- a/release/scripts/ui/properties_data_mesh.py +++ b/release/scripts/ui/properties_data_mesh.py @@ -281,6 +281,52 @@ class DATA_PT_uv_texture(DataButtonsPanel): lay = me.active_uv_texture if lay: layout.prop(lay, "name") + +class DATA_PT_texface(DataButtonsPanel): + bl_label = "Texture Face" + + def poll(self, context): + ob = context.active_object + rd = context.scene.render + + return (context.mode =='EDIT_MESH') and (rd.engine == 'BLENDER_GAME') \ + and ob and ob.type in ('MESH') + + def draw(self, context): + layout = self.layout + col = layout.column() + + wide_ui = context.region.width > narrowui + me = context.mesh + + tf = me.faces.active_tface + + if tf: + split = layout.split() + col = split.column() + + col.prop(tf, "tex") + col.prop(tf, "light") + col.prop(tf, "invisible") + col.prop(tf, "collision") + + col.prop(tf, "shared") + col.prop(tf, "twoside") + col.prop(tf, "object_color") + + if wide_ui: + col = split.column() + + col.prop(tf, "halo") + col.prop(tf, "billboard") + col.prop(tf, "shadow") + col.prop(tf, "text") + col.prop(tf, "alpha_sort") + + col = layout.column() + col.prop(tf, "transp") + else: + col.label(text="No UV Texture") class DATA_PT_vertex_colors(DataButtonsPanel): @@ -315,6 +361,7 @@ classes = [ DATA_PT_vertex_groups, DATA_PT_shape_keys, DATA_PT_uv_texture, + DATA_PT_texface, DATA_PT_vertex_colors, DATA_PT_custom_props_mesh] |