Author Topic: Assign lens focal length and name for non cpu lenses  (Read 69034 times)

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3346
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Assign lens focal length and name for non cpu lenses
« Reply #125 on: January 05, 2017, 05:26:16 AM »
Seriously what an excellent way to start off the new year on a great note @dfort and thanks for making this happen!
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Assign lens focal length and name for non cpu lenses
« Reply #126 on: January 06, 2017, 05:55:17 PM »
In the Latest Experimentals Build (2017-01-06 13:40) for 700D "Non-CPU lens info" is missing the lua.mo module ::)
EOS 700D 1.1.5, EOS 500D

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Assign lens focal length and name for non cpu lenses
« Reply #127 on: January 06, 2017, 06:11:50 PM »
The same if try to compile :-[

Building module lua...
Updated HGVERSION
[ README   ]   module_strings.h
Traceback (most recent call last):
  File "../readme2modulestrings.py", line 150, in <module>
    size = extent_func(commit_msg)[0]
  File "/home/fabio/magic-lantern/manual_lens_lua_script/modules/rbf_read.py", line 64, in extent_func
    w += font.wTable[ord(c) - font.charFirst]
IndexError: list index out of range
make[4]: *** [module_strings.h] Errore 1

********************************************************
WARNING: module lua failed to build, deleting
********************************************************
EOS 700D 1.1.5, EOS 500D

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12320
  • Emergencies only
Re: Assign lens focal length and name for non cpu lenses
« Reply #128 on: January 06, 2017, 06:20:12 PM »
Fixed.

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Assign lens focal length and name for non cpu lenses
« Reply #129 on: January 06, 2017, 06:29:08 PM »
Magic @a1ex !  8)

it compiles now.
EOS 700D 1.1.5, EOS 500D

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Assign lens focal length and name for non cpu lenses
« Reply #130 on: January 06, 2017, 08:40:37 PM »
It compiles and I also found a solution to the issue reported in Reply #116. Simply clear the Canon settings. 4th wrench, Clear settings: Clear all camera settings. Of course now I have to re-enter my preferred settings and hope that the issue doesn't return.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Assign lens focal length and name for non cpu lenses
« Reply #131 on: January 06, 2017, 08:44:14 PM »
In the Latest Experimentals Build (2017-01-06 13:40) for 700D "Non-CPU lens info" is missing the lua.mo module ::)

The name of the file is lens.lua and the name of the module as it appears on the lua menu is Manual Lens Information.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3346
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Assign lens focal length and name for non cpu lenses
« Reply #132 on: January 06, 2017, 08:46:14 PM »
Just to clarify... exactly which branch are you guys compiling from?

I'd like to give this a try even if its already implemented into the Nightlies.
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Assign lens focal length and name for non cpu lenses
« Reply #133 on: January 06, 2017, 08:50:25 PM »
It is the manual_lens_info branch:

https://bitbucket.org/hudson/magic-lantern/branch/manual_lens_info

Note to self:  Reset camera to default settings before making bug reports.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Assign lens focal length and name for non cpu lenses
« Reply #134 on: January 07, 2017, 01:43:11 AM »
Great news. You don't need to learn how to compile or beg to get a build.

https://builds.magiclantern.fm/experiments.html

Scroll down to the Non-CPU lens info section. I'm still hosting builds for the 5D3.123. Sorry 1100D/T3 users, there are still some issues that need to be resolved before you can use this.

I've added some popular manual lenses along with instructions on a lens.lua script that I'm testing. Here it is if you want to try it out. The script is self documented.

lens.lua
Code: [Select]
-- Manual Lens Information
-- Supplies lens information for manual lenses
-- Whenever there is a non-chipped lens detected, we prompt the user to select the attached manual lens from a list

require("ui")
require("config")
require("xmp")

