AnsweredAssumed Answered

What is PythonBridge? (Jython Scripting Question)

Question asked by joseph.chimento on Mar 12, 2015

Greetings,

 

I have some questions regarding the Jython class PythonBridge (org.python.pydev.jython.PythonBridge).  I am attempting to use some code from 3Decide.com to automate the creation of models that will be imported into Unity3D.  Here is a sample:

 

Import statement:

import org.python.pydev.jython.PythonBridge

 

Function:

def getLayerResolution(layerName):

    layer     = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName(layerName))[0]

    jlayer    = PythonBridge.toJava(layer, None)

    terrain   = jlayer.getFunctionAttribute()

 

My questions are:  Why is it necessary to "bridge" the terrain layer to Java and what happens when the CE layer is "Bridged" to Java.  I am particularity interested in the second, since I cannot find the "getFunctionAttribute()" anywhere in the CE documentation or online.

 

Thanks.

Outcomes