Giter VIP home page Giter VIP logo

xnalaramesh's People

Contributors

brachi avatar johnzero7 avatar lekarsenten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xnalaramesh's Issues

Error when trying to import .mesh or .xps in Blender 2.8

Hey guys,

I'm just trying to import some .mesh files with the plugin on 2.8, but nothing works. Using latest version (I think) of XNALaraMesh.

Here's the error log: (I've expunged my name, obviously)

"Importing file: C:\Users\Name\Downloads\FrankModels\generic_item.mesh
rootDir: C:\Users\Name\Downloads\FrankModels
File: C:\Users\Name\Downloads\FrankModels\generic_item.mesh
Reading Header
Header Found
Reading Bones
Read 109 Bones
Reading Meshes
Read 6 Meshes
Importing Armature 109 bones
Traceback (most recent call last):
File "C:\Users\Name\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh-master\xps_tools.py", line 138, in execute
status = import_xnalara_model.getInputFilename(xpsSettings)
File "C:\Users\Name\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh-master\import_xnalara_model.py", line 85, in getInputFilename
status = xpsImport()
File "C:\Users\Name\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh-master\import_xnalara_model.py", line 156, in xpsImport
armature_ob = createArmature(xpsSettings.autoIk)
File "C:\Users\Name\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh-master\import_xnalara_model.py", line 328, in createArmature
armature_ob.data.use_auto_ik = autoIk
AttributeError: 'Armature' object has no attribute 'use_auto_ik'

location: :-1"

Is this something a new XNALara patch will fix, or am I screwed? Is there any solution at all? Help much appreciated. Thanks guys.

Support Blender 2.8

Now that the beta has been released, it would be nice to support it!

All of the legacy materials stuff has been deleted in 2.8, so this might require larger changes...

Invert Normal Node?

What the reason of inverting the normal map? it well literally inverting the normal vector which causing weird shading in eevee
image
image

and here's the result if i bypass the invert node
image

as you can see bypassing the invert normal node giving me correct normal direction.

I'm just wondering why the normal have to be inverted from the start.

Error while enabling addon [Blender 2.79.7, addon 1.8.5]

Hi!
I'm receiving the following error after I installed the addon:

addon_utils.disable: XNALaraMesh not disabled
Modules Installed (XNALaraMesh) from 'C:\Users\marce\Downloads\XNALaraMesh.1.8.5.zip' into 'C:\Users\marce\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons'
Traceback (most recent call last):
File "C:\Program Files (x86)\blender-2.79.0-git.2adf4b401ed2-windows64\2.79\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
File "C:\Users\marce\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh_init_.py", line 54, in
import(name=name, fromlist=_modules)
File "C:\Users\marce\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_obj.py", line 44, in
from progress_report import ProgressReport, ProgressReportSubstep
ModuleNotFoundError: No module named 'progress_report'

This happens to 1.8.4 to 1.8.7

Any help is appreciated!

Thanks

we need multiple ascii file import & same file name import & please add an option for scaling the object before the import action

we need multiple ascii file import and we need to be the mesh inside blender have the same file name, for example if i import ASCII file with name ( car_hood.ascii ) i will get inside blender the name ( submesh_0.007 ) so we need the mesh inside blender to be the same file name please.
EDIT: and can you please add an option for scaling the object with import, because some objects have a very small scale and when i try to import them to blender with that small scale the mesh messed up.

Transparent Textures are White

Hello, thank you for making this great addon. I'm still fairly new to Blender so it's possible I may have overlooked something.
I'm using Blender 2.78.5 Hash: f9963f2 on Windows 7 64bit

In Blender Cycles, after importing XPS models to Blender, and converting materials to Cycles, the transparent textures become white in the Material Viewport Shading and sometimes in the Rendered Viewport Shading.
Rendered Viewport Shading: https://i.imgur.com/ix4sgHY.jpg
Material Viewport Shading: https://i.imgur.com/0hb1uEi.jpg
Here is a recent XPS model I've tested: https://xcrofty.deviantart.com/art/The-King-of-Fighters-XIV-Mai-678059999

Also, I wasn't sure if I should make this a separate topic, but will XPStools incorporate Blender's new Principled Shader in the future?

Thank you for taking the time to read this, and thanks again for making this addon.

Name Collection after the file

