<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What is PythonBridge? (Jython Scripting Question) in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/what-is-pythonbridge-jython-scripting-question/m-p/249002#M3299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some questions regarding the Jython class PythonBridge (org.python.pydev.jython.PythonBridge).&amp;nbsp; I am attempting to use some code from 3Decide.com to automate the creation of models that will be imported into Unity3D.&amp;nbsp; Here is a sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import statement:&lt;/P&gt;&lt;P&gt;import org.python.pydev.jython.PythonBridge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function:&lt;/P&gt;&lt;P&gt;def getLayerResolution(layerName):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName(layerName))[0]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jlayer&amp;nbsp;&amp;nbsp;&amp;nbsp; = PythonBridge.toJava(layer, None)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; terrain&amp;nbsp;&amp;nbsp; = jlayer.getFunctionAttribute()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&amp;nbsp; Why is it necessary to "bridge" the terrain layer to Java and what happens when the CE layer is "Bridged" to Java.&amp;nbsp; I am particularity interested in the second, since I cannot find the "getFunctionAttribute()" anywhere in the CE documentation or online.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2015 14:30:51 GMT</pubDate>
    <dc:creator>JosephChimento</dc:creator>
    <dc:date>2015-03-12T14:30:51Z</dc:date>
    <item>
      <title>What is PythonBridge? (Jython Scripting Question)</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/what-is-pythonbridge-jython-scripting-question/m-p/249002#M3299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some questions regarding the Jython class PythonBridge (org.python.pydev.jython.PythonBridge).&amp;nbsp; I am attempting to use some code from 3Decide.com to automate the creation of models that will be imported into Unity3D.&amp;nbsp; Here is a sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import statement:&lt;/P&gt;&lt;P&gt;import org.python.pydev.jython.PythonBridge&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function:&lt;/P&gt;&lt;P&gt;def getLayerResolution(layerName):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName(layerName))[0]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jlayer&amp;nbsp;&amp;nbsp;&amp;nbsp; = PythonBridge.toJava(layer, None)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; terrain&amp;nbsp;&amp;nbsp; = jlayer.getFunctionAttribute()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&amp;nbsp; Why is it necessary to "bridge" the terrain layer to Java and what happens when the CE layer is "Bridged" to Java.&amp;nbsp; I am particularity interested in the second, since I cannot find the "getFunctionAttribute()" anywhere in the CE documentation or online.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2015 14:30:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/what-is-pythonbridge-jython-scripting-question/m-p/249002#M3299</guid>
      <dc:creator>JosephChimento</dc:creator>
      <dc:date>2015-03-12T14:30:51Z</dc:date>
    </item>
  </channel>
</rss>