lenses =
{
--  The following is for testing purposes. Comment out the following lines then either uncomment only the lenses
--  that you want to use from the list or add your own lenses. Tip: Put your most used lenses at the top of the list.

    { name = "My Lens", focal_length = 50 },
    { name = "My Other Lens", focal_length = 25 },

--  Zeiss ZF.2 manual lenses Nikon mount - these work with the lens profiles that ship with Adobe Camera Raw
--  { name = "Zeiss Distagon T* 2.8/15 ZF.2",        focal_length =  15, manual_aperture = 2.8 },
--  { name = "Zeiss Distagon T* 3.5/18 ZF.2",        focal_length =  18, manual_aperture = 3.5 },
--  { name = "Zeiss Distagon T* 2.8/21 ZF.2",        focal_length =  21, manual_aperture = 2.8 },
--  { name = "Zeiss Distagon T* 2.8/25 ZF.2",        focal_length =  25, manual_aperture = 2.8 },
--  { name = "Zeiss Distagon T* 2/25 ZF.2",          focal_length =  25, manual_aperture = 2   },
--  { name = "Zeiss Distagon T* 2/28 ZF.2",          focal_length =  28, manual_aperture = 2   },
--  { name = "Zeiss Distagon T* 2/35 ZF.2",          focal_length =  35, manual_aperture = 2   },
--  { name = "Zeiss Distagon T* 1.4/35 ZF.2",        focal_length =  35, manual_aperture = 1.4 },
--  { name = "Zeiss Makro-Planar T* 2/50 ZF.2",      focal_length =  50, manual_aperture = 2   },
--  { name = "Zeiss Planar T* 1.4/50 ZF.2",          focal_length =  50, manual_aperture = 1.4 },
--  { name = "Zeiss Planar T* 1.4/85 ZF.2",          focal_length =  85, manual_aperture = 1.4 },
--  { name = "Zeiss Makro-Planar T* 2/100 ZF.2",     focal_length = 100, manual_aperture = 2   },
--  { name = "Zeiss Apo Sonnar T* 2/135 ZF.2",       focal_length = 135, manual_aperture = 2   },

--  Samyang manual lenses - also branded as Rokinon and Bower. Cine versions use the same lens profile.
--  The lens profiles for Samyang manual lenses that ship with Adobe Camera raw must be modified in order
--  for automatic lens detection to work.
--  More information here: http://www.magiclantern.fm/forum/index.php?topic=18083.msg176261#msg176261
--  { name = "Samyang 8mm f/2.8 UMC Fisheye",        focal_length =   8, manual_aperture = 2.8 },
--  { name = "Samyang 8mm f/2.8 UMC Fisheye II",     focal_length =   8, manual_aperture = 2.8 }, --   8mm T3.1 Cine
--  { name = "Samyang 8mm f/3.5 UMC Fish-Eye CS",    focal_length =   8, manual_aperture = 3.5 },
--  { name = "Samyang 8mm f/3.5 UMC Fish-Eye CS II", focal_length =   8, manual_aperture = 3.5 }, --   8mm T3.8 Cine
--  { name = "Samyang 10mm f/2.8 ED AS NCS CS",      focal_length =  10, manual_aperture = 2.8 }, --  10mm T3.1 Cine
--  { name = "Samyang 12mm f/2 NCS CS",              focal_length =  12, manual_aperture = 2   }, --  12mm T2.2 Cine
--  { name = "Samyang 12mm f/2.8 ED AS NCS Fisheye", focal_length =  12, manual_aperture = 2.8 }, --  12mm T3.1 Cine
--  { name = "Samyang 14mm f/2.8 ED AS IF UMC",      focal_length =  14, manual_aperture = 2.8 }, --  14mm T3.1 Cine
--  { name = "Samyang 16mm f/2 ED AS UMC CS",        focal_length =  16, manual_aperture = 2   }, --  16mm T2.2 Cine
--  { name = "Samyang 21mm f/1.4 ED AS UMC CS",      focal_length =  21, manual_aperture = 1.4 }, --  21mm T1.5 Cine
--  { name = "Samyang 24mm f/1.4 ED AS IF UMC",      focal_length =  24, manual_aperture = 1.4 }, --  24mm T1.5 Cine
--  { name = "Samyang 35mm f/1.4 AS IF UMC",         focal_length =  35, manual_aperture = 1.4 }, --  35mm T1.5 Cine
--  { name = "Samyang 50mm f/1.2 AS UMC CS",         focal_length =  50, manual_aperture = 1.2 },
--  { name = "Samyang 50mm f/1.4 AS UMC",            focal_length =  50, manual_aperture = 1.4 }, --  50mm T1.5 Cine
--  { name = "Samyang 85mm f/1.4 AS IF UMC",         focal_length =  85, manual_aperture = 1.4 }, --  85mm T1.5 Cine
--  { name = "Samyang 100mm f/2.8 ED UMC MACRO",     focal_length = 100, manual_aperture = 2.8 }, -- 100mm T3.1 Cine
--  { name = "Samyang 135mm f/2 ED UMC",             focal_length = 135, manual_aperture = 2   }, -- 135mm T2.2 Cine
--  { name = "Samyang 300mm f/6.3 ED UMC CS",        focal_length = 300, manual_aperture = 6.3 },
}

