Giter VIP home page Giter VIP logo

Comments (7)

ghseeli avatar ghseeli commented on September 27, 2024

Hi! The way latex2blender works at the moment, it would be difficult to make the TeX of the mesh editable. In particular, latex2blender inserts the object as a mesh that, once in blender, no longer remembers the underlying TeX from which it is generated. I would recommend animating an empty object and then linking the TeX object to it. Then, if you want to change the TeX, you can just create a new mesh and all your animation data is still on the empty object. I agree, though, that this would require you to retype the expression. Perhaps at a later date, we can look into adding this feature.

from latex2blender.

tobiasBora avatar tobiasBora commented on September 27, 2024

Thanks for your answer. To remember the text, wouldn't it be possible to insert the original expression inside a Custom Property linked with the object? I guess it would allow us to remember easily the underlying TeX (and it would even be copy/pastable easily).

If I've some time in the coming months, I may give it a try.

from latex2blender.

peterkj1 avatar peterkj1 commented on September 27, 2024

I updated latex2blender to add a custom property called "Original LaTeX Code" that stores the typed latex code. I have not yet made a new release, but the updated latex2blender.py file has the update.

from latex2blender.

tobiasBora avatar tobiasBora commented on September 27, 2024

Really cool, thanks a lot! I guess changing this property does not change the mesh?

from latex2blender.

peterkj1 avatar peterkj1 commented on September 27, 2024

That's right. It doesn't change the mesh. It just stores the original LaTeX code used to compile the text.

from latex2blender.

tobiasBora avatar tobiasBora commented on September 27, 2024

Shouldn't we keep this issue opened? The last fix is great, but being able to change easily the shape would be even more awesome ;-) (in particular to preserve the modifiers, position, animation…) For now we can combine your solution with the above workaround, but it still requires a few unnecessary steps.

from latex2blender.

Splines avatar Splines commented on September 27, 2024

This feature would be really awesome. I envision it as follows:

  • If no LaTeX object is selected, show the usual view in the latex2blender panel, i.e. where you can enter a command and compile it to a mesh.
  • If a LaTeX object is selected, show instead the LaTeX command that was used to generate the mesh inside that panel. From here, users might edit it. The button changes to Recompile as Mesh.

Difficulties

  • How to detect that an object was generated via your plugin? Maybe a simple boolean custom property would do. It could be checked if this property exists on the currently selected object. Or maybe even reuse the current Original LaTeX code property to continue storing the LaTeX code in there. If that property exists, you know that the Mesh was generated by your plugin and can then show this LaTeX code in the panel.
  • What happens when clicking on Recompile as Mesh. Maybe the mesh data could be completely destroyed and replaced by the newly generated mesh data. Of course, shape keys would be lost with this, but there's probably no way around this as shape keys are specific to the mesh data. Modifiers and everything else (that is not directly related to the mesh data itself, e.g. materials, animations of the object) shouldn't be affected by this.
  • When replacing the mesh data: where should the new origin of the mesh be situated? In my opinion, the new mesh data should be placed such that its calculated "surface center" (center of mass) is located exactly at the old origin of the object. Otherwise, already existing animations that rely on that origin might look weird.
  • A "nice to have" feature related to this would be a history of LaTeX commands for a specific object, such that you could easily go back to an older version of your LaTeX code.

from latex2blender.

Related Issues (16)

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.