diff options
Diffstat (limited to 'o3d/plugin')
-rw-r--r-- | o3d/plugin/idl/client.idl | 6 | ||||
-rw-r--r-- | o3d/plugin/idl/pack.idl | 8 | ||||
-rw-r--r-- | o3d/plugin/mac/main_mac.mm | 22 | ||||
-rw-r--r-- | o3d/plugin/o3d_binding.py | 16 |
4 files changed, 17 insertions, 35 deletions
diff --git a/o3d/plugin/idl/client.idl b/o3d/plugin/idl/client.idl index fc92311..439f63b 100644 --- a/o3d/plugin/idl/client.idl +++ b/o3d/plugin/idl/client.idl @@ -138,7 +138,7 @@ class Client { \param id The id of the object to look for. \return The object or null if a object with the given id is not found. %] - [const, noreturndocs] ObjectBase? GetObjectById(Id id); + [const] ObjectBase? GetObjectById(Id id); %[ Searches the Client for objects of a particular name and type. @@ -146,14 +146,14 @@ class Client { \param class_name name of class to look for. \return Array of objects found. %] - [const, noretundocs] ObjectArray GetObjects(String name, String class_name); + [const] ObjectArray GetObjects(String name, String class_name); %[ Searches the Client for objects of a particular type. \param class_name name of class to look for. \return Array of objects found. %] - [const, noreturndocs] ObjectArray GetObjectsByClassName(String class_name); + [const] ObjectArray GetObjectsByClassName(String class_name); %[ \var RenderMode, diff --git a/o3d/plugin/idl/pack.idl b/o3d/plugin/idl/pack.idl index 4e1e6d5..460d2c6 100644 --- a/o3d/plugin/idl/pack.idl +++ b/o3d/plugin/idl/pack.idl @@ -165,7 +165,7 @@ typedef ObjectBase[] ObjectArray; \li o3d.TRSToMatrix4 \return The created object. %] - [noreturndocs] ObjectBase? CreateObject(String type_name); + ObjectBase? CreateObject(String type_name); %[ Creates a new Texture2D object of the specified size and format and @@ -234,8 +234,7 @@ typedef ObjectBase[] ObjectArray; DrawPasses, etc... \returns Array of Objects. %] - [const, noreturndocs] - ObjectArray GetObjects(String name, String class_type_name); + [const] ObjectArray GetObjects(String name, String class_type_name); %[ Search the pack for all objects of a certain class @@ -249,8 +248,7 @@ typedef ObjectBase[] ObjectArray; DrawPasses, etc... \returns Array of Objects. %] - [const, noreturndocs] - ObjectArray GetObjectsByClassName(String class_type_name); + [const] ObjectArray GetObjectsByClassName(String class_type_name); %[ All the objects managed by this pack. diff --git a/o3d/plugin/mac/main_mac.mm b/o3d/plugin/mac/main_mac.mm index c9dcec0..17f1039 100644 --- a/o3d/plugin/mac/main_mac.mm +++ b/o3d/plugin/mac/main_mac.mm @@ -903,7 +903,7 @@ extern "C" { if (obj->drawing_model_ == NPDrawingModelOpenGL) { CGLSetCurrentContext(obj->mac_cgl_context_); - } else if (!had_a_window && obj->mac_agl_context_ == NULL) { // setup AGL context + } else if (obj->mac_agl_context_ == NULL) { // setup AGL context AGLPixelFormat myAGLPixelFormat = NULL; // We need to spec out a few similar but different sets of renderer @@ -1075,10 +1075,8 @@ extern "C" { // Renderer is already initialized from a previous call to this function, // just update size and position and return. if (had_a_window) { - if (obj->renderer()) { - obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); - obj->Resize(window->width, window->height); - } + obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); + obj->Resize(window->width, window->height); return NPERR_NO_ERROR; } @@ -1096,22 +1094,22 @@ extern "C" { ::aglDestroyContext(obj->mac_agl_context_); obj->mac_agl_context_ = NULL; } + return NPERR_NO_ERROR; } obj->client()->Init(); obj->client()->SetRenderOnDemandCallback( new RenderOnDemandCallbackHandler(obj)); - if (obj->renderer()) { - obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); - obj->Resize(window->width, window->height); + obj->renderer()->SetClientOriginOffset(gl_x_origin, gl_y_origin); + obj->Resize(window->width, window->height); + #ifdef CFTIMER - // now that the grahics context is setup, add this instance to the timer - // list so it gets drawn repeatedly - gRenderTimer.AddInstance(instance); + // now that the grahics context is setup, add this instance to the timer + // list so it gets drawn repeatedly + gRenderTimer.AddInstance(instance); #endif // CFTIMER - } return NPERR_NO_ERROR; } diff --git a/o3d/plugin/o3d_binding.py b/o3d/plugin/o3d_binding.py index c0ae572..7d7490c 100644 --- a/o3d/plugin/o3d_binding.py +++ b/o3d/plugin/o3d_binding.py @@ -28,6 +28,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """o3d binding model module. This module implements the glue functions for the o3d binding model, binding @@ -299,21 +300,6 @@ def CppGetStatic(scope, type_defn, field): cpp_utils.GetGetterName(field)) -def JSDocTypeString(type_defn): - """Gets the representation of a type in JSDoc notation. - - Args: - type_defn: a Definition for the type. - - Returns: - a string that is the JSDoc notation of type_defn. - """ - type_defn = type_defn.GetFinalType() - type_stack = type_defn.GetParentScopeStack() - name = type_defn.name - return '!' + '.'.join([s.name for s in type_stack[1:]] + [name]) - - _binding_glue_header_template = string.Template('') |