selector_instance = selector.create("Select Manual Lens", lenses, function(l) return l.name end, 600)

xmp:add_property(xmp.lens_name, function() return lens.name end)
xmp:add_property(xmp.focal_length, function() return lens.focal_length end)
xmp:add_property(xmp.aperture, function() return math.floor(camera.aperture.value * 10) end)

function property.LENS_NAME:handler(value)
    if lens.is_chipped == false then
        task.create(select_lens)
    else
        if selector_instance ~= nil then
            selector_instance.cancel = true
        end
        xmp:stop()
    end
end

function select_lens()
    if #lenses > 1 then
        local menu_already_open = menu.visible
        if not menu_already_open then
            menu.open()
            display.rect(0, 0, display.width, display.height, COLOR.BLACK, COLOR.BLACK)
        end
        if selector_instance:select() then
            update_lens()
        end
        if not menu_already_open then
            menu.close()
        end
    elseif #lenses == 1 then
        update_lens()
    end
end

function update_lens()
    for k,v in pairs(lenses[selector_instance.index]) do
        lens[k] = v
    end
    xmp:start()
end

lens_menu = menu.new
{
    parent = "Lens Info Prefs",
    name = "Manual Lens",
    help = "Info to use for attached non-chipped lens",
    icon_type = ICON_TYPE.ACTION,
    select = function()
        if lens.is_chipped == false then
            task.create(select_lens)
        end
    end,
    rinfo = function()
        return lens.name
    end,
    warning = function()
        if lens.is_chipped then
            return "Chipped lens is attached"
        end
    end
}

if lens.is_chipped == false then
    task.create(select_lens)
end
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #135 on: January 07, 2017, 10:28:23 AM »
@anyone

I've downloaded the lens info experimental build for the EOSM.

I've tested if it moves my 24-105 and it does: great!

But, when I try running one of my image taking scripts, that run fine on my 5D3, things go bad :(

Could someone tell me if any of the Lua calls, eg camera.shoot, have changed their calling syntax.

Cheers

Garry

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Assign lens focal length and name for non cpu lenses
« Reply #136 on: January 07, 2017, 02:16:00 PM »
This branch has the latest lua_fix merged in.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #137 on: January 07, 2017, 03:46:47 PM »
Sorry, David, where can I find out the changes, i.e. in function calls etc.

Sorry to be a pain.


garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #139 on: January 07, 2017, 04:22:18 PM »
@dmilligan

Great, thank you: got the full exposure/focus bracketing code running on the EOSM now :)

As usual, thanks for all you support.

All I need to do now is speed things up, ie using single steps is too slow. I need a more intelligent move_to algorithm.

Cheers

Garry

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #140 on: January 07, 2017, 04:41:45 PM »
@David

In the Lua fix, has the control of an EF lens changed. It looks like a lens.focus(1,1,false) call, say, seems to drive the lens differently than previously, ie finer steps.

Cheers

Garry

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Assign lens focal length and name for non cpu lenses
« Reply #141 on: January 08, 2017, 07:02:33 AM »
Saw that the latest commits include, "lens.lua: store selected lens in config" -- I just tested it and it doesn't seem to work, at least not as I would have expected a configuration file would work which is to highlight the last used lens when the camera is started.