Hello, I looked through Issues and saw that naming imported objects after their respective files is not a desired way by the developer. But it still can be quite tedious to rename every object when working with a lot of files.
So I wanna propose a compromise, so to speak. Instead of renaming objects, which can be problematic as per the developer, the add-on should name the collection it creates after the file that was imported.
I hope this solution is compelling enough as it would've helped me A LOT.
P.S. To be clear this is a feature request, since I'm not a coder/developer. Thanks!

Connect Bones broken? v1.8.0

Sorry for reopening this issue. (I don't know if this is the correct way to reopen)
Do you mind taking a look at these 2 XPS models?
https://grummel83.deviantart.com/art/Jack-Combi-Suit-XPS-696968363
https://xxkammyxx.deviantart.com/art/Isabella-Valentine-Default-Soul-Calibur-IV-476050511

'Connect Bones' option in v1.8.0 appears to be working correctly with some of the previous models I've tested.
However, I just came across that Jack and Isabella XPS models, and it appears to ignore the 'Connect Bones'/'Connect All' options. It might be some sort of mistake the authors made with the armature, but I'm not sure.
If it helps you in anyway, I will try looking for other XPS models that might misbehave the same way.

Blender 2.79

Also, thank you for recent update. It makes the workflow much faster. Greatly appreciated.

What Is The Version Comparison Trying To Do?

I am trying to understand the point of an expression like

version_mayor <= 1 and version_minor <= 12

Which of these (major, minor) is supposed to be “old” and which is “new”?

(0, 13)
(1, 12)
(1, 13)

Perhaps the check should be

(version_mayor, version_minor) <= (1, 12)

Connect Bones broken?

The option to 'Connect Bones' in the XPS import menu doesn't appear to do anything.
I think I started using XPS Tools last year and I don't remember seeing bones connect to each other after toggling that option.

Haven't seen any errors popup in the console.

Blender 2.78C and 2.79.

re:materials convertor

hi,
I'm Brendon, I help out with Blender addons & would like to ask you about your materials converter.

I've been testing out your materials converter & import & really like it. your conversion works quite well on many other formats also. I would be interested in replacing the current materials converter in Blender addons_contrib with something very similar to yours. Would you be interested in developing this area more? Are you able to separate the materials conversion out into it's own folder?
My concept script is here: https://github.com/meta-androcto/blenderpython/tree/master/scripts/addons_extern/AF_materials_specials
In this I'm updating the materials utils addon in blender & have made an initial switch & added a few things. I would like to submit this to Blender soonish & would prefer not to leave out the conversion. (current addons_contrib version would not make it.)
Thanks. Let me know what you think & keep up the good work. Your importer works better than most in blender also. :)

Blender Friendly Bone Names

Most of the bipedal XPS models that I've used in Blender have the following bone naming format:
leg left toes
leg left ankle
leg left knee
leg left thigh
leg left thigh twist
arm left shoulder 1
arm left shoulder 2
arm left shoulder twist
arm left elbow
arm left wrist
arm left finger 1a
arm left finger 1b
arm left finger 1c

Blender has support for mirroring bone values, if the bone names are same and using the following suffixes:
bone.L bone.R
bone_L bone_R
bone_Left bone_Right

Ex:

  • legToes.L legToes.R
  • armFinger1a_L armFinger1a_R
  • armWrist_Left armWrist_Right

Not only does this make bone editing easier, but it also makes mirroring pose values easier.

Can you add an option that will rename all the Left/Right bones to use the suggested suffixes above?

Option: Import XPS model in T-Pose?

I don't know if this suggestion is possible. Maybe this is something only the XPS model creator can do?
Some XPS models are imported with an A-pose by default.
Setting up an IK rig can be a little difficult for a character with an A-pose.
It would be convenient if both feet are flat on the ground, which should make bone rotation/pole targets a bit more predictable.

Model with A-pose (You tested this 1 before): https://xcrofty.deviantart.com/art/The-King-of-Fighters-XIV-Mai-678059999

Model with T-pose (Almost T-pose/Feet flat on ground): https://lezisell.deviantart.com/art/Batman-Arkham-Knight-Catwoman-90s-XPS-ONLY-719615216

If you need more information, let me know.

Textures are not imported on Linux (presumably also on Mac)

Good job, congratulations.

One small problem I ran into was that on Linux the texture filenames are not imported correctly (presumably also on mac). I did some small changes on the read_xxx_xps.py files, so they always use ntpath.basename. This should work since XNALara is for windows only. maybe some equivalent correction should be made to the exporter, but for a quick hack I am done. Importing of XNALara files on my Linux box now works like a charm. Thank you for this excellent work.

