Jump to content

Josh

Staff
  • Posts

    26,680
  • Joined

  • Last visited

About Josh

Profile Information

  • Location
    USA

Recent Profile Visitors

1,526,391 profile views

Josh's Achievements

Grand Master

Grand Master (14/14)

  • Well Followed
  • Dedicated
  • Conversation Starter
  • Reacting Well
  • Problem Solver

Recent Badges

17.1k

Reputation

1.2k

Community Answers

  1. @Yue Do you recognize the problem? Visual Studio Code can also be used, but it's sort of the unofficial path. I'd prefer to make sure the built-in IDE is working for all users. If you open your project folder in Visual Studio Code, it's all set up to debug and run. You must install the Lua Debugger extension by dev-cat: https://marketplace.visualstudio.com/items?itemName=devCAT.lua-debug There is a setting called "Allow breakpoints everywhere" that must be enabled for the Lua debugger to work.
  2. Please try signing out of your account and back in again.
  3. It's going into an infinite loop...
  4. Damn, that is strange. What does the layout look like? Seems to be happening elsewhere... https://www.reddit.com/r/techsupport/comments/ppyww8/i_cant_use_curly_brackets_on_my_keyboard/
  5. This will call a Lua function from C++: https://www.leadwerks.com/learn/CallFunction?lang=cpp This will get the engine's Lua sol state: https://www.leadwerks.com/learn/GetLuaState?lang=cpp&nolua=1 And this page has a lot of examples showing how to expose C++ classes and functions: https://www.leadwerks.com/learn/Scripting?lang=cpp Sol2 is a VERY deep dive, but it does everything I have wanted to do.
  6. It feels great to be alive again!
  7. 5.0.1 beta In this build, the requirement for an environment variable is removed, and a Visual Studio property sheet is used instead, The rules for environment variables on Windows are unclear, and even if I spend a lot of time studying and testing them, they could change at some point in the future, or potentially act differently on some configation. Having information in three different places (project folder, install directory, env var) is confusing. If you have a shared project, and two different people have Leadwerks installed in different locations, you will need to remove the PropertySheet.props file from the repo. This is a slight inconvenience, but that's not as bad as having a magic variable hidden in the Windows settings. Existing C++ projects will not be affected by this. If you want to modify them, place this in a file called "PropertySheet.props", then "Add an existing property sheet" and include this in your project: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ImportGroup Label="PropertySheets" /> <PropertyGroup Label="UserMacros"> <LEADWERKS>C:/Program Files (x86)/Steam/steamapps/common/Leadwerks</LEADWERKS> </PropertyGroup> </Project>
  8. 5.0.1 beta The first build of version 5.0.1 is available on the beta branch. This revises brush picking so that brush faces of all sizes can be successfully picked in the editor. Only the editor is updated at this time. You must opt into the beta branch on Steam if you want to test this version before a new release goes out to the default branch. Right-click on the application in the Steam interface, select the Properties menu, and in the Betas section, select "Beta - Development branch for testing".
  9. My revision is available now on the beta branch, in version 5.0.1.
  10. Josh

    Suggestion

    I am adding brush->meshes in the next build of the CPP lib. This will give you access to the visual meshes that are built to represent a brush entity.
  11. Josh

    Suggestion

    The mesh class has access to the materials array: https://www.leadwerks.com/learn/Mesh?lang=cpp However, the raycasting on brushes does not use the subdivided mesh, it uses the simple brush shape. This provides the exact same result but is much faster. So the way to do this would be to perform the raycast, and then check the brush visual mesh or meshes to see what the closest vertex to the picked point is. Let me see how this would look...
  12. Crap, I am sorry about that. I am sending you a private message on this forum...
  13. If you place this script in "C:\Program Files (x86)\Steam\Steamapps\common\Leadwerks\Scripts\Start\CustomShortcuts.lua", this will provide you with one possible way of overriding shortcut keys that are generated dynancally. You can switch between the translate, rotate, and scale tools using T, R, and G. You can get to the folder faster by selecting the Scripting > Open Scripts Folder menu item. You could change this to match Blender's keys, if you want, but I did not because we use WASD for camera movement. Version 5.0.1 beta is required (it will go up today) for the textfield check to work. This will ignore key input when a textfield is selected. function Callback(event) if event.id == EVENT_KEYDOWN then if isfunction(program.ui.GetFocus) then --[[Requires 5.0.1 for this check to work]] local widget = program.ui:GetFocus() if widget ~= nil then if TextField(widget) then return end end end if event.data == KEY_T then local menu = program.menu:FindChild("Translate", true) if menu ~= nil then EmitEvent(EVENT_WIDGETACTION, menu) end elseif event.data == KEY_R then local menu = program.menu:FindChild("Rotate", true) if menu ~= nil then EmitEvent(EVENT_WIDGETACTION, menu) end elseif event.data == KEY_G then local menu = program.menu:FindChild("Scale", true) if menu ~= nil then EmitEvent(EVENT_WIDGETACTION, menu) end end end end ListenEvent(EVENT_KEYDOWN, program.window, Callback)
  14. That's a pretty good start!
  15. Right-client on the application in the Steam interface and select the Properties menu item. Make sure the DLC is installed (check the box): When the DLC is installed, the projection creation template will show C++ as one of the options for the language: This will allow programming with C++ and Visual Studio 2026: https://www.leadwerks.com/learn/Programming?lang=cpp
×
×
  • Create New...