LEFT | RIGHT |
(no file at all) | |
1 # ##### BEGIN GPL LICENSE BLOCK ##### | 1 # ##### BEGIN GPL LICENSE BLOCK ##### |
2 # | 2 # |
3 # This program is free software; you can redistribute it and/or | 3 # This program is free software; you can redistribute it and/or |
4 # modify it under the terms of the GNU General Public License | 4 # modify it under the terms of the GNU General Public License |
5 # as published by the Free Software Foundation; either version 2 | 5 # as published by the Free Software Foundation; either version 2 |
6 # of the License, or (at your option) any later version. | 6 # of the License, or (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 row.prop(key, "use_relative") | 275 row.prop(key, "use_relative") |
276 | 276 |
277 row = split.row() | 277 row = split.row() |
278 row.alignment = 'RIGHT' | 278 row.alignment = 'RIGHT' |
279 | 279 |
280 sub = row.row(align=True) | 280 sub = row.row(align=True) |
281 sub.label() # XXX, for alignment only | 281 sub.label() # XXX, for alignment only |
282 subsub = sub.row(align=True) | 282 subsub = sub.row(align=True) |
283 subsub.active = enable_edit_value | 283 subsub.active = enable_edit_value |
284 subsub.prop(ob, "show_only_shape_key", text="") | 284 subsub.prop(ob, "show_only_shape_key", text="") |
285 sub.prop(ob, "use_shape_key_edit_mode", text="") | 285 layout.prop(lay, "name") |
286 | 286 |
287 sub = row.row() | 287 |
288 if key.use_relative: | 288 class DATA_PT_texface(MeshButtonsPanel, Panel): |
289 sub.operator("object.shape_key_clear", icon='X', text="") | 289 bl_label = "Texture Face" |
290 else: | 290 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} |
291 sub.operator("object.shape_key_retime", icon='RECOVER_LAST', tex
t="") | 291 |
292 | 292 @classmethod |
293 row = layout.row() | 293 def poll(cls, context): |
294 row.prop(kb, "name") | 294 obj = context.object |
295 | 295 return (context.mode == 'EDIT_MESH') and obj and obj.type == 'MESH' |
296 if key.use_relative: | 296 |
297 if ob.active_shape_key_index != 0: | 297 def draw(self, context): |
298 row = layout.row() | 298 layout = self.layout |
299 row.active = enable_edit_value | 299 col = layout.column() |
300 row.prop(kb, "value") | |
301 | |
302 split = layout.split() | |
303 | |
304 col = split.column(align=True) | |
305 col.active = enable_edit_value | |
306 col.label(text="Range:") | |
307 col.prop(kb, "slider_min", text="Min") | |
308 col.prop(kb, "slider_max", text="Max") | |
309 | |
310 col = split.column(align=True) | |
311 col.active = enable_edit_value | |
312 col.label(text="Blend:") | |
313 col.prop_search(kb, "vertex_group", ob, "vertex_groups", tex
t="") | |
314 col.prop_search(kb, "relative_key", key, "key_blocks", text=
"") | |
315 | |
316 else: | |
317 layout.prop(kb, "interpolation") | |
318 row = layout.column() | |
319 row.active = enable_edit_value | |
320 row.prop(key, "eval_time") | |
321 row.prop(key, "slurph") | |
322 | |
323 | |
324 class DATA_PT_uv_texture(MeshButtonsPanel, Panel): | |
325 bl_label = "UV Maps" | |
326 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} | |
327 | |
328 def draw(self, context): | |
329 layout = self.layout | |
330 | 300 |
331 me = context.mesh | 301 me = context.mesh |
332 lay = me.uv_textures.active | 302 |
333 | 303 tf = me.faces.active_tface |
334 row = layout.row() | 304 |
335 col = row.column() | 305 if tf: |
336 | 306 if context.scene.render.engine != 'BLENDER_GAME': |
337 col.template_list("MESH_UL_uvmaps_vcols", "uvmaps", me, "uv_textures", m
e.uv_textures, "active_index", rows=1) | 307 col.label(text="Options only supported in Game Engine") |
338 | 308 |
339 col = row.column(align=True) | 309 split = layout.split() |
340 col.operator("mesh.uv_texture_add", icon='ZOOMIN', text="") | 310 col = split.column() |
341 col.operator("mesh.uv_texture_remove", icon='ZOOMOUT', text="") | 311 |
342 ········ | 312 col.prop(tf, "use_image") |
343 if lay: | 313 col.prop(tf, "use_light") |
344 layout.prop(lay, "name") | 314 col.prop(tf, "hide") |
| 315 col.prop(tf, "use_collision") |
| 316 |
| 317 col.prop(tf, "use_blend_shared") |
| 318 col.prop(tf, "use_twoside") |
| 319 col.prop(tf, "use_object_color") |
| 320 |
| 321 col = split.column() |
| 322 |
| 323 col.prop(tf, "use_halo") |
| 324 col.prop(tf, "use_billboard") |
| 325 col.prop(tf, "use_shadow_cast") |
| 326 col.prop(tf, "use_bitmap_text") |
| 327 col.prop(tf, "use_alpha_sort") |
| 328 |
| 329 col = layout.column() |
| 330 col.prop(tf, "blend_type") |
| 331 else: |
| 332 col.label(text="No UV Texture") |
345 | 333 |
346 | 334 |
347 class DATA_PT_vertex_colors(MeshButtonsPanel, Panel): | 335 class DATA_PT_vertex_colors(MeshButtonsPanel, Panel): |
348 bl_label = "Vertex Colors" | 336 bl_label = "Vertex Colors" |
349 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} | 337 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} |
350 | |
351 def draw(self, context): | |
352 layout = self.layout | |
353 | |
354 me = context.mesh | |
355 lay = me.vertex_colors.active | |
356 | |
357 row = layout.row() | |
358 col = row.column() | |
359 | |
360 col.template_list("MESH_UL_uvmaps_vcols", "vcols", me, "vertex_colors",
me.vertex_colors, "active_index", rows=1) | |
361 | |
362 col = row.column(align=True) | |
363 col.operator("mesh.vertex_color_add", icon='ZOOMIN', text="") | |
364 col.operator("mesh.vertex_color_remove", icon='ZOOMOUT', text="") | |
365 ········ | |
366 if lay: | |
367 layout.prop(lay, "name") | |
368 | |
369 | |
370 class DATA_PT_customdata(MeshButtonsPanel, Panel): | |
371 bl_label = "Geometry Data" | |
372 bl_options = {'DEFAULT_CLOSED'} | |
373 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} | |
374 | |
375 def draw(self, context): | |
376 layout = self.layout | |
377 | |
378 obj = context.object | |
379 me = context.mesh | |
380 col = layout.column() | |
381 | |
382 col.operator("mesh.customdata_clear_mask", icon='X') | |
383 col.operator("mesh.customdata_clear_skin", icon='X') | |
384 | |
385 col = layout.column() | |
386 | |
387 col.enabled = (obj.mode != 'EDIT') | |
388 col.prop(me, "use_customdata_vertex_bevel") | |
389 col.prop(me, "use_customdata_edge_bevel") | |
390 col.prop(me, "use_customdata_edge_crease") | |
391 | |
392 | |
393 class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel): | |
394 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} | |
395 _context_path = "object.data" | |
396 _property_type = bpy.types.Mesh | |
397 | |
398 | |
399 if __name__ == "__main__": # only for live edit. | |
400 bpy.utils.register_module(__name__) | |
LEFT | RIGHT |