From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57471 Path: news.gmane.org!not-for-mail From: Michail Vidiassov Newsgroups: gmane.comp.tex.context Subject: Re: 3D annotations Date: Fri, 26 Mar 2010 08:53:50 +0300 (MSK) Message-ID: References: <4BAA12FC.4070400@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269582976 26959 80.91.229.12 (26 Mar 2010 05:56:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 26 Mar 2010 05:56:16 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 26 06:56:08 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nv2We-0004PS-66 for gctc-ntg-context-518@m.gmane.org; Fri, 26 Mar 2010 06:56:08 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9FD73C9CCF; Fri, 26 Mar 2010 06:56:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Z243ek3ZjZev; Fri, 26 Mar 2010 06:56:07 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DDBEFC9CE0; Fri, 26 Mar 2010 06:56:03 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A81B0C9CE0 for ; Fri, 26 Mar 2010 06:56:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id vtn0vxbgsc7v for ; Fri, 26 Mar 2010 06:55:58 +0100 (CET) Original-Received: from serv.iaas.msu.ru (serv.iaas.msu.ru [212.192.224.252]) by balder.ntg.nl (Postfix) with ESMTP id AB540C9CCF for ; Fri, 26 Mar 2010 06:55:58 +0100 (CET) Original-Received: from [192.168.0.102] ([81.200.24.25]) (authenticated bits=0) by serv.iaas.msu.ru (8.14.3/8.14.3) with ESMTP id o2Q5qetO022833 for ; Fri, 26 Mar 2010 08:52:40 +0300 (MSK) (envelope-from master@iaas.msu.ru) X-X-Sender: master@macbook.local In-Reply-To: User-Agent: Alpine 2.00 (OSX 1167 2008-08-23) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:57471 Archived-At: Dear Hans, On Thu, 25 Mar 2010, Michail Vidiassov wrote: > On Wed, 24 Mar 2010, Hans Hagen wrote: > >> there is u3d support presen tbut nobody tested it > > thank you for your latest effort to put u3d support in a working state, but now that Adobe has fallen in love with a new 3D format, PRC, the following is to be changed: lpdf-u3d.lua if not stream then local attr = pdfdictionary { Type = pdfconstant("3D"), - Subtype = pdfconstant("U3D"), } + if string.upper(string.sub(foundname,-4))==".PRC" then + attr.Subtype = pdfconstant("PRC") + else + attr.Subtype = pdfconstant("U3D") + end local streamviews = checkedkey(streamparam, "views", "table") if streamviews then local list = pdfarray() May be a more robust way is to read first 3 bytes of the model file, since "U3D" or "PRC" signature is always there - that can be done instead of relying on file name extension or only in case it it not "u3d" or "prc". Also PRC annotations have to trigger setting PDF version to 1.7.3 (developer extensions dictionary mechanism). It can be done per your advice directly \doPDFaddtocatalog { /Extensions <> >> } But what about an interface like \pdfmicroversion and automatic pushing up of PDF version once PRC annontation happens? Also I try to remind you about pdfboolean problem in lpdf-ini.lua (old code is not OK if b is "false" and default is "true") local function pdfboolean(b,default) - if ((type(b) == "boolean") and b) or default then - return p_true + if type(b) ~= "boolean" then + if default then + return p_true + else + return p_false + end else - return p_false + if b then + return p_true + else + return p_false + end end end Sincerely, Michail PS. And a great palliative way to deal with 3D annotations is via attaching a 3D PDF file made with LaTeX (by Asymptote, for example). But while your method of answering my messages in lua works OK for new code (updating minimals and making a diff with old code is not harder than checking e-mail inbox - "Your morning patch, sir!" ;), I can not deduce from existing sea of ConTeXt code the status of file attachments support. ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________