diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:18:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:18:52 +0300 |
commit | de777ad9e69320500bf05d97a7d6d60ba4fd0a93 (patch) | |
tree | a1141843a3e1df137bbc6490641bedf12a12a8fa /intern/cycles/app | |
parent | 6d38d824377c55aaaed7e8283e81a7128bf6f728 (diff) | |
parent | 1daa20ad9f6f0c433a4e0a97a74e5beb9ea4e2c7 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/app')
-rw-r--r-- | intern/cycles/app/cycles_cubin_cc.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/app/cycles_server.cpp | 1 | ||||
-rw-r--r-- | intern/cycles/app/cycles_standalone.cpp | 1 | ||||
-rw-r--r-- | intern/cycles/app/cycles_xml.cpp | 3 | ||||
-rw-r--r-- | intern/cycles/app/io_export_cycles_xml.py | 22 |
5 files changed, 12 insertions, 17 deletions
diff --git a/intern/cycles/app/cycles_cubin_cc.cpp b/intern/cycles/app/cycles_cubin_cc.cpp index 3c83bf2dae3..01a1234531b 100644 --- a/intern/cycles/app/cycles_cubin_cc.cpp +++ b/intern/cycles/app/cycles_cubin_cc.cpp @@ -164,7 +164,7 @@ bool link_ptxas(CompilationSettings &settings) ptx += " --verbose"; printf("%s\n", ptx.c_str()); } - + int pxresult = system(ptx.c_str()); if(pxresult) { fprintf(stderr, "Error: ptxas failed (%x)\n\n", pxresult); diff --git a/intern/cycles/app/cycles_server.cpp b/intern/cycles/app/cycles_server.cpp index e65b9d769e4..e2166473aa3 100644 --- a/intern/cycles/app/cycles_server.cpp +++ b/intern/cycles/app/cycles_server.cpp @@ -112,4 +112,3 @@ int main(int argc, const char **argv) return 0; } - diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp index c682744f5fa..1ec8d18f410 100644 --- a/intern/cycles/app/cycles_standalone.cpp +++ b/intern/cycles/app/cycles_standalone.cpp @@ -524,4 +524,3 @@ int main(int argc, const char **argv) return 0; } - diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp index a46955322e3..895a83818df 100644 --- a/intern/cycles/app/cycles_xml.cpp +++ b/intern/cycles/app/cycles_xml.cpp @@ -184,7 +184,7 @@ static bool xml_equal_string(xml_node node, const char *name, const char *value) if(attr) return string_iequals(attr.value(), value); - + return false; } @@ -697,4 +697,3 @@ void xml_read_file(Scene *scene, const char *filepath) } CCL_NAMESPACE_END - diff --git a/intern/cycles/app/io_export_cycles_xml.py b/intern/cycles/app/io_export_cycles_xml.py index d02487aefa4..437a504d014 100644 --- a/intern/cycles/app/io_export_cycles_xml.py +++ b/intern/cycles/app/io_export_cycles_xml.py @@ -39,7 +39,7 @@ def write(node, fname): f = open(fname, "w") f.write(s) - + class CyclesXMLSettings(bpy.types.PropertyGroup): @classmethod def register(cls): @@ -53,11 +53,11 @@ class CyclesXMLSettings(bpy.types.PropertyGroup): maxlen=256, default='', subtype='FILE_PATH') - + @classmethod def unregister(cls): del bpy.types.Scene.cycles_xml - + # User Interface Drawing Code class RenderButtonsPanel(): bl_space_type = 'PROPERTIES' @@ -74,13 +74,13 @@ class PHYSICS_PT_fluid_export(RenderButtonsPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - + cycles = context.scene.cycles_xml - + #layout.prop(cycles, "filepath") layout.operator("export_mesh.cycles_xml") - + # Export Operator class ExportCyclesXML(bpy.types.Operator, ExportHelper): bl_idname = "export_mesh.cycles_xml" @@ -117,23 +117,23 @@ class ExportCyclesXML(bpy.types.Operator, ExportHelper): P += "%f %f %f " % (v.co[0], v.co[1], v.co[2]) verts_and_uvs = zip(mesh.tessfaces, mesh.tessface_uv_textures.active.data) - + for f, uvf in verts_and_uvs: vcount = len(f.vertices) nverts += str(vcount) + " " for v in f.vertices: verts += str(v) + " " - + uvs += str(uvf.uv1[0]) + " " + str(uvf.uv1[1]) + " " uvs += str(uvf.uv2[0]) + " " + str(uvf.uv2[1]) + " " uvs += str(uvf.uv3[0]) + " " + str(uvf.uv3[1]) + " " if vcount==4: uvs += " " + str(uvf.uv4[0]) + " " + str(uvf.uv4[1]) + " " - + node = etree.Element('mesh', attrib={'nverts': nverts.strip(), 'verts': verts.strip(), 'P': P, 'UV' : uvs.strip()}) - + # write to file write(node, filepath) @@ -147,5 +147,3 @@ def unregister(): if __name__ == "__main__": register() - - |