I would like to send you this modification, so you can made the appropriate changes if you wish (maybe a high grade importer could be included in the official blender release).

Sadly the diff code is not printed correctly. basically I did:

On both read_ascii_xps.py and read_bin_xps.py
Add a import ntpath

On read_ascii_xps.py
Change line
textureFile = os.path.basename(ascii_ops.readString(file))
to
textureFile = ntpath.basename(ascii_ops.readString(file))

On read_bin_xps.py
Change line
textureFile = os.path.basename(readFilesString(file))
to
textureFile = ntpath.basename(readFilesString(file))

Simplify bin_ops.roundToMultiple Routine

The bin_ops.roundToMultiple routine can be shortened as follows:

diff --git a/bin_ops.py b/bin_ops.py
index b8109ee..fc3d1cc 100644
--- a/bin_ops.py
+++ b/bin_ops.py
@@ -21,10 +21,7 @@ class TypeFormat:


 def roundToMultiple(numToRound, multiple):
-    remainder = numToRound % multiple
-    if (remainder == 0):
-        return numToRound
-    return numToRound + multiple - remainder
+    return (numToRound + multiple - 1) // multiple * multiple

Actually, given that it is only used to round to multiples of xps_const.ROUND_MULTIPLE, which is 4, it could be simplified even further.

Revert progress_report location for 2.79 branch

I gather the 2.79 branch is still supposed to be compatible with Blender 2.79.x. It isn’t quite, since you seem to have included a change specific to Blender 2.8. The following patch fixes this:

diff --git a/export_obj.py b/export_obj.py
index c07dd35..756865f 100644
--- a/export_obj.py
+++ b/export_obj.py
@@ -27,7 +27,7 @@ import mathutils
 import operator
 import bpy_extras.io_utils

-from progress_report import ProgressReport, ProgressReportSubstep
+from bpy_extras.wm_utils.progress_report import ProgressReport, ProgressReportSubstep


 def name_compat(name):
diff --git a/import_obj.py b/import_obj.py
index 0d20772..2c75a58 100644
--- a/import_obj.py
+++ b/import_obj.py
@@ -41,7 +41,7 @@ import mathutils
 from bpy_extras.io_utils import unpack_list
 from bpy_extras.image_utils import load_image

-from progress_report import ProgressReport, ProgressReportSubstep
+from bpy_extras.wm_utils.progress_report import ProgressReport, ProgressReportSubstep


 def line_value(line_split):

Note this is only meant for your 2.79 branch.

Blender 2.8 : Export not working

If I import an XPS model into blender 2.8, then immediately export to OBJ, the new obj file looses all its textures

Also, if I import an XPS model into 2.8, then export to XPS, the new XPS file also has no textures

The 2.7x version seems to work properly, think it is a 2.8 specific issue.

Blender 2.80 Feature - Import XPS Model into the Active Collection

Hey, this was something I overlooked when I posted a similar feature request awhile back.
For common 3D formats (OBJ, DAE, FBX, etc.), by default, they appear to import into the active or last selected collection in the Blender Outliner, which can be useful during large projects with multiple collections within each other.

Is it possible to add an option in the import menu to import the XPS model or XPS model collection into the active collection?
Not sure what should be the default behavior, but I'm just throwing some ideas.

Parts of stages look transparent

I've been having this problem in 2.8 where when I import a stage, a lot of it has sort of a transparent look
image

This is how it actually looks like:
image

'Import Poses' after 'Rename Bones: XPS to Blender'

Currently, XPS Tools will not import poses for the bones that have been renamed via the 'XPS to Blender' option.

If you can add support for the renamed bones, that would be great.
Examples:
'arm left shoulder 1' --> 'arm side shoulder 1.L'
'arm left shoulder 2' --> 'arm side shoulder 2.L'
'arm left elbow' --> 'arm side elbow.L'
'arm left wrist' --> 'arm side wrist.L
'leg left thigh' --> 'leg side thigh.L'
'leg left knee' --> 'leg side knee.L'
'leg left ankle' --> 'leg side ankle.L'
'leg left toes' --> 'leg side toes.L'
etc...

[Blender 2.8 Beta - Addon v1.9.0] AttributeError: 'Context' object has no attribute 'user_preferences'

Attempting to use this addon in the latest build of Blender v2.8 results in the following error:

------------------------------------------------------------
---------------EXECUTING XPS PYTHON IMPORTER----------------
------------------------------------------------------------
Importing file:  [REDACTED]
File: [REDACTED]
Reading Header
Header Found
Reading Bones
Read 347 Bones
Reading Meshes
Read 39 Meshes
Importing Armature 347 bones

