Sync
This commit is contained in:
parent
8c9dcc972b
commit
9bc2817a14
|
@ -1,4 +1,4 @@
|
||||||
package zblend;
|
package cycles;
|
||||||
|
|
||||||
import lue.App;
|
import lue.App;
|
||||||
import lue.Eg;
|
import lue.Eg;
|
|
@ -6,11 +6,11 @@ from bpy.props import *
|
||||||
# Derived from the NodeTree base type, similar to Menu, Operator, Panel, etc.
|
# Derived from the NodeTree base type, similar to Menu, Operator, Panel, etc.
|
||||||
class MyCustomTree(NodeTree):
|
class MyCustomTree(NodeTree):
|
||||||
# Description string
|
# Description string
|
||||||
'''ZBlend logic nodes'''
|
'''Logic nodes'''
|
||||||
# Optional identifier string. If not explicitly defined, the python class name is used.
|
# Optional identifier string. If not explicitly defined, the python class name is used.
|
||||||
bl_idname = 'CustomTreeType'
|
bl_idname = 'CustomTreeType'
|
||||||
# Label for nice name display
|
# Label for nice name display
|
||||||
bl_label = 'ZBlend Node Tree'
|
bl_label = 'CG Node Tree'
|
||||||
# Icon identifier
|
# Icon identifier
|
||||||
# NOTE: If no icon is defined, the node tree will not show up in the editor header!
|
# NOTE: If no icon is defined, the node tree will not show up in the editor header!
|
||||||
# This can be used to make additional tree types for groups and similar nodes (see below)
|
# This can be used to make additional tree types for groups and similar nodes (see below)
|
||||||
|
|
|
@ -31,7 +31,7 @@ def defaultSettings():
|
||||||
|
|
||||||
# Store properties in the world object
|
# Store properties in the world object
|
||||||
def initWorldProperties():
|
def initWorldProperties():
|
||||||
bpy.types.World.TargetVersion = StringProperty(name = "ZBlendVersion")
|
bpy.types.World.TargetVersion = StringProperty(name = "CGVersion")
|
||||||
bpy.types.World.TargetEnum = EnumProperty(
|
bpy.types.World.TargetEnum = EnumProperty(
|
||||||
items = [('OSX', 'OSX', 'OSX'),
|
items = [('OSX', 'OSX', 'OSX'),
|
||||||
('Windows', 'Windows', 'Windows'),
|
('Windows', 'Windows', 'Windows'),
|
||||||
|
@ -79,11 +79,11 @@ initWorldProperties()
|
||||||
# Info panel play
|
# Info panel play
|
||||||
def draw_play_item(self, context):
|
def draw_play_item(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.operator("zblend.play")
|
layout.operator("cg.play")
|
||||||
|
|
||||||
# Menu in tools region
|
# Menu in tools region
|
||||||
class ToolsPanel(bpy.types.Panel):
|
class ToolsPanel(bpy.types.Panel):
|
||||||
bl_label = "ZBlend Project"
|
bl_label = "Cycles Game"
|
||||||
bl_space_type = "PROPERTIES"
|
bl_space_type = "PROPERTIES"
|
||||||
bl_region_type = "WINDOW"
|
bl_region_type = "WINDOW"
|
||||||
bl_context = "render"
|
bl_context = "render"
|
||||||
|
@ -100,11 +100,11 @@ class ToolsPanel(bpy.types.Panel):
|
||||||
layout.prop(wrd, 'TargetProjectHeight')
|
layout.prop(wrd, 'TargetProjectHeight')
|
||||||
layout.prop_search(wrd, "TargetScene", bpy.data, "scenes", "Scene")
|
layout.prop_search(wrd, "TargetScene", bpy.data, "scenes", "Scene")
|
||||||
layout.prop(wrd, 'TargetEnum')
|
layout.prop(wrd, 'TargetEnum')
|
||||||
layout.operator("zblend.build")
|
layout.operator("cg.build")
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.alignment = 'EXPAND'
|
row.alignment = 'EXPAND'
|
||||||
row.operator("zblend.folder")
|
row.operator("cg.folder")
|
||||||
row.operator("zblend.clean")
|
row.operator("cg.clean")
|
||||||
layout.prop_search(wrd, "TargetGravity", bpy.data, "scenes", "Gravity")
|
layout.prop_search(wrd, "TargetGravity", bpy.data, "scenes", "Gravity")
|
||||||
layout.prop_search(wrd, "TargetClear", bpy.data, "worlds", "Clear Color")
|
layout.prop_search(wrd, "TargetClear", bpy.data, "worlds", "Clear Color")
|
||||||
layout.prop(wrd, 'TargetAA')
|
layout.prop(wrd, 'TargetAA')
|
||||||
|
@ -112,9 +112,9 @@ class ToolsPanel(bpy.types.Panel):
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(wrd, 'TargetAutoBuildNodes')
|
row.prop(wrd, 'TargetAutoBuildNodes')
|
||||||
if wrd['TargetAutoBuildNodes'] == False:
|
if wrd['TargetAutoBuildNodes'] == False:
|
||||||
row.operator("zblend.buildnodes")
|
row.operator("cg.buildnodes")
|
||||||
layout.prop(wrd, 'TargetMinimize')
|
layout.prop(wrd, 'TargetMinimize')
|
||||||
layout.operator("zblend.defaultsettings")
|
layout.operator("cg.defaultsettings")
|
||||||
|
|
||||||
# Used to output json
|
# Used to output json
|
||||||
class Object:
|
class Object:
|
||||||
|
@ -194,7 +194,7 @@ def exportGameData():
|
||||||
# x.game.height = bpy.data.worlds[0]['TargetProjectHeight']
|
# x.game.height = bpy.data.worlds[0]['TargetProjectHeight']
|
||||||
# if bpy.data.worlds[0]['TargetAA'] == 1:
|
# if bpy.data.worlds[0]['TargetAA'] == 1:
|
||||||
# x.game.antiAliasingSamples = 2
|
# x.game.antiAliasingSamples = 2
|
||||||
# x.libraries = ["zblend", "haxebullet"]
|
# x.libraries = ["cyclesgame", "haxebullet"]
|
||||||
# # Defined libraries
|
# # Defined libraries
|
||||||
# for o in bpy.data.worlds[0].my_liblist:
|
# for o in bpy.data.worlds[0].my_liblist:
|
||||||
# if o.enabled_prop:
|
# if o.enabled_prop:
|
||||||
|
@ -429,7 +429,7 @@ def exportGameData():
|
||||||
package ;
|
package ;
|
||||||
class Main {
|
class Main {
|
||||||
public static function main() {
|
public static function main() {
|
||||||
lue.sys.CompileTime.importPackage('zblend.trait');
|
lue.sys.CompileTime.importPackage('cycles.trait');
|
||||||
lue.sys.CompileTime.importPackage('""" + bpy.data.worlds[0]['TargetProjectPackage'] + """');
|
lue.sys.CompileTime.importPackage('""" + bpy.data.worlds[0]['TargetProjectPackage'] + """');
|
||||||
#if js
|
#if js
|
||||||
untyped __js__("
|
untyped __js__("
|
||||||
|
@ -450,7 +450,7 @@ class Main {
|
||||||
}
|
}
|
||||||
static function start() {
|
static function start() {
|
||||||
var starter = new kha.Starter();
|
var starter = new kha.Starter();
|
||||||
starter.start(new lue.App("room1", zblend.Root));
|
starter.start(new lue.App("room1", cycles.Root));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""")
|
""")
|
||||||
|
@ -505,7 +505,7 @@ def buildProject(self, build_type=0):
|
||||||
|
|
||||||
prefix = haxelib_path + " run kha "
|
prefix = haxelib_path + " run kha "
|
||||||
|
|
||||||
output = subprocess.check_output([haxelib_path + " path zblend"], shell=True)
|
output = subprocess.check_output([haxelib_path + " path cyclesgame"], shell=True)
|
||||||
output = str(output).split("\\n")[0].split("'")[1]
|
output = str(output).split("\\n")[0].split("'")[1]
|
||||||
scripts_path = output + "blender/"
|
scripts_path = output + "blender/"
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ def cleanProject(self):
|
||||||
|
|
||||||
# Play
|
# Play
|
||||||
class OBJECT_OT_PLAYButton(bpy.types.Operator):
|
class OBJECT_OT_PLAYButton(bpy.types.Operator):
|
||||||
bl_idname = "zblend.play"
|
bl_idname = "cg.play"
|
||||||
bl_label = "Play"
|
bl_label = "Play"
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
@ -549,7 +549,7 @@ class OBJECT_OT_PLAYButton(bpy.types.Operator):
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
class OBJECT_OT_BUILDButton(bpy.types.Operator):
|
class OBJECT_OT_BUILDButton(bpy.types.Operator):
|
||||||
bl_idname = "zblend.build"
|
bl_idname = "cg.build"
|
||||||
bl_label = "Build"
|
bl_label = "Build"
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
@ -558,7 +558,7 @@ class OBJECT_OT_BUILDButton(bpy.types.Operator):
|
||||||
|
|
||||||
# Open project folder
|
# Open project folder
|
||||||
class OBJECT_OT_FOLDERButton(bpy.types.Operator):
|
class OBJECT_OT_FOLDERButton(bpy.types.Operator):
|
||||||
bl_idname = "zblend.folder"
|
bl_idname = "cg.folder"
|
||||||
bl_label = "Folder"
|
bl_label = "Folder"
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
@ -573,7 +573,7 @@ class OBJECT_OT_FOLDERButton(bpy.types.Operator):
|
||||||
|
|
||||||
# Clean project
|
# Clean project
|
||||||
class OBJECT_OT_CLEANButton(bpy.types.Operator):
|
class OBJECT_OT_CLEANButton(bpy.types.Operator):
|
||||||
bl_idname = "zblend.clean"
|
bl_idname = "cg.clean"
|
||||||
bl_label = "Clean"
|
bl_label = "Clean"
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
@ -582,7 +582,7 @@ class OBJECT_OT_CLEANButton(bpy.types.Operator):
|
||||||
|
|
||||||
# Build nodes
|
# Build nodes
|
||||||
class OBJECT_OT_BUILDNODESButton(bpy.types.Operator):
|
class OBJECT_OT_BUILDNODESButton(bpy.types.Operator):
|
||||||
bl_idname = "zblend.buildnodes"
|
bl_idname = "cg.buildnodes"
|
||||||
bl_label = "Build Nodes"
|
bl_label = "Build Nodes"
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
@ -594,7 +594,7 @@ class OBJECT_OT_BUILDNODESButton(bpy.types.Operator):
|
||||||
|
|
||||||
# Default settings
|
# Default settings
|
||||||
class OBJECT_OT_DEFAULTSETTINGSButton(bpy.types.Operator):
|
class OBJECT_OT_DEFAULTSETTINGSButton(bpy.types.Operator):
|
||||||
bl_idname = "zblend.defaultsettings"
|
bl_idname = "cg.defaultsettings"
|
||||||
bl_label = "Default Settings"
|
bl_label = "Default Settings"
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
|
@ -628,8 +628,8 @@ def buildNodeTree(node_group):
|
||||||
|
|
||||||
with open(path + node_group_name + '.hx', 'w') as f:
|
with open(path + node_group_name + '.hx', 'w') as f:
|
||||||
f.write('package ' + bpy.data.worlds[0].TargetProjectPackage + ';\n\n')
|
f.write('package ' + bpy.data.worlds[0].TargetProjectPackage + ';\n\n')
|
||||||
f.write('import zblend.node.*;\n\n')
|
f.write('import cycles.node.*;\n\n')
|
||||||
f.write('class ' + node_group_name + ' extends zblend.trait.NodeExecutor {\n\n')
|
f.write('class ' + node_group_name + ' extends cycles.trait.NodeExecutor {\n\n')
|
||||||
f.write('\tpublic function new() { super(); }\n\n')
|
f.write('\tpublic function new() { super(); }\n\n')
|
||||||
f.write('\toverride function onItemAdd() {\n')
|
f.write('\toverride function onItemAdd() {\n')
|
||||||
# Make sure root node exists
|
# Make sure root node exists
|
||||||
|
|
|
@ -232,7 +232,7 @@ class LIST_OT_TraitMoveItem(bpy.types.Operator):
|
||||||
|
|
||||||
# Menu in tools region
|
# Menu in tools region
|
||||||
class ToolsTraitsPanel(bpy.types.Panel):
|
class ToolsTraitsPanel(bpy.types.Panel):
|
||||||
bl_label = "zblend_traits"
|
bl_label = "cycles_traits"
|
||||||
bl_space_type = "PROPERTIES"
|
bl_space_type = "PROPERTIES"
|
||||||
bl_region_type = "WINDOW"
|
bl_region_type = "WINDOW"
|
||||||
bl_context = "object"
|
bl_context = "object"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "zblend",
|
"name": "cyclesgame",
|
||||||
"url" : "https://github.com/luboslenco/zblend/",
|
"url" : "https://github.com/luboslenco/cyclesgame/",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"tags": ["kha", "3d"],
|
"tags": ["kha", "3d"],
|
||||||
"description": "Blender game engine",
|
"description": "Blender game engine",
|
||||||
"version": "15.10.0",
|
"version": "15.11.0",
|
||||||
"classPath": "",
|
"classPath": "",
|
||||||
"releasenote": "Initial release.",
|
"releasenote": "Initial release.",
|
||||||
"contributors": ["Lubos"],
|
"contributors": ["Lubos"],
|
||||||
|
|
Loading…
Reference in a new issue