Create highly interactive and optimized WebGL and WebXR experiences inside Blender that run using Needle Engine and three.js.
You'll be able to sequence animations, easily lightmap your scenes, add interactivity or create your own scripts written in Typescript or Javascript that run on the web.
All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
world
the scene world can be set to a color.world
the scene world color alpha channel will be exported. This allows for fully- or semi-transparent rendering in the browser where the 3D scene can be blended with HTML content or CSS styling in the background.Help/Needle/Download Samples
and addon preferencesSetActiveOnClick
and ChangeMaterialOnClick
.wav
files in AudioSourceplay()
function so it can be called from a Button component: Button.onClick → select AnimatorController and play(<state-name>)
functionclickBackgroundToFitScene
exposedcreateQRCodeButton
option stopped workingHelp/Needle/Log
Show Needle Logo in Menu
)_myFloat
)autofit
is enabledneedlePlugin(command, config, { openBrowser: true })
in the vite template to automatically open the browser's network address instead of localhost. This makes it easily possible to test your application on e.g. phones or XR headsets in the same local networkXRRig
componentRun Server
did start server twiceanimator.setBool
, setTrigger
and toggleBool
from Blender without having to write codeWebXRPlaneTracking
componentNEEDLE_LightmapUV
) and apply the transformed data to the UVs. For this to work no mesh instances must be used.auto
option again (instead of forced JPEG) because this broke lightmap at runtime where the alpha channel was usedHelp
PlayableDirector.wrapMode
optionFile/Export
Needle Object
panel to mark a camera as "MainCamera" - this should be done in scenes with multiple cameras--needle-project-path
CLI argument to directly open web scene and start the server when starting blender from the commandlineBOUNDS
are now also not visible in web projectKHR_animation_2
animations as standard gltf animation for translation, rotation and scalePreview
in HTML workflow now also re-exports the current sceneOpen Directory
button for HTML workflowInstall project
while installation is already running which caused Blender to crash in some casespackage.json
in non-existing projectThis update requires Needle Engine 3.16.0-beta or newer
useGzip
and usePhysics
option on Needle Engine panelOrbitControls
to camera if no camera component is used in scene or explictly configuredSceneSwitcher
component for referencing and exporting multiple blender scenes and switching between them at runtimebackgroundColor
exportUse Instancing
in the Needle Material Settings panel). In the browser you can check if an object is being rendered using instancing by adding ?debuginstancing
to your url.Create New Component
button to easily create a new typescript component from blender (a panel will be generated and updated automatically when editing the typescript class)camera-controls
attribute from project template, OrbitControls should be explictly added in Blenderlightmapped
option is now not disabled anymore if the object does not have a material yet since the lightmapper will create one default lightmap material (per scene) in this case and assign itneedle.install
camera-controls
enabled on the web component which adds OrbitControls
by defaultnpm install
)skipLibCheck: true
to tsconfig.jsonAssetReference
types in typescript components with which scenes can be referenced in blender. They will automatically be exported as separate glb files and can be loaded at runtime when needed (requires Blender 3.3.x)This extension requests the following permissions:
Create and manage web projects on disc
Access the internet and local server
This extension looks to be sending analytics over the internet.
No internet connections should be made when Blender's online access option is disabled.
Even in this case though, I think we might want to only support this if it's opt-in. I'll check with other moderators.
See: https://developer.blender.org/docs/handbook/addons/guidelines/
Each version uploaded here has its own Changelog. Please only include updates from latest version in versions changelog, not the entire history
From checking the code:
This add-on uses eval()
/ exec()
which are potentially insecure
when input is not completely under the developers control
(when values from a blend-file are included for example).
Where possible, these functions should be avoided:
getattr(data, attr)
& setattr(data, attr, value)
can be used as an alternative.pickle
module or JSON should be used instead.ast
module (ast.pare
& ast.literal_eval
).This script operates on all bpy.data.objects
,
meaning it will operate on objects in other scenes.
Unless there are reasons to do otherwise context.scene.objects
should be used
to prevent operators from editing data in scenes which aren't currently active.
Ref: gather_asset_hook
.
exec_command
uses error prone quoting, it should take a sequence (list/tuple) of arguments. This removes the need for pathToBlenderPython = "\"" + pathToBlenderPython + "\""
which will fail if the path contains quotes.
Use of sys.executable
should forward Blender's environment.
Calling a python sub-process should typically pass in bpy.app.python_args
immediately after the Python command. For example::
subprocess.check_call([sys.executable, *bpy.app.python_args, path_to_script])
This ensures the Python environment is compatible with Blender's.
Failure to do so can cause Python not to start as environment variables such as
PYTHON_PATH
may point to incompatible Python versions on the users system.
NOTE: this requires Blender 4.2.1 or newer. For 4.2.0 the literal "-I" may be passed to ensure an isolated Python environment.
Hey everyone,
Just a heads-up about a recent change regarding the licensing of add-ons on the Blender extension platform. Moving forward, all add-ons will need to be released under the GNU/GPL 3.0 license (SPDX:GPL-3.0-or-later). This is mainly to keep things simple and consistent across the board.
Previously, we accepted various licenses as long as they were compatible with Blender’s distribution. However, to avoid any confusion and streamline the process, all add-ons using the bpy API should now be presented as GPL 3 (the same license the Blender bundle is distributed). Regardless of whether the original code was under GPL 2, or something else like MIT or ZLIB.
Existing add-ons versions won't be affected. However, new updates will need to comply to the revised requirements.
Thanks for understanding, and feel free to reach out if you have any questions.
Sign in to comment.
Ready for review