---*** Importing Mesh 24_base1_0.6_1_1 ***---
UV Layer Count: 1
Texture Count: 4
Created Mesh: 24_base1_0.6_1_1
New Mesh = 24_base1_0.6_1_1
Traceback (most recent call last):
  File "[REDACTED]\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh\xps_tools.py", line 144, in execute
    status = import_xnalara_model.getInputFilename(xpsSettings)
  File "[REDACTED]\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 85, in getInputFilename
    status = xpsImport()
  File "[REDACTED]\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 150, in xpsImport
    meshes_obs = importMeshesList(armature_ob)
  File "[REDACTED]\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 466, in importMeshesList
    for meshInfo in newMeshes]
  File "[REDACTED]\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 466, in <listcomp>
    for meshInfo in newMeshes]
  File "[REDACTED]\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 611, in importMesh
    makeBoneGroups(armature_ob, mesh_ob)
  File "[REDACTED]\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 743, in makeBoneGroups
    current_theme = C.user_preferences.themes.items()[0][0]
AttributeError: 'Context' object has no attribute 'user_preferences'

As can be inferred by the log, a single mesh imports before the addon aborts due to being unable to read some user preferences. I checked and found that for reasons unknown to me, the user preferences panel is indeed failing.

UP Panel Error

Any suggestions? This error occurs with the master as well, not only v1.9.0.

Importing error

Im getting en error when i try to add it on my blender 2.79

xnalaraerror

Material Conversation to Cycles black mesh

I got these black textures all the time (with many models)

https://img2.picload.org/image/wrwdgpg/materialerror.jpg

The meshes are seperat so we could maybe delete them or hide them on the conversation process

https://img5.picload.org/image/wrwdgwd/materialerror_2.jpg

Or at least dont use the normal for the diffuse shader since this is causing it to be black :/

https://picload.org/image/wrwdagw/materialerror3.jpg

Is there any way to remove them on conversation or something i can do to avoid them? It is very frustrating to remove them all the time :(

I hope oyu can help me and anyone else having this problem <3 You did a great job and let me know if I can help you fixing things :)

cycles materials that have both emission and transparency

in converted materials you first have the mix shader with transparency, then add the emission

it would work better if you added the emission to the diffuse first and then applied the transparency to the result, so it also fades out the emissive parts as expected

Blender 2.80 Feature - Import XPS model into New Collection

Hey, happy holidays.
Unfortunately, I don't have an older 2.80 beta nightly build, so I will have to wait till the Blender devs finalize the API again.

In the meantime, I do have another feature request:

  • Import Option: Import XPS model into New Collection
    -- If possible, automatically rename Collection to identify XPS model

Blender 2.79 - Undo History

Ctrl+Alt+Z (Shows Undo History)
I don't know if this is a limitation, but Import XPS/Poses don't appear in the Undo History.

Blender 2.79b 64bit
XPS Tools 1.8.5

Error on Import (Blender 2.79 Daily Builds Oct 2017)

I don't know if the Blender developers unintentionally broke something or if they made some new adjustments that require addon developers to update their code.

Working: Blender 2.79 Official Release
Broken: Blender 2.79 Buildbot (Hash: 83ce028 Date: 2017-10-06 16:06)
XPS_Tools v1.7.3

Error when attempting to import an XPS model:
Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\xps_tools.py", line 141, in execute
status = import_xnalara_model.getInputFilename(xpsSettings)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 172, in getInputFilename
status = xpsImport()
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\timing.py", line 12, in wrap
ret = f(*args)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 275, in xpsImport
meshes_obs = importMeshesList(armature_ob)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 628, in importMeshesList
for meshInfo in newMeshes]
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 628, in
for meshInfo in newMeshes]
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 760, in importMesh
makeUvs(mesh_da, origFaces, uvLayers, vertColors)
File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\XNALaraMesh\import_xnalara_model.py", line 558, in makeUvs
mesh_da.vertex_colors[0].data[loopdId].color = vertColors[faceVert]
ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3

location: :-1

Unnecessary color mix nodes [cycles]

When converting materials to cycles, a color mix node without any functionality gets added inbetween each texture and the next node, which unnecessarily enlarges the node tree and also may slightly increase rendertime (if many materials get converted)...
xnalara_1
[meaning the selected ones]

This may not be an issue but an intended functionality, but i see no other way than opening an issue to become clear about that.

Thanks for that great addon!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.