Blender web plugin #17489

Closed
opened 2008-08-17 15:07:54 +02:00 by Enrico Fracasso · 3 comments

%%%Hi,

this patch enables the compilation of the web plugin on linux platform only (I saw some interest on dev mailing list, so I released it).
The plugin compiles (using cmake) but it doesn't work (see details below).

WARNING: the web plugin can freeze your browser!

In order to build the web plugin, you need the Mozilla SDK, available at http://developer.mozilla.org/en/docs/Gecko_SDK
The patch enables all logging statement I've found and adds some new (if you want I can "clean" it); he writes debugging information both on /tmp/plugin_log and on console. Besides logging and build scripts, the actual change is rather small.

I made the following changes to the build scripts:

  • created WITH_WEBPLUGIN option in order to enable/disable plugin compilation (enabled by default)
  • created MOZILLA_DIR variable to point to the Mozilla SDK location (default to ../gecko-sdk)
  • plugin is created as webplugin/blender_plugin.so

In order to apply the patch, please pass the -p1 option to GNU patch and do a
"cp ./source/gameengine/GamePlayer/common/load.blend ./source/gameengine/GamePlayer/common/main.blend"
(I'm using git, and git-diff can't make a working (GNU) binary patch, sorry).

I've used source/gameengine/GamePlayer/netscape/test/resource/test.html as test page (you need to change the path of the blend files inside the html file in order to match your absolute path)

This patch is not complete at all, they're the following problems:

  • the web plugin doesn't work (and lock the browser) because there's a double lock on PR_Lock (there's a double call to PLA_acquire_gl_context@PLG_X11_windowing.c from KX_KetsjiEngine::Render@KX_KetsjiEngine.cpp; if you comment out the rendering section (applying the second patch attached) the plugin can write a simple banner (so it's correctly loaded by the browser), but it can't load the animation
  • I've skipped the loading of the "loading animation" (the "loading animation" is played when the main animation is still downloading)
  • the "loading" animation and the main animation must have different names and their paths must be absolute.
  • I've to comment out the following line because it was always blocking (but the file is loaded correctly)
if (k->loading_anim->type != BLENFILETYPE_PUB) return false;

If you remove the PR_Lock(gl_lock) on function PLA_acquire_gl_context@PLG_X11_windowing.c (line 513) firefox segfault with the attached stacktrace (so the lock is really needed or there's a more deep problem)

My dev environment is FF3, Ubuntu x64 but I've tested it on FF2 x86 too.

Bye
Enrico%%%

%%%Hi, this patch enables the compilation of the web plugin on linux platform only (I saw some interest on dev mailing list, so I released it). The plugin compiles (using cmake) but it doesn't work (see details below). WARNING: the web plugin can freeze your browser! In order to build the web plugin, you need the Mozilla SDK, available at http://developer.mozilla.org/en/docs/Gecko_SDK The patch enables all logging statement I've found and adds some new (if you want I can "clean" it); he writes debugging information both on /tmp/plugin_log and on console. Besides logging and build scripts, the actual change is rather small. I made the following changes to the build scripts: * created WITH_WEBPLUGIN option in order to enable/disable plugin compilation (enabled by default) * created MOZILLA_DIR variable to point to the Mozilla SDK location (default to ../gecko-sdk) * plugin is created as webplugin/blender_plugin.so In order to apply the patch, please pass the -p1 option to GNU patch and do a "cp ./source/gameengine/GamePlayer/common/load.blend ./source/gameengine/GamePlayer/common/main.blend" (I'm using git, and git-diff can't make a working (GNU) binary patch, sorry). I've used source/gameengine/GamePlayer/netscape/test/resource/test.html as test page (you need to change the path of the blend files inside the html file in order to match your absolute path) This patch is not complete at all, they're the following problems: * the web plugin doesn't work (and lock the browser) because there's a double lock on PR_Lock (there's a double call to PLA_acquire_gl_context@PLG_X11_windowing.c from KX_KetsjiEngine::Render@KX_KetsjiEngine.cpp; if you comment out the rendering section (applying the second patch attached) the plugin can write a simple banner (so it's correctly loaded by the browser), but it can't load the animation * I've skipped the loading of the "loading animation" (the "loading animation" is played when the main animation is still downloading) * the "loading" animation and the main animation must have different names and their paths must be absolute. * I've to comment out the following line because it was always blocking (but the file is loaded correctly) ``` if (k->loading_anim->type != BLENFILETYPE_PUB) return false; ``` If you remove the PR_Lock(gl_lock) on function PLA_acquire_gl_context@PLG_X11_windowing.c (line 513) firefox segfault with the attached stacktrace (so the lock is really needed or there's a more deep problem) My dev environment is FF3, Ubuntu x64 but I've tested it on FF2 x86 too. Bye Enrico%%%

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Enrico: you have svn access, and we've defined you can just work on trunk for plugin, since there's no other maintanance nor support anyway!%%%

%%%Enrico: you have svn access, and we've defined you can just work on trunk for plugin, since there's no other maintanance nor support anyway!%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#17489
No description provided.