{"id":73765,"date":"2026-06-15T12:42:10","date_gmt":"2026-06-15T19:42:10","guid":{"rendered":"https:\/\/www.dragonframe.com\/?post_type=ufaq&#038;p=73765"},"modified":"2026-06-18T14:48:01","modified_gmt":"2026-06-18T21:48:01","slug":"python-integration","status":"publish","type":"ufaq","link":"https:\/\/www.dragonframe.com\/es\/ufaqs\/python-integration\/","title":{"rendered":"Integraci\u00f3n de Python"},"content":{"rendered":"<style>.ewd-ufaq-faq-header-title a { padding: 10px 0 !important; }div.ewd-ufaq-faq-title h5 { color: #e7e7e7 !important; }div.ewd-ufaq-faq-title h5 { padding: 10px 0 !important; }div.ewd-ufaq-faq-post p { color: #e3e3e3 !important; }div.ewd-ufaq-faq-post p { padding: 11px 0 !important; }div.ewd-ufaq-faq-category-title h4 { font-size: 32px !important; }.ewd-ufaq-faq-display-style-block:hover, .ewd-ufaq-faq-display-style-block:hover a, .ewd-ufaq-faq-display-style-block:hover h1, .ewd-ufaq-faq-display-style-block:hover h2, .ewd-ufaq-faq-display-style-block:hover h3, .ewd-ufaq-faq-display-style-block:hover h4, .ewd-ufaq-faq-display-style-block:hover h5, .ewd-ufaq-faq-display-style-block:hover h6 {\r\n    text-decoration: none !important;\r\n    color: #fff;\r\n    background: #3a515e;\r\n}\r\n.ui-autocomplete {\r\nbackground:#3e3e3e;\r\n}\r\n\r\n.ufaq-faq-category-title {\r\nmargin-top:20px;\r\n}\r\n\r\ndiv.ufaq-faq-title h4 {\r\nfont-size:18px;\r\n}\r\n\r\ndiv.ufaq-faq-post h4 {\r\nfont-size:20px;\r\nmargin-bottom:5px;\r\nmargin-top:5px;\r\n}\r\n\r\ndiv.ufaq-faq-post h5 {\r\nfont-size:18px;\r\nmargin-bottom:12px;\r\nmargin-top:0;\r\n}\r\n\r\ndiv.ufaq-faq-title div.ewd-ufaq-post-margin-symbol {\r\npadding:6px 0 0 2px;\r\n}\r\n\r\n.ufaq-faq-display-style-Minimalist .ewd-ufaq-post-margin-symbol span {\r\nfont-size:19px;\r\n}\r\n.single-ufaq .ewd-ufaq-permalink {\r\ndisplay: none;\r\n}\r\n\r\n.single-ufaq .single-navigation {\r\ndisplay: none;\r\n}\r\n\r\n.single-ufaq h2 {\r\n margin-bottom: 20px;\r\n}\r\n.single-ufaq .ewd-ufaq-faq-title {\r\n display: none;\r\n}\r\n.single-ufaq .entry-date {\r\n display: none;\r\n}\r\n.single-ufaq #primary {\r\n margin-left: auto;\r\n margin-right: auto;\r\n margin-top: 80px;\r\n float: none;\r\n}\r\n.ewd-ufaq-faq-post a {\r\n    color: #d89222 !important;\r\n}<\/style><div  class=\"ewd-ufaq-faq-list ewd-ufaq-page-type-load_more ewd-ufaq-category-tabs-\" id='ewd-ufaq-faq-list'>\n\n\t<input type='hidden' name='show_on_load' value='' id='ewd-ufaq-show-on-load' \/>\n<input type='hidden' name='include_category' value='' id='ewd-ufaq-include-category' \/>\n<input type='hidden' name='exclude_category' value='' id='ewd-ufaq-exclude-category' \/>\n<input type='hidden' name='orderby' value='set_order' id='ewd-ufaq-orderby' \/>\n<input type='hidden' name='order' value='asc' id='ewd-ufaq-order' \/>\n<input type='hidden' name='post_count' value='-1' id='ewd-ufaq-post-count' \/>\n<input type='hidden' name='current_url' value='\/es\/wp-json\/wp\/v2\/ufaq\/73765' id='ewd-ufaq-current-url' \/>\n\t\n\t\n\t<div class='ewd-ufaq-faqs'>\n\n\t\t<div  class=\"ewd-ufaq-faq-div ewd-ufaq-faq-column-count-one ewd-ufaq-faq-responsive-columns- ewd-ufaq-faq-display-style-block ewd-ufaq-can-be-toggled\" id='ewd-ufaq-post-73765-eBrQOeNdfK' data-post_id='73765'>\n\n\t\t\n\t<div class='ewd-ufaq-faq-title ewd-ufaq-faq-toggle'>\n\t\n\t<a class='ewd-ufaq-post-margin'  href='#' role=\"button\">\n\n\t\t<div class='ewd-ufaq-post-margin-symbol ewd-ufaq-square' data-no-translation=\"\">\n\t\t\t<span >B<\/span>\n\t\t<\/div>\n\n\t\t<div class='ewd-ufaq-faq-title-text'>\n\n\t\t\t<h5>\n\t\t\t\tIntegraci\u00f3n de Python\t\t\t<\/h5>\n\n\t\t<\/div>\n\n\t\t<div class='ewd-ufaq-clear'><\/div>\n\n\t<\/a>\n\t\n<\/div>\n\t\n\t<div class='ewd-ufaq-faq-body' >\n\n\t\t\n\t\t\t\n\t\t\n\t\t\t<div class='ewd-ufaq-post-margin ewd-ufaq-faq-post'>\n\t\n<p class=\"wp-block-paragraph\">A partir de Dragonframe 2027 (actualmente en desarrollo), Dragonframe es compatible con Python + PySide (hasta Qt 6.11).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Despu\u00e9s de instalar el <a href=\"\/es\/dev\/\">Versi\u00f3n de desarrollo 2027.01<\/a>, crea un archivo de inicializaci\u00f3n de Python en ~\/Dragonframe\/scripts\/__init__.py<br>Tambi\u00e9n puede establecer una variable de entorno, DRAGONFRAME_PATH, con una lista de rutas separadas por dos puntos a los directorios de m\u00f3dulos de Python.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Por el momento, la interfaz est\u00e1 en fase de desarrollo. Podr\u00eda sufrir cambios antes del lanzamiento final.<br>Tenga en cuenta que todas las funciones deben llamarse \u00fanicamente desde el hilo principal, con la excepci\u00f3n de util.executeInMainThread y util.executeInMainThreadWithResult.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Estos son los m\u00f3dulos y m\u00e9todos disponibles:<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code>=== dragonframe.ui ===\n\nMenu:\nMembers:\n\n  FileMenu : The File menu.\n\n  EditMenu : The Edit menu.\n\n  ViewMenu : The View menu.\n\n  SceneMenu : The Scene menu.\n\n  CaptureMenu : The Capture menu.\n\n  PlaybackMenu : The Playback menu.\n\n  WindowMenu : The Window menu.\n\n  HelpMenu : The Help menu.\n\n  UserTopLevel1 : A top-level user menu.\n\n  UserTopLevel2 : A top-level user menu.\n\n  UserTopLevel3 : A top-level user menu.\n\n  CinematographyImageContextMenu : The right-click context menu on the cinematography image.\n\naddMenuOption:\naddMenuOption(arg0: dragonframe.ui.Menu, arg1: str, arg2: object) -&gt; None\n\nAdd a menu item to the specified menu.\n\n    location -- Menu value indicating which menu to add the item to\n    label    -- display text for the menu item\n    callback -- callable invoked with no arguments when the item is selected\n\n\naddMenuSeparator:\naddMenuSeparator(arg0: dragonframe.ui.Menu) -&gt; None\n\nAdd a separator line to the specified menu.\n\n    location -- Menu value indicating which menu to add the separator to\n\n\nisMenuOptionChecked:\nisMenuOptionChecked(arg0: dragonframe.ui.Menu, arg1: str) -&gt; bool\n\nReturns if a menu item is checked.\n\n    location -- Menu value indicating which menu to add the item to\n    label    -- display text for the menu item\n\n\nsetMenuOptionChecked:\nsetMenuOptionChecked(arg0: dragonframe.ui.Menu, arg1: str, arg2: bool) -&gt; None\n\nSets a menu item to be checkable and sets the current value.\n\n    location -- Menu value indicating which menu to add the item to\n    label    -- display text for the menu item\n    checked  -- whether the menu item is checked\n\n\nsetTopLevelMenuName:\nsetTopLevelMenuName(arg0: dragonframe.ui.Menu, arg1: str) -&gt; None\n\nSet the name of a user-defined top level menu.\n\n    location -- UserTopLevel1, UserTopLevel2, or UserTopLevel3\n    label    -- display text for the menu\n\n\n\n=== dragonframe.events ===\n\nEventType:\nMembers:\n\n  Shoot : A capture (shoot) has been initiated.\n\n  Delete : A frame has been deleted.\n\n  Position : The playhead position has changed.\n\n  CaptureComplete : A single exposure capture has completed.\n\n  FrameComplete : All exposures for the current frame have been captured.\n\n  TestComplete : A test shot capture has completed.\n\n  Edit : An edit operation has occurred.\n\n  AfterAssist : An assist operation has finished.\n\n  Exposure : The active exposure (pass) has changed.\n\n  Bash : A bash\/shell script event has fired.\n\n  Save : The scene has been saved.\n\n  NewTake : A new take has been created.\n\n  CaptureFailed : A capture attempt failed.\n\n  MocoDisconnected : The motion control rig has disconnected.\n\n  CameraDisconnected : The camera has disconnected.\n\nregisterInterest:\nregisterInterest(arg0: list&#091;dragonframe.events.EventType], arg1: object) -&gt; None\n\nRegister a callback to be invoked when any of the given EventType values occur.\n\n    types    -- list of EventType values to listen for\n    callback -- callable invoked with the EventType when the event fires\n\nExample::\n\n    def on_event(event_type):\n        print('event:', event_type)\n    dragonframe.events.registerInterest(\n        &#091;dragonframe.events.EventType.FrameComplete], on_event)\n\n\n=== dragonframe.scene ===\n\ncurrentExposure:\ncurrentExposure() -&gt; int\n\nReturn the 1-based index of the currently active exposure (pass), or 0 if no scene is open.\n\n\ncurrentFrame:\ncurrentFrame() -&gt; int\n\nReturn the 1-based index of the currently selected frame, or 0 if no scene is open.\n\n\nexposureCount:\nexposureCount() -&gt; int\n\nReturn the number of exposures (passes) defined in the current scene, or 0 if no scene is open.\n\n\nexposureFolder:\nexposureFolder(arg0: int) -&gt; str\n\nReturn the absolute path to the capture folder for the given exposure.\n\n    exposure -- 1-based exposure (pass) index\n\nReturns an empty string if no scene is open.\n\n\nexposureFramePrefix:\nexposureFramePrefix(arg0: int) -&gt; str\n\nReturn the file name prefix used for captured frames of the given exposure.\n\n    exp -- 1-based exposure index\n\nReturns an empty string if no scene is open.\n\n\nexposureName:\nexposureName(arg0: int) -&gt; str\n\nReturn the display name of the given exposure (pass).\n\n    exp -- 1-based exposure index\n\nReturns an empty string if no scene is open.\n\n\nfeedFolder:\nfeedFolder() -&gt; str\n\nReturn the absolute path to the live-view feed folder, or an empty string if no scene is open.\n\n\nhighResFile:\nhighResFile(arg0: int, arg1: int, arg2: bool) -&gt; str\n\nReturn the file path of the captured image for a given frame and exposure.\n\n    vframe   -- 1-based virtual frame number\n    exposure -- 1-based exposure (pass) index\n    raw      -- if True, return the path to the raw file instead of the processed image\n\n\nimportAxisSetup:\nimportAxisSetup(arg0: str) -&gt; None\n\nImport a motion control axis setup file.\n\n    fileName -- absolute path to the .dfscene file\n\n\nloadMediaIntoReferences:\nloadMediaIntoReferences(arg0: list&#091;str]) -&gt; None\n\nLoad images into the references folder.\n\n\n\n\nloadMediaIntoTestShots:\nloadMediaIntoTestShots(arg0: list&#091;str]) -&gt; None\n\nLoad images into the test shots folder.\n\n\n\n\nloadReferenceLayerImage:\nloadReferenceLayerImage(arg0: str) -&gt; bool\n\nLoad a still image as the active reference layer.\n\n    fileName -- absolute path to the image file\n\n\nloadReferenceLayerImageSequence:\nloadReferenceLayerImageSequence(arg0: str) -&gt; bool\n\nLoad an image sequence as the active reference layer.\n\n    fileName -- absolute path to the first frame of the image sequence\n\n\nloadReferenceLayerMovie:\nloadReferenceLayerMovie(arg0: str) -&gt; bool\n\nLoad a movie file as the active reference layer.\n\n    fileName -- absolute path to the movie file\n\n\nloadReferenceLayerScene:\nloadReferenceLayerScene(arg0: str) -&gt; bool\n\nLoad another Dragonframe scene as the active reference layer.\n\n    fileName -- absolute path to the .dfscene file\n\n\nname:\nname() -&gt; str\n\nReturn the full name of the open scene, or an empty string if no scene is open.\n\n\nnamePrefix:\nnamePrefix() -&gt; str\n\nReturn the name prefix used when constructing frame file names, or an empty string if no scene is open.\n\n\nsave:\nsave() -&gt; None\n\nSave the current scene to disk. Has no effect if no scene is open.\n\n\nsceneFolder:\nsceneFolder() -&gt; str\n\nReturn the absolute path to the scene folder, or an empty string if no scene is open.\n\n\nsceneName:\nsceneName() -&gt; str\n\nReturn the scene number\/identifier portion of the scene name, or an empty string if no scene is open.\n\n\nsetCurrentExposure:\nsetCurrentExposure(arg0: int) -&gt; None\n\nSet the currently active exposure (pass).\n\n    exp -- 1-based exposure index\n\nHas no effect if no scene is open.\n\n\nsetCurrentFrame:\nsetCurrentFrame(arg0: int) -&gt; None\n\nSet the currently selected frame.\n\n    frame -- 1-based frame index\n\nHas no effect if no scene is open.\n\n\ntakeFile:\ntakeFile() -&gt; str\n\nReturn the absolute path to the scene data file (.dfscene), or an empty string if no scene is open.\n\n\ntakeFolder:\ntakeFolder() -&gt; str\n\nReturn the absolute path to the current take folder, or an empty string if no scene is open.\n\n\ntakeName:\ntakeName() -&gt; str\n\nReturn the take number\/identifier portion of the scene name, or an empty string if no scene is open.\n\n\ntestRefsFolder:\ntestRefsFolder() -&gt; str\n\nReturn the absolute path to the test reference images folder, or an empty string if no scene is open.\n\n\ntestShotsFolder:\ntestShotsFolder() -&gt; str\n\nReturn the absolute path to the test shots folder, or an empty string if no scene is open.\n\n\n=== dragonframe.util ===\n\nexecuteInMainThread:\nexecuteInMainThread(call: object, args: object = (), kwargs: dict = {}) -&gt; None\n\nExecutes a call on the main thread.\n\n\nexecuteInMainThreadWithResult:\nexecuteInMainThreadWithResult(call: object, args: object = (), kwargs: dict = {}) -&gt; object\n\nExecutes a call on the main thread, waiting for the result.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Y aqu\u00ed ten\u00e9is un ejemplo de archivo __init__.py:<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code>print(\"Initializing Dragonframe python\")\n\nfrom dragonframe import ui\nfrom dragonframe import events\nfrom dragonframe import scene\n\ndef print_module_docs(mod):\n    name = getattr(mod, '__name__', str(mod))\n    print(f\"\\n=== {name} ===\")\n    for attr in sorted(dir(mod)):\n        if attr.startswith('_'):\n            continue\n        obj = getattr(mod, attr)\n        doc = getattr(obj, '__doc__', None)\n        if doc:\n            print(f\"\\n{attr}:\\n{doc}\")\n\nprint_module_docs(ui)\nprint_module_docs(events)\nprint_module_docs(scene)\n\nfrom PySide6.QtWidgets import (QFileDialog)\n\ndef get_media(user_data: dict):\n    print(\"get_media\")\n    print(f\"Scene Name {scene.name()} {scene.sceneName()} {scene.takeName()}\")\n    fileNames, _ = QFileDialog.getOpenFileNames(None, \"Get Media\",\n                                              \"Test Python\",\n                                              \"All Files (*);;Media Files (*.jpg,*.png,*.tiff,*.crw)\", \"\")\n    if fileNames:\n        print(f\"Chosen files {fileNames}\")\n        scene.loadMediaIntoReferences(fileNames);\n\ndef load_reference_image(user_data: dict):\n    print(\"load_reference_image\")\n    print(f\"Scene Name {scene.name()} {scene.sceneName()} {scene.takeName()}\")\n    fileName, _ = QFileDialog.getOpenFileName(None, \"Load Reference Image\",\n                                              \"Test Python\",\n                                              \"All Files (*);;Image Files (*.jpg,*.png,*.tiff,*.crw)\", \"\")\n    if fileName:\n        print(f\"Chosen file {fileName}\")\n        scene.loadReferenceLayerImage(fileName);\n\ndef launch_image(user_data: dict):\n    print(\"Launch image! \")\n    print(\"Exposure: \" + str(user_data&#091;\"exposure\"]))\n    frameList = user_data&#091;\"frames\"];\n    for frame in frameList:\n        fileName = scene.highResFile(frame, user_data&#091;\"exposure\"], False)\n        rawFileName = scene.highResFile(frame, user_data&#091;\"exposure\"], True)\n        print(f\"FRAME: {frame}, File {fileName}, Raw {rawFileName}\");\n\nui.addMenuSeparator(ui.Menu.FileMenu);\nui.addMenuOption(ui.Menu.FileMenu, \"Company|Load Reference Image\", load_reference_image);\n\nui.addMenuOption(ui.Menu.CinematographyImageContextMenu, \"My Launcher\", launch_image);\nui.addMenuOption(ui.Menu.CinematographyImageContextMenu, \"Import to References\", get_media);\n\ndef handle_shoot(user_data: dict):\n    print(\"Shooting! \" + str(user_data&#091;\"frame\"]) + \" \" + str(user_data&#091;\"exposure\"]));\n\ndef handle_position(user_data: dict):\n    print(\"POSITION: \" + str(user_data&#091;\"frame\"]) + \" \" + str(user_data&#091;\"exposure\"]));\n\ndef handle_cc(user_data: dict):\n    print(\"CC: \" + str(user_data&#091;\"frame\"]) + \" \" + str(user_data&#091;\"exposure\"]));\n\n\nevents.registerInterest(&#091;events.EventType.Shoot], handle_shoot);\nevents.registerInterest(&#091;events.EventType.Position], handle_position);\nevents.registerInterest(&#091;events.EventType.CaptureComplete], handle_cc);<\/code><\/pre>\n<\/div>\n\t\t\n\t\t\t<div class='ewd-ufaq-faq-custom-fields'>\n\n\t\n<\/div>\n\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t\t<div class='ewd-ufaq-permalink'>\n\t\n\t<a href='https:\/\/www.dragonframe.com\/es\/ufaqs\/python-integration\/'>\n\t\t\n\t\tEnlace permanente\t\t\t\n\t<\/a>\n\n<\/div>\n\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n\t<\/div>\n\n<\/div>\n\t<\/div>\n\n\t\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Integraci\u00f3n con Python A partir de Dragonframe 2027 (actualmente en desarrollo), Dragonframe admite Python + PySide (hasta Qt 6.11). Despu\u00e9s de instalar la compilaci\u00f3n de desarrollo 2027.01, cree un archivo de inicializaci\u00f3n de Python en ~\/Dragonframe\/scripts\/__init__.py. Tambi\u00e9n puede configurar una variable de entorno, DRAGONFRAME_PATH, con una lista de rutas separadas por dos puntos a los directorios de m\u00f3dulos de Python. Por el momento, la interfaz es solo\u2026 <a title=\"Integraci\u00f3n de Python\" class=\"read-more\" href=\"https:\/\/www.dragonframe.com\/es\/ufaqs\/python-integration\/\" aria-label=\"Leer m\u00e1s sobre integraci\u00f3n de Python\">Leer m\u00e1s<\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","ufaq-category":[417],"ufaq-tag":[],"class_list":["post-73765","ufaq","type-ufaq","status-publish","hentry","ufaq-category-scripting","no-featured-image-padding"],"_links":{"self":[{"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/ufaq\/73765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/ufaq"}],"about":[{"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/types\/ufaq"}],"author":[{"embeddable":true,"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/comments?post=73765"}],"wp:attachment":[{"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/media?parent=73765"}],"wp:term":[{"taxonomy":"ufaq-category","embeddable":true,"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/ufaq-category?post=73765"},{"taxonomy":"ufaq-tag","embeddable":true,"href":"https:\/\/www.dragonframe.com\/es\/wp-json\/wp\/v2\/ufaq-tag?post=73765"}],"curies":[{"name":"palabra clave","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}