Announcement

Collapse
No announcement yet.

How do you get auto completion and stuff?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    The stub file should go into your project folder, as Intermediate/PythonStub/unreal.py.

    Comment


      #17
      Originally posted by Jamie Dale View Post
      The stub file should go into your project folder, as Intermediate/PythonStub/unreal.py.

      I deleted the file Intermediate/PythonStub/unreal.py and restarted the engine. I get the file generated but it is only 35Kb as the one obtained by vito0719.
      If I understand correctly it should be much bigger, right?
      I am using UE 4.21.1. Could I have something wrong with my setup?
      Attached Files

      Comment


        #18
        I managed to get autocomplete in Pycharm a while ago but as the others, i only have a 35kb file with 1000 lines of code.
        This seems to only contains the Native types of the python API...

        Also tried in a blank project to enable each and every one plugin...still the same 35kb file
        4.21.1
        Last edited by dschertenleib; 01-18-2019, 03:19 PM.

        Comment


          #19
          It seems that this was accidentally broken when making some changes to the API export logic. It had been set-up so that the glue code was only exported into the stub when we were generating API documentation. I've fixed this in CL# 4757354 (for 4.22).

          Comment


            #20
            great news!

            Comment


              #21
              Originally posted by Jamie Dale View Post
              It seems that this was accidentally broken when making some changes to the API export logic. It had been set-up so that the glue code was only exported into the stub when we were generating API documentation. I've fixed this in CL# 4757354 (for 4.22).
              I am glad that the cause was found, thanks for your help.
              While we are waiting for the update in the 4.22 could you please share a full unreal.py stub so that we can make some use of the autocomplete functions (with all the limitations of the case)?

              Comment


                #22
                Sure, you can find a generated version here: https://drive.google.com/file/d/1RlG...ew?usp=sharing

                It is worth noting though that it's only broken when not generating API docs, so you can still run the doc gen commandlet yourself and you'll get a stub file that's correct for your project (you can stop it once you see the "...generated: Bla/Bla/Intermediate/PythonStub/unreal.py" line).

                Code:
                YourProject -run=PythonOnlineDocs -IncludeEngine -IncludeProject

                Comment


                  #23
                  Thanks Jamie.
                  We managed to build the stub.
                  I add a note: the stub is re-generated when you open the editor and when you build C++ code so you have to open the editor first, let it generate the stub, launch the commandlet and save the complete generated stub to prevent it being overwritten and lose the auto-complete in your editor.
                  I managed to launch the commandlet with this command in an external terminal with the Unreal editor opened:
                  Code:
                  C:\Program Files\Epic Games\UE_4.21\Engine\Binaries\Win64\UE4Editor-Cmd.exe path_to_/YourProject.uproject -run=PythonOnlineDocs -IncludeEngine -IncludeProject
                  Last edited by luca.15; 01-23-2019, 04:21 AM.

                  Comment


                    #24
                    Originally posted by Jamie Dale View Post
                    luca.15 Are they actually missing from the unreal.py stub file, or is the file too big for your IDE to handle? I had to up the parsing limit in PyCharm quite a bit for it to parse that file, and I don't know whether other IDEs have similar restrictions.
                    (see Engine\Plugins\Experimental\PythonScriptPlugin\SphinxDocs\PythonAPI_docs_readme.txt for information on how to do that). That will also generate a local set of docs from that stub file.
                    Do you have a quick tip in how you upped this parsing limit?

                    Comment

                    Working...
                    X