Browse Source

Merge branch 'master' of https://github.com/H-uru/korman

Conflicts:
	korman/exporter.py
pull/6/head
Adam Johnson 11 years ago
parent
commit
81b5ca888c
  1. 2
      korman/__init__.py
  2. 3
      korman/operators/op_export.py
  3. 2
      korman/operators/op_world.py
  4. 1
      korman/properties/__init__.py
  5. 1
      korman/properties/prop_object.py
  6. 2
      korman/properties/prop_world.py
  7. 4
      korman/render.py
  8. 1
      korman/ui/ui_object.py
  9. 1
      korman/ui/ui_world.py

2
korman/__init__.py

@ -28,6 +28,7 @@ bl_info = {
# Blender panels (think materials)
}
def register():
"""Registers all Blender operators and GUI items in Korman"""
@ -38,6 +39,7 @@ def register():
operators.register()
properties.register()
def unregister():
"""Unregisters all Blender operators and GUI items"""
bpy.utils.unregister_module(__name__)

3
korman/operators/op_export.py

@ -17,6 +17,7 @@ import bpy
import os, os.path
from .. import exporter
class ExportOperator(bpy.types.Operator):
"""Exports ages for Cyan Worlds' Plasma Engine"""
@ -91,5 +92,7 @@ def menu_cb(self, context):
if context.scene.render.engine == "PLASMA_GAME":
self.layout.operator_context = "INVOKE_DEFAULT"
self.layout.operator(ExportOperator.bl_idname, text="Plasma Age (.age)")
def register():
bpy.types.INFO_MT_file_export.append(menu_cb)

2
korman/operators/op_world.py

@ -15,11 +15,13 @@
import bpy
class AgeOperator:
@classmethod
def poll(cls, context):
return context.scene.render.engine == "PLASMA_GAME"
class PageAddOperator(AgeOperator, bpy.types.Operator):
bl_idname = "world.plasma_page_add"
bl_label = "Add Page"

1
korman/properties/__init__.py

@ -18,6 +18,7 @@ import bpy
from .prop_object import *
from .prop_world import *
def register():
bpy.types.Object.plasma_object = PointerProperty(type=PlasmaObject)
bpy.types.World.plasma_age = PointerProperty(type=PlasmaAge)

1
korman/properties/prop_object.py

@ -17,6 +17,7 @@ import bpy
from bpy.props import *
from PyHSPlasma import *
class PlasmaObject(bpy.types.PropertyGroup):
def _enabled(self, context):
# This makes me sad

2
korman/properties/prop_world.py

@ -17,6 +17,7 @@ import bpy
from bpy.props import *
from PyHSPlasma import *
class PlasmaFni(bpy.types.PropertyGroup):
bl_idname = "world.plasma_fni"
@ -49,6 +50,7 @@ class PlasmaFni(bpy.types.PropertyGroup):
soft_min=100,
min=1)
class PlasmaPage(bpy.types.PropertyGroup):
def _check_suffix(self, context):
"""Verifies that a suffix change does not conflict"""

4
korman/render.py

@ -15,6 +15,7 @@
import bpy
class PlasmaRenderEngine(bpy.types.RenderEngine):
bl_idname = "PLASMA_GAME"
@ -30,6 +31,7 @@ properties_material.MATERIAL_PT_options.COMPAT_ENGINES.add("PLASMA_GAME")
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add("PLASMA_GAME")
del properties_material
@classmethod
def _new_poll(cls, context):
"""Nifty replacement for naughty built-in Blender poll()s"""
@ -38,6 +40,8 @@ def _new_poll(cls, context):
else:
# Dear god you better save the old poll...
return cls._old_poll(cls, context)
def _swap_poll(cls):
cls._old_poll = cls.poll
cls.poll = _new_poll

1
korman/ui/ui_object.py

@ -15,6 +15,7 @@
import bpy
class ObjectButtonsPanel:
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"

1
korman/ui/ui_world.py

@ -15,6 +15,7 @@
import bpy
class AgeButtonsPanel:
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"

Loading…
Cancel
Save