Ok, that's a new feature so maybe it isn't ready yet or I'm not using it properly. Let's go over what's working and what's not.

The .xmp "sidecar" file that was implimented back in November is working great for CR2 and JPEG files. We know that the Zeiss ZF.2 lenses are being automatically detected by Adobe Camera Raw so I pretended that my cheap Samyang lens was an expensive Zeiss.



Nice! Here's the .xmp file:

Code: [Select]
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37        ">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:aux="http://ns.adobe.com/exif/1.0/aux/"
    exif:ExifVersion="0230"
        aux:Lens="Zeiss Planar T* 1.4/50 ZF.2"
    exif:FNumber="14/10"
    exif:FocalLength="50/1"
>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>

Time to get nit picky. Shouldn't that ">" that is sitting all the way to the left right after the FocalLength field be on the end of the previous line? It doesn't affect functionality but since everything is so neatly formatted it looks out of place.

XMP files are not created for "silent" DNG files. Although exiftool detects some lens tags in the files, it doesn't matter if a manual lens or a Canon EF lens is attached, the data is always the same:

Code: [Select]
F Number                        : 0
Max Aperture Value              : 1.0
Focal Length                    : 0.0 mm
Focal Length In 35mm Format     : 0 mm
Lens Model                      :
Focal Length                    : 0.0 mm

Of course since ML code is producing the DNG files maybe we can look into writing the lens metadata directly into the file?

Another file format that isn't benefitting from the manual lens lua script is H.264. Chipped lenses (electronic chips not glass  ;) ) are saved in the metadata but not manual lenses.

Code: [Select]
Canon Image Type                : MVI:Canon EOS REBEL T5i
Lens                            : 0.0 mm
Scale Factor To 35 mm Equivalent: 1.6
Focal Length                    : 0.0 mm (35 mm equivalent: 0.0 mm)
Hyperfocal Distance             : inf m
Lens                            : 0.0 mm (35 mm equivalent: 0.0 mm)

The first feature that was working was saving the manual lens metadata to MLV files and that's still working great. Note that the "Serial" field isn't implimented in the lua script but this also seems to be an issue with chipped lenses that save the lens serial number in CR2 and H.264 files but not to MLV files.

Code: [Select]
Block: LENS
  Offset: 0x0000014c
    Size: 96
    Time: 0.003000 ms
     Name:        'Samyang 50mm f/1.4 AS UMC'
     Serial:      ''
     Focal Len:   50 mm
     Focus Dist:  0 mm
     Aperture:    f/1.40
     IS Mode:     0
     AF Mode:     3
     Lens ID:     0x00000000
     Flags:       0x00000000

When the "lens_info_fix" branch was merged into "manual_lens_info" we gained several new fields but for now they are blank. A problem with this is that it is no longer possible to switch lenses from the "Lens Info/Prefs" menu.



Before the merge it looked like this:



Finally, I brought up an issue with the EOSM on Reply #116 and it happened again with the 700D. I was able to clear it up on the EOSM by clearing all Canon camera setting but this time it was intermittent and wouldn't show up when loading a new build that doesn't have a "magic.cfg" or any other configuration file saved yet. I'm still hunting down what condition causes this but it started after lua_fix was merged on December 10.



Please check out the latest builds on the experimental downloads page, try this on other cameras and report back. Thanks in advance to the testers and a big thanks to @dmilligan for all the work he put into this.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #142 on: January 08, 2017, 09:15:15 AM »
@dfort

Just got up!

Just loaded the latest experimental EOSM build and the good news is my scripts still work  ;)

The mystery for me at the moment is to work out what to do with the new lens script, as I haven't been following this development.

I'm testing with a 14mm Rokinon.

Any hints as to how to use the new functionality?

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #143 on: January 08, 2017, 11:17:46 AM »
OK having looked at the script, I think I worked it out...but

The pop up comes up and I select my lens, eg:

