diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2014-10-23 17:12:28 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2014-10-23 17:12:28 +0400 |
commit | 9ff1ebed52e0f858a395eeea4caf89304e068b2d (patch) | |
tree | b05d0f4b229de61b088a128ad412dd7bba347928 /intern/cycles/app | |
parent | a2ed11c6eeab5fab8cb81e32e1c68fdafdd5dbbc (diff) | |
parent | eaaeae469968c5c78a5d7e6d202f1af00b382a79 (diff) |
Merge remote-tracking branch 'origin/master' into soc-2014-fluid
Conflicts:
.gitignore
intern/cycles/CMakeLists.txt
source/blender/blenkernel/intern/smoke.c
source/blender/python/intern/bpy_interface.c
source/creator/CMakeLists.txt
Diffstat (limited to 'intern/cycles/app')
-rw-r--r-- | intern/cycles/app/CMakeLists.txt | 9 | ||||
-rw-r--r-- | intern/cycles/app/cycles_standalone.cpp | 6 | ||||
-rw-r--r-- | intern/cycles/app/cycles_xml.cpp | 20 | ||||
-rw-r--r-- | intern/cycles/app/io_export_cycles_xml.py | 21 |
4 files changed, 40 insertions, 16 deletions
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt index 52806b0804b..c8464899725 100644 --- a/intern/cycles/app/CMakeLists.txt +++ b/intern/cycles/app/CMakeLists.txt @@ -21,15 +21,20 @@ set(LIBRARIES cycles_util ${BOOST_LIBRARIES} ${OPENEXR_LIBRARIES} - ${OPENGL_LIBRARIES} - ${CYCLES_GLEW_LIBRARY} + ${BLENDER_GL_LIBRARIES} + bf_intern_glew_mx + ${CYCLES_APP_GLEW_LIBRARY} ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARY} + extern_clew + extern_cuew ) +add_definitions(${GL_DEFINITIONS}) + if(WIN32) list(APPEND LIBRARIES ${PTHREADS_LIBRARIES}) endif() diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp index 7ea1ca2d8fb..90333eb3fc5 100644 --- a/intern/cycles/app/cycles_standalone.cpp +++ b/intern/cycles/app/cycles_standalone.cpp @@ -373,9 +373,9 @@ static void options_parse(int argc, const char **argv) } if(ssname == "osl") - options.scene_params.shadingsystem = SceneParams::OSL; + options.scene_params.shadingsystem = SHADINGSYSTEM_OSL; else if(ssname == "svm") - options.scene_params.shadingsystem = SceneParams::SVM; + options.scene_params.shadingsystem = SHADINGSYSTEM_SVM; #ifndef WITH_CYCLES_STANDALONE_GUI options.session_params.background = true; @@ -408,7 +408,7 @@ static void options_parse(int argc, const char **argv) fprintf(stderr, "Unknown shading system: %s\n", ssname.c_str()); exit(EXIT_FAILURE); } - else if(options.scene_params.shadingsystem == SceneParams::OSL && options.session_params.device.type != DEVICE_CPU) { + else if(options.scene_params.shadingsystem == SHADINGSYSTEM_OSL && options.session_params.device.type != DEVICE_CPU) { fprintf(stderr, "OSL shading system only works with CPU device\n"); exit(EXIT_FAILURE); } diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp index d5ef30e5c6f..431796e106b 100644 --- a/intern/cycles/app/cycles_xml.cpp +++ b/intern/cycles/app/cycles_xml.cpp @@ -304,7 +304,8 @@ static void xml_read_integrator(const XMLReadState& state, pugi::xml_node node) xml_read_int(&integrator->volume_max_steps, node, "volume_max_steps"); /* Various Settings */ - xml_read_bool(&integrator->no_caustics, node, "no_caustics"); + xml_read_bool(&integrator->caustics_reflective, node, "caustics_reflective"); + xml_read_bool(&integrator->caustics_refractive, node, "caustics_refractive"); xml_read_float(&integrator->filter_glossy, node, "filter_glossy"); xml_read_int(&integrator->seed, node, "seed"); @@ -329,6 +330,7 @@ static void xml_read_camera(const XMLReadState& state, pugi::xml_node node) xml_read_float(&cam->aperturesize, node, "aperturesize"); // 0.5*focallength/fstop xml_read_float(&cam->focaldistance, node, "focaldistance"); xml_read_float(&cam->shuttertime, node, "shuttertime"); + xml_read_float(&cam->aperture_ratio, node, "aperture_ratio"); if(xml_equal_string(node, "type", "orthographic")) cam->type = CAMERA_ORTHOGRAPHIC; @@ -509,8 +511,10 @@ static void xml_read_shader_graph(const XMLReadState& state, Shader *shader, pug else if(string_iequals(node.name(), "mapping")) { snode = new MappingNode(); } - else if(string_iequals(node.name(), "ward_bsdf")) { - snode = new WardBsdfNode(); + else if(string_iequals(node.name(), "anisotropic_bsdf")) { + AnisotropicBsdfNode *aniso = new AnisotropicBsdfNode(); + xml_read_enum(&aniso->distribution, AnisotropicBsdfNode::distribution_enum, node, "distribution"); + snode = aniso; } else if(string_iequals(node.name(), "diffuse_bsdf")) { snode = new DiffuseBsdfNode(); @@ -550,9 +554,7 @@ static void xml_read_shader_graph(const XMLReadState& state, Shader *shader, pug snode = hair; } else if(string_iequals(node.name(), "emission")) { - EmissionNode *emission = new EmissionNode(); - xml_read_bool(&emission->total_power, node, "total_power"); - snode = emission; + snode = new EmissionNode(); } else if(string_iequals(node.name(), "ambient_occlusion")) { snode = new AmbientOcclusionNode(); @@ -635,6 +637,12 @@ static void xml_read_shader_graph(const XMLReadState& state, Shader *shader, pug else if(string_iequals(node.name(), "separate_hsv")) { snode = new SeparateHSVNode(); } + else if(string_iequals(node.name(), "combine_xyz")) { + snode = new CombineHSVNode(); + } + else if(string_iequals(node.name(), "separate_xyz")) { + snode = new SeparateHSVNode(); + } else if(string_iequals(node.name(), "hsv")) { snode = new HSVNode(); } diff --git a/intern/cycles/app/io_export_cycles_xml.py b/intern/cycles/app/io_export_cycles_xml.py index e310d928b26..ad8fb9d3dd3 100644 --- a/intern/cycles/app/io_export_cycles_xml.py +++ b/intern/cycles/app/io_export_cycles_xml.py @@ -111,19 +111,29 @@ class ExportCyclesXML(bpy.types.Operator, ExportHelper): # generate mesh node nverts = "" verts = "" + uvs = "" P = "" for v in mesh.vertices: P += "%f %f %f " % (v.co[0], v.co[1], v.co[2]) - for i, f in enumerate(mesh.tessfaces): - nverts += str(len(f.vertices)) + " " + 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) + " " - verts += " " - - node = etree.Element('mesh', attrib={'nverts': nverts, 'verts': verts, 'P': P}) + + 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) @@ -139,3 +149,4 @@ def unregister(): if __name__ == "__main__": register() + |