Jump to content
Radu

Blender

Recommended Posts

Nearly a year ago (within this thread) i posted about a UE4 addon for blender .. even though there are afew out there and you can still get the job done without any addon, Im still on the look out one that suits my needs and without a load of dropdown menus and options i would never use.
So as they say "want something done right, do it yourself" and now racking my brains over blenders python coding  to try and do exactly that, taking everything in from the api doc's ect and interweb sources.
Very basic stuff so far but its a start, Iv only ever coded a simple popup menu for tools i mainly use but no need for that anymore with blenders recent quicktools menu built into 2.8 (which is brilliant).
Got the addon options and toolbar up and going but still so much to take in^^
 

B3dCoding_T1.jpg

Share this post


Link to post
Share on other sites

After a couple of days of looking at code i thought it may just be an easyer idea to try and just update the original UE4 addon but that turned out to be pretty frustraiting with API updates and understanding the style of the original creator, so was advised it would porbably be better to start from scratch..
So two weeks of constant looking at code and getting to grips with python im finally getting to where i want to be.

P1.PNG.fd453ccefcbc059376c6bccebb0f1701.PNG
Iv managed to create this little custom panel for exporting simple models to UE4 (still very much wip ovc)
-Selected objects name cane be changed within the panel
-When pivot to centre is chekecked, on export the model's pivot is centred
(which is 1 main reason i even wanted this addon because default fbx export causes you to manually move any objects to centre before exporting unless you want to keep blender's scene 1:1 which can also be done if unchecked)
-Exporting normals type's that are used within ue4
-Adding the custom export folder destination with quick and easy acces when shift+click on the folder icon
and ofcourse the export button that adds all the functions within..

Iv still to test more and add a mesh collision panel for also exporting collisions when checked..
Im no coder but learneing alot from this already.

Edited by +Rusty+

Share this post


Link to post
Share on other sites
22 hours ago, +Rusty+ said:

After a couple of days of looking at code i thought it may just be an easyer idea to try and just update the original UE4 addon but that turned out to be pretty frustraiting with API updates and understanding the style of the original creator, so was advised it would porbably be better to start from scratch..
So two weeks of constant looking at code and getting to grips with python im finally getting to where i want to be.

P1.PNG.fd453ccefcbc059376c6bccebb0f1701.PNG
Iv managed to create this little custom panel for exporting simple models to UE4 (still very much wip ovc)
-Selected objects name cane be changed within the panel
-When pivot to centre is chekecked, on export the model's pivot is centred
(which is 1 main reason i even wanted this addon because default fbx export causes you to manually move any objects to centre before exporting unless you want to keep blender's scene 1:1 which can also be done if unchecked)
-Exporting normals type's that are used within ue4
-Adding the custom export folder destination with quick and easy acces when shift+click on the folder icon
and ofcourse the export button that adds all the functions within..

Iv still to test more and add a mesh collision panel for also exporting collisions when checked..
Im no coder but learneing alot from this already.

Those are always the first plugins I install when I get a new 3d package :D I will try this if I go back to Blender at some point. Question: Does Pivot to Center mean, it places the pivot at the center of the object, or does it move the object to the origin before exporting? If it's the latter, maybe you could rename it to something like "Export Pivot Location" or "Move to Origin Before Export" to avoid confusion :) 

Share this post


Link to post
Share on other sites
Quote

Those are always the first plugins I install when I get a new 3d package :D I will try this if I go back to Blender at some point. Question: Does Pivot to Center mean, it places the pivot at the center of the object, or does it move the object to the origin before exporting? If it's the latter, maybe you could rename it to something like "Export Pivot Location" or "Move to Origin Before Export" to avoid confusion :)

Iv also added a descriptions to all the settings so when cursor hovers over them the description is show, but that is a great point!.

With the  vanilla fbx export,  if you were to have a model anywhere within blender when exporting the pivot is automatically centred as if transforms are automatically applyed but leave the mesh in the same position within blender and its pivot centred (which is ok if you want the positions of your models setup 1:1 with blender and keep the scene consistant.

Example: Exported each object as seen below and then within ue4 there pivots are centered without mesh

Vanilla_exmple.jpg.641ac7aba34efa54e0b8dc2a3a37a979.jpg

With my exporter (shown below in a gif) it will move exported mesh to center with pivot to keep the pivot and mesh correctly placed.

https://gifyu.com/image/WKRw

(sorry not the best compression with the gif) but here's after export in ue4 pivots are correct. Hope that makes sense @Minos

Piv_02.png.f6c2eef758fb01782023e06e438584fb.png

But i also do have an idea, when using the exporter script that when exporting it does the same (as above) but then returns it to original position within blender. Making things clear to anyone using the exporter is definetely a must, its still w.i.p and i do have plans to add some animation functions ohh and if anyone hasnt tryed the "asset manager addon" https://blendermarket.com/products/asset-management id also recommend it, really awsome tool for creating & building libraries.

 

Edited by +Rusty+

Share this post


Link to post
Share on other sites
Quote

Question: Does Pivot to Center mean, it places the pivot at the center of the object, or does it move the object to the origin before exporting?

To answer your question: no it doesnt mean the pivot will be centered to the object (probably always best to manually set ones pivot especially for modular stuff) so yeh it moves the object and pivot to the the center of the scene keeping the object and pivot's origin intact .. if that makes sense? but will defo be refining names and also scrip's layout for easyer readability. Winging it as i go^^

Edited by +Rusty+

Share this post


Link to post
Share on other sites

Oh btw. Blender 2.90 is out!

Bunch of new features and fixes.

 

They've put much more effort in the release notes page:

https://www.blender.org/download/releases/2-90/

It now looks pretty slick!

 

Much more improvement incoming in roughly 3 months with the next (2.91) release.
Last version was the LTS-release, so if you can't keep up, that one only gets bug fixes for the next 2 years.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...