[Bf-extensions-cvs] [89e4cf9] master: clean up oscurart tools re: T48708
meta-androcto
noreply at git.blender.org
Fri Aug 5 02:29:15 CEST 2016
Commit: 89e4cf9189ed7e05b9a49b5038b1e77e97a62128
Author: meta-androcto
Date: Fri Aug 5 10:28:44 2016 +1000
Branches: master
https://developer.blender.org/rBAC89e4cf9189ed7e05b9a49b5038b1e77e97a62128
clean up oscurart tools re: T48708
===================================================================
M oscurart_tools/__init__.py
M oscurart_tools/oscurart_animation.py
M oscurart_tools/oscurart_meshes.py
M oscurart_tools/oscurart_objects.py
M oscurart_tools/oscurart_overrides.py
M oscurart_tools/oscurart_render.py
M oscurart_tools/oscurart_shapes.py
===================================================================
diff --git a/oscurart_tools/__init__.py b/oscurart_tools/__init__.py
index f1bf948..3784c8f 100644
--- a/oscurart_tools/__init__.py
+++ b/oscurart_tools/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "Oscurart Tools",
"author": "Oscurart, CodemanX",
- "version": (3, 2),
+ "version": (3, 2, 0),
"blender": (2, 70, 0),
"location": "View3D > Tools > Oscurart Tools",
"description": "Tools for objects, render, shapes, and files.",
@@ -33,140 +33,77 @@ bl_info = {
}
import bpy
-import math
-import sys
-import os
-import stat
-import bmesh
-import time
-import random
-from oscurart_tools.oscurart_files import *
-from oscurart_tools.oscurart_meshes import *
-from oscurart_tools.oscurart_objects import *
-from oscurart_tools.oscurart_shapes import *
-from oscurart_tools.oscurart_render import *
-from oscurart_tools.oscurart_overrides import *
-from oscurart_tools.oscurart_animation import *
-
-
-class View3DOscPanel():
+
+from . import oscurart_files
+from . import oscurart_meshes
+from . import oscurart_objects
+from . import oscurart_shapes
+from . import oscurart_render
+from . import oscurart_overrides
+from . import oscurart_animation
+
+
+class View3DOscPanel(bpy.types.PropertyGroup):
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
-# CREA PANELES EN TOOLS
-bpy.types.Scene.osc_object_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_mesh_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_shapes_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_render_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_files_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_overrides_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_animation_tools = bpy.props.BoolProperty(default=False)
+ # CREA PANELES EN TOOLS
+ osc_object_tools = bpy.props.BoolProperty(default=True)
+ osc_mesh_tools = bpy.props.BoolProperty(default=True)
+ osc_shapes_tools = bpy.props.BoolProperty(default=True)
+ osc_render_tools = bpy.props.BoolProperty(default=True)
+ osc_files_tools = bpy.props.BoolProperty(default=True)
+ osc_overrides_tools = bpy.props.BoolProperty(default=True)
+ osc_animation_tools = bpy.props.BoolProperty(default=True)
+
+ # PARA ESCENAS NUEVAS
+ overrides = bpy.props.StringProperty(default="[]")
-# PANEL DE CONTROL
+class OscOverridesProp(bpy.types.PropertyGroup):
+ matoverride = bpy.props.StringProperty()
+ grooverride = bpy.props.StringProperty()
-class OscPanelControl(View3DOscPanel, bpy.types.Panel):
- """
+# PANELES
+class OscPanelControl(bpy.types.Panel):
+ bl_idname = "Oscurart Panel Control"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
- bl_label = "Oscurart Tools"
- bl_options = {'DEFAULT_CLOSED'}
- """
bl_category = "Oscurart Tools"
- # bl_context = "objectmode"
- bl_label = "Oscurart Tools"
+ bl_label = "Panels Switcher"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
- active_obj = context.active_object
layout = self.layout
scene = context.scene
+ oscurart = scene.oscurart
col = layout.column(align=1)
- col.prop(scene, "osc_object_tools", text="Object", icon="OBJECT_DATAMODE")
- col.prop(scene, "osc_mesh_tools", text="Mesh", icon="EDITMODE_HLT")
- col.prop(scene, "osc_shapes_tools", text="Shapes", icon="SHAPEKEY_DATA")
- col.prop(scene, "osc_animation_tools", text="Animation", icon="POSE_DATA")
- col.prop(scene, "osc_render_tools", text="Render", icon="SCENE")
- col.prop(scene, "osc_files_tools", text="Files", icon="IMASEL")
- col.prop(scene, "osc_overrides_tools", text="Overrides", icon="GREASEPENCIL")
-# POLLS
-
-
-class OscPollObject():
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
-
- @classmethod
- def poll(cls, context):
- return context.scene.osc_object_tools
-
-
-class OscPollMesh():
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
-
- @classmethod
- def poll(cls, context):
- return context.scene.osc_mesh_tools
-
-
-class OscPollShapes():
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
-
- @classmethod
- def poll(cls, context):
- return context.scene.osc_shapes_tools
+ col.prop(oscurart, "osc_object_tools", text="Object", icon="OBJECT_DATAMODE")
+ col.prop(oscurart, "osc_mesh_tools", text="Mesh", icon="EDITMODE_HLT")
+ col.prop(oscurart, "osc_shapes_tools", text="Shapes", icon="SHAPEKEY_DATA")
+ col.prop(oscurart, "osc_animation_tools", text="Animation", icon="POSE_DATA")
+ col.prop(oscurart, "osc_render_tools", text="Render", icon="SCENE")
+ col.prop(oscurart, "osc_files_tools", text="Files", icon="IMASEL")
+ col.prop(oscurart, "osc_overrides_tools", text="Overrides", icon="GREASEPENCIL")
-class OscPollRender():
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
-
- @classmethod
- def poll(cls, context):
- return context.scene.osc_render_tools
-
-
-class OscPollFiles():
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
-
- @classmethod
- def poll(cls, context):
- return context.scene.osc_files_tools
-
-
-class OscPollOverrides():
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
-
- @classmethod
- def poll(cls, context):
- return context.scene.osc_overrides_tools
-
-
-class OscPollAnimation():
+class OscPanelObject(bpy.types.Panel):
+ bl_idname = "Oscurart Object Tools"
+ bl_label = "Object Tools"
+ bl_category = "Oscurart Tools"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
+ bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
- return context.scene.osc_animation_tools
-
-
-# PANELES
-class OscPanelObject(OscPollObject, bpy.types.Panel):
- bl_idname = "Oscurart Object Tools"
- bl_label = "Object Tools"
- bl_category = "Oscurart Tools"
+ return context.scene.oscurart.osc_object_tools
def draw(self, context):
- active_obj = context.active_object
layout = self.layout
col = layout.column(align=1)
- row = col.row()
colrow = col.row(align=1)
colrow.operator("object.relink_objects_between_scenes", icon="LINKED")
@@ -205,16 +142,21 @@ class OscPanelObject(OscPollObject, bpy.types.Panel):
text="Make Groups in out Camera")
-class OscPanelMesh(OscPollMesh, bpy.types.Panel):
+class OscPanelMesh(bpy.types.Panel):
bl_idname = "Oscurart Mesh Tools"
bl_label = "Mesh Tools"
bl_category = "Oscurart Tools"
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'TOOLS'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.scene.oscurart.osc_mesh_tools
def draw(self, context):
- active_obj = context.active_object
layout = self.layout
col = layout.column(align=1)
- row = col.row()
col.operator("mesh.object_to_mesh_osc", icon="MESH_MONKEY")
col.operator("mesh.select_side_osc", icon="VERTEXSEL")
@@ -240,16 +182,21 @@ class OscPanelMesh(OscPollMesh, bpy.types.Panel):
colrow.operator("mesh.import_vertex_colors", icon='COLOR')
-class OscPanelShapes(OscPollShapes, bpy.types.Panel):
+class OscPanelShapes(bpy.types.Panel):
bl_idname = "Oscurart Shapes Tools"
bl_label = "Shapes Tools"
bl_category = "Oscurart Tools"
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'TOOLS'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.scene.oscurart.osc_shapes_tools
def draw(self, context):
- active_obj = context.active_object
layout = self.layout
col = layout.column(align=1)
- row = col.row()
col.operator("object.shape_key_to_objects_osc", icon="OBJECT_DATAMODE")
col.operator("mesh.create_lmr_groups_osc", icon="GROUP_VERTEX")
@@ -259,13 +206,19 @@ class OscPanelShapes(OscPollShapes, bpy.types.Panel):
colrow.operator("mesh.create_asymmetrical_layout_osc", icon="SETTINGS")
-class OscPanelRender(OscPollRender, bpy.types.Panel):
+class OscPanelRender(bpy.types.Panel):
bl_idname = "Oscurart Render Tools"
bl_label = "Render Tools"
bl_category = "Oscurart Tools"
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'TOOLS'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.scene.oscurart.osc_render_tools
def draw(self, context):
- active_obj = context.active_object
layout = self.layout
col = layout.column(align=1)
@@ -321,13 +274,19 @@ class OscPanelRender(OscPollRender, bpy.types.Panel):
boxcol.prop(sc, "use_render_scene", text=sc.name)
-class OscPanelFiles(OscPollFiles, bpy.types.Panel):
+class OscPanelFiles(bpy.types.Panel):
bl_idname = "Oscurart Files Tools"
bl_label = "Files Tools"
bl_category = "Oscurart Tools"
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'TOOLS'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.scene.oscurart.osc_files_tools
def draw(self, context):
- active_obj = context.active_object
layout = self.layout
col = layout.column(align=1)
col.operator("file.save_incremental_osc", icon="NEW")
@@ -340,22 +299,28 @@ class OscPanelFiles(OscPollFiles, bpy.types.Panel):
col.operator("file.replace_file_path_osc", icon="SHORTDISPLAY")
-class OscPanelOverrides(OscPollOverrides, bpy.types.Panel):
+class OscPanelOverrides(bpy.types.Panel):
bl_idname = "Oscurart Overrides"
bl_label = "Overrides Tools"
bl_category = "Oscurart Tools"
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'TOOLS'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.scene.oscurart.osc_overrides_tools
def draw(self, context):
layout = self.layout
- obj = context.object
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list