Khafile extending support.
This commit is contained in:
parent
d2c5bfcbb1
commit
ec52e1cfa2
|
@ -6,8 +6,8 @@ import lue.trait.Trait;
|
|||
import lue.sys.Input;
|
||||
import lue.sys.Time;
|
||||
import lue.node.Transform;
|
||||
import cycles.trait.RigidBody;
|
||||
import lue.node.CameraNode;
|
||||
import cycles.trait.RigidBody;
|
||||
|
||||
class FirstPersonController extends Trait {
|
||||
|
||||
|
@ -58,6 +58,8 @@ class FirstPersonController extends Trait {
|
|||
var locked = true;
|
||||
|
||||
public function update() {
|
||||
if (Input.occupied) return;
|
||||
|
||||
// Unlock
|
||||
// if (locked &&
|
||||
// Input.x > lue.App.w / 2 - 20 && Input.x < lue.App.w / 2 + 20 &&
|
||||
|
|
|
@ -27,6 +27,7 @@ def defaultSettings():
|
|||
wrd['CGProjectScene'] = bpy.data.scenes[0].name
|
||||
wrd['CGProjectSamplesPerPixel'] = 1
|
||||
wrd['CGPhysics'] = 0
|
||||
wrd['CGKhafileConfig'] = ''
|
||||
wrd['CGMinimize'] = (True)
|
||||
# Make sure we are using cycles
|
||||
if bpy.data.scenes[0].render.engine == 'BLENDER_RENDER':
|
||||
|
@ -54,6 +55,7 @@ def initWorldProperties():
|
|||
items = [('Disabled', 'Disabled', 'Disabled'),
|
||||
('Bullet', 'Bullet', 'Bullet')],
|
||||
name = "Physics")
|
||||
bpy.types.World.CGKhafileConfig = StringProperty(name = "Config")
|
||||
bpy.types.World.CGMinimize = BoolProperty(name = "Minimize")
|
||||
|
||||
# Default settings
|
||||
|
@ -103,6 +105,7 @@ class ToolsPanel(bpy.types.Panel):
|
|||
row.operator("cg.clean")
|
||||
layout.prop(wrd, 'CGProjectSamplesPerPixel')
|
||||
layout.prop(wrd, 'CGPhysics')
|
||||
layout.prop_search(wrd, "CGKhafileConfig", bpy.data, "texts", "Config")
|
||||
layout.prop(wrd, 'CGMinimize')
|
||||
|
||||
class Object:
|
||||
|
|
|
@ -30,8 +30,12 @@ project.addLibrary('cyclesgame');
|
|||
if bpy.data.worlds[0]['CGPhysics'] != 0:
|
||||
f.write("\nproject.addDefine('WITH_PHYSICS')\n")
|
||||
f.write("project.addLibrary('haxebullet')\n")
|
||||
|
||||
config_text = bpy.data.worlds[0]['CGKhafileConfig']
|
||||
if config_text != '':
|
||||
f.write(bpy.data.texts[config_text].as_string())
|
||||
|
||||
f.write("\nreturn project;\n")
|
||||
f.write("\n\nreturn project;\n")
|
||||
|
||||
# Write Main.hx
|
||||
def write_main():
|
||||
|
|
Loading…
Reference in a new issue