Code: [Select]
{ name = "Rokinon 14mm", focal_length = 14, manual_aperture = 2.8},
I take a .cr2 image.

I don't see a .xmp file on the card  ???

I import in Lightroom and 'only' see the exposure it captured.

Also, unless I'm mistaken, I haven't see a the shutter button freeze for a while. Does this build fix it?

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #144 on: January 08, 2017, 11:53:06 AM »
Further EOSM testing.

The screen randomly flashes colours, orange or magenta, when you take a picture. Have never seen that before.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Assign lens focal length and name for non cpu lenses
« Reply #145 on: January 08, 2017, 04:58:50 PM »
@garry23 -- Are you using the lens.lua script I posted in Reply #134? For the Rokinon 14mm all you need to do on the script is comment out the lines with "My Lens" and "My Other Lens" (those are just for testing purposes) and uncomment the "Samyang 14mm f/2.8 ED AS IF UMC" (the Rokinon brand is manufactured by Samyang). You can make your own entry but it has to be named exactly the way the way it is in the lens profile file for it to work automatically in Lightroom.

I'm surprised that it isn't working for you. I just tried the version from the experimentals download page on the EOSM and it is working for me. In fact I used it on a camera that had all the Canon settings set to default values so in order to get it working with a manual lens I had to go through the drill of switching to Manual mode to get into the Custom Functions(C.Fn) and setting C.FnIV:Operation/Others Release shutter w/o lens to 1:ENABLE. Once lua and the lens.lua script were activated it created the .xmp file for CR2 shots, in fact it also works with JPEG so I added that note to my previous post.

Ok so let's go back to the lens.lua script that is in the experimentals download and putting in your lens exactly the way you entered it here:

Code: [Select]
{ name = "Rokinon 14mm", focal_length = 14, manual_aperture = 2.8},
To get this working with ACR and Lightroom find the profile for that lens. On my Mac it is located here:
Code: [Select]
/Library/Application\ Support/Adobe/CameraRaw/LensProfiles/1.0/Rokinon/Canon
Now put a copy of that file into your user library. Of course your user name is different than mine but on my system (ok, my wife's system) it is:
Code: [Select]
/Users/rosiefort/Library/Application\ Support/Adobe/CameraRaw/LensProfiles/1.0
Note that you can create directories within the 1.0 folder to keep things organized or if you just have a few manual lenses that isn't really necessary.

Now for the hack to get this lens profile working automatically. Add this line to each section of the lens profile. In the Rokinon 14mm lens profile there are two sections, each starting with <rdf:Description. I put it this line just before the LensPrettyName tag but I don't think that it really matters where you put it:

Code: [Select]
       stCamera:Lens="Rokinon 14mm"       

I just went through all these steps and tested it on the EOSM and Lightroom was able to automatically detect the lens using the .xmp sidecar file.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #146 on: January 08, 2017, 05:34:13 PM »
Daniel

Thanks for find the time to come back to me so quickly.

I did what you said, ie added that profile to every occurrence, eg under Canon the pscache.dat file entry for canon looks like this (note I added the <>):

Code: [Select]
<rdf:li rdf:parseType="Resource">
                  <stCamera:DocumentID>392EC5D0752F1230840E46CB1142785C</stCamera:DocumentID>
                  <stCamera:Make>Canon</stCamera:Make>
                  <stCamera:Model>Canon EOS-1Ds Mark III</stCamera:Model>
   <stCamera:Lens="Rokinon 14mm">
                  <stCamera:LensPrettyName>Rokinon 14mm f/2.8 ED AS IF UMC</stCamera:LensPrettyName>
                  <stCamera:CameraPrettyName>Canon EOS-1Ds Mark III</stCamera:CameraPrettyName>
                  <stCamera:CameraRawProfile>True</stCamera:CameraRawProfile>
                  <stCamera:SensorFormatFactor>1.000000</stCamera:SensorFormatFactor>
                  <stCamera:ModifyDate>131240269000000000</stCamera:ModifyDate>
                  <stCamera:FishEyeLens>False</stCamera:FishEyeLens>

Still no update in LR.

BTW the new lens script, will I see xmp files on the card? I don't at the moment.

Also, this build does interact with the EOSM 'LV' when taking a .CR2 image, screen flashes strange colours.

IBIRRU

  • New to the forum
  • *
  • Posts: 33
Re: Assign lens focal length and name for non cpu lenses
« Reply #147 on: January 08, 2017, 06:18:49 PM »
This is my experience with the  Experiments release of "Non-CPU lens info" 07-jan-2017

In my 700D the xmp sidecar file for CR2 works OK

In the lcp profile If I add the tag <stCamera:Lens>Samyang 14mm f/2.8 ED AS IF UMC</stCamera:Lens>  before <stCamera:LensPrettyName>Samyang 14mm f/2.8 ED AS IF UMC</stCamera:LensPrettyName> then ACR found automatically the lens profile, otherwise I need to choose it manually from list.
EOS 700D 1.1.5, EOS 500D

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1854
Re: Assign lens focal length and name for non cpu lenses
« Reply #148 on: January 08, 2017, 06:22:13 PM »
@IBIRRU

Just to help me.

You actually see a .xmp file on the card?

I don't on the EOSM.


dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3739
Re: Assign lens focal length and name for non cpu lenses
« Reply #149 on: January 08, 2017, 06:28:23 PM »
I did what you said, ie added that profile to every occurrence, eg under Canon the pscache.dat file entry for canon looks like this (note I added the <>):

The pscache.dat file? I never touched that. Seems like it is some sort of automatically generated database file so don't edit it!

Let's start with getting that .xmp file working. Without that, there's no point importing the CR2 (or JPEG) into Lightroom.

Try this, from the magiclantern-manual_lens_info.2017Jan08.EOSM202 you downloaded, replace the lens.lua script with this one:

lens.lua
Code: [Select]
-- Manual Lens Information
-- Supplies lens information for manual lenses
-- Whenever there is a non-chipped lens detected, we prompt the user to select the attached manual lens from a list

require("ui")
require("config")
require("xmp")

lenses =
{
    { name = "Rokinon 14mm", focal_length = 14, manual_aperture = 2.8},
}

selector_instance = selector.create("Select Manual Lens", lenses, function(l) return l.name end, 600)

lens_config = config.create({})

if lens_config.data ~= nil and lens_config.data.name ~= nil then
    for i,v in ipairs(lenses) do
        if v.name == lens_config.data.name then
            selector_instance.index = i
            break
        end
    end
end

xmp:add_property(xmp.lens_name, function() return lens.name end)
xmp:add_property(xmp.focal_length, function() return lens.focal_length end)
xmp:add_property(xmp.aperture, function() return math.floor(camera.aperture.value * 10) end)

function property.LENS_NAME:handler(value)
    if lens.is_chipped == false then
        task.create(select_lens)
    else
        if selector_instance ~= nil then
            selector_instance.cancel = true
        end
        xmp:stop()
    end
end

function select_lens()
    if #lenses > 1 then
        local menu_already_open = menu.visible
        if not menu_already_open then
            menu.open()
            display.rect(0, 0, display.width, display.height, COLOR.BLACK, COLOR.BLACK)
        end
        if selector_instance:select() then
            update_lens()
        end
        if not menu_already_open then
            menu.close()
        end
    elseif #lenses == 1 then
        update_lens()
    end
end

function update_lens()
    for k,v in pairs(lenses[selector_instance.index]) do
        lens[k] = v
    end
    lens_config.data = { name = lenses[selector_instance.index].name }
    xmp:start()
end

lens_menu = menu.new
{
    parent = "Lens Info Prefs",
    name = "Manual Lens",
    help = "Info to use for attached non-chipped lens",
    icon_type = ICON_TYPE.ACTION,
    select = function()
        if lens.is_chipped == false then
            task.create(select_lens)
        end
    end,
    rinfo = function()
        return lens.name
    end,
    warning = function()
        if lens.is_chipped then
            return "Chipped lens is attached"
        end
    end
}

if lens.is_chipped == false then
    task.create(select_lens)
end

There is only one choice so the lens selection menu doesn't even come up--kind of a neat feature if you're only using that one manual lens.

Did you get an .xmp "sidecar" file? Yes? Good, now in your user Camera Raw Lens Profile 1.0 library, don't touch pscache.dat--put in this lens profile:

Canon (Rokinon 14mm f2.8 ED AS IF UMC) - RAW.lcp
Code: [Select]
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c011 79.156380, 2014/05/21-23:38:37        ">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
    xmlns:stCamera="http://ns.adobe.com/photoshop/1.0/camera-profile">
   <photoshop:CameraProfiles>
    <rdf:Seq>
     <rdf:li>
      <rdf:Description
       stCamera:Author="Adobe (www.adobe.com)"
       stCamera:Make="Canon"
       stCamera:Model="Canon EOS-1Ds Mark III"
       stCamera:UniqueCameraModel="Canon EOS-1Ds Mark III"
       stCamera:CameraRawProfile="True"
       stCamera:CameraPrettyName="Canon EOS-1Ds Mark III"
       stCamera:Lens="Rokinon 14mm"       
       stCamera:LensPrettyName="Rokinon 14mm f/2.8 ED AS IF UMC"
       stCamera:ProfileName="Adobe (Rokinon 14mm f/2.8 ED AS IF UMC, Canon)"
       stCamera:SensorFormatFactor="1"
       stCamera:ImageWidth="5640"
       stCamera:ImageLength="3752"
       stCamera:FocusDistance="1.082921">
      <stCamera:PerspectiveModel
       stCamera:Version="2"
       stCamera:FocalLengthX="0.399824"
       stCamera:FocalLengthY="0.399824"
       stCamera:ImageXCenter="0.495736"
       stCamera:ImageYCenter="0.495205"
       stCamera:ResidualMeanError="0.001928"
       stCamera:ResidualStandardDeviation="0.004525"
       stCamera:RadialDistortParam1="-0.095549"
       stCamera:RadialDistortParam2="0.041922"
       stCamera:RadialDistortParam3="-0.005911"/>
      </rdf:Description>
     </rdf:li>
     <rdf:li>
      <rdf:Description
       stCamera:Author="Adobe (www.adobe.com)"
       stCamera:Make="Canon"
       stCamera:Model="Canon EOS-1Ds Mark III"
       stCamera:UniqueCameraModel="Canon EOS-1Ds Mark III"
       stCamera:CameraRawProfile="True"
       stCamera:CameraPrettyName="Canon EOS-1Ds Mark III"
       stCamera:Lens="Rokinon 14mm"
       stCamera:LensPrettyName="Rokinon 14mm f/2.8 ED AS IF UMC"
       stCamera:ProfileName="Adobe (Rokinon 14mm f/2.8 ED AS IF UMC, Canon)"
       stCamera:SensorFormatFactor="1"
       stCamera:ImageWidth="5640"
       stCamera:ImageLength="3752"
       stCamera:FocusDistance="3"
       stCamera:ApertureValue="6">
      <stCamera:PerspectiveModel>
       <rdf:Description
        stCamera:Version="2"
        stCamera:FocalLengthX="0.399824"
        stCamera:FocalLengthY="0.399824"
        stCamera:ImageXCenter="0.495736"
        stCamera:ImageYCenter="0.495205"
        stCamera:RadialDistortParam1="-0.095549"
        stCamera:RadialDistortParam2="0.041922"
        stCamera:RadialDistortParam3="-0.005911">
       <stCamera:VignetteModel
        stCamera:FocalLengthX="0.399824"
        stCamera:FocalLengthY="0.399824"
        stCamera:VignetteModelParam1="-0.387264"
        stCamera:VignetteModelParam2="0.150392"
        stCamera:VignetteModelParam3="-0.042729"/>
       </rdf:Description>
      </stCamera:PerspectiveModel>
      </rdf:Description>
     </rdf:li>
    </rdf:Seq>
   </photoshop:CameraProfiles>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>

If you're using Windows you'll have to search for the location where this is stored -- please report back.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102