GithubHelp home page GithubHelp logo

uhlik / bpy Goto Github PK

View Code? Open in Web Editor NEW
946.0 43.0 102.0 37.65 MB

blender python scripts

Python 99.41% Cython 0.59%
blender addon blender-addon blender-scripts uv-mapping time-tracker opengl point-cloud wavefront-obj zbrush

bpy's People

Contributors

uhlik 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

bpy's Issues

Add On not showing up.

Hey Guys, Any idea why the Add On will not apear in blend 2.83?
No error message. Looks like everything worked.

"Modules Installed () from 'C:\Users\*******\Downloads\bpy-master.zip' into 'C:\Users\********\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons'"

Thanks,
J

Issue iporting XML

Hey,
Amazing tool, thank you.
I'm having an issue importing my XML to blender.
I get the bounding box but not the cameras.

I'm pretty sure it has something to do with my export. Any ideas? Many thanks

-

-

-

-

-

<data_type>uint8</data_type>

-

1333.07451672565

-0.0032420190486278

-0.000230818411080209

-0.000131883222461288

-

f k1 p1 p2

2.4079217686041626e-02 3.2736272770283617e-06 8.3625546200488733e-07 -8.4396120818103178e-07 3.2736272770283617e-06 3.1209562525747386e-09 1.0760845648250534e-10 -4.6974546329740755e-10 8.3625546200488733e-07 1.0760845648250534e-10 5.6287273173691871e-10 -2.1025560573355576e-11 -8.4396120818103178e-07 -4.6974546329740755e-10 -2.1025560573355576e-11 6.5886569001369961e-10

-

-

1.8661895220851932e-02 -1.9836981869975234e-02 -9.9962904510476136e-01 1.2280982870342449e+01 4.7317340835998278e-01 -8.8057640902418788e-01 2.6308049928954025e-02 8.4850059253783670e+00 -8.8077162720410296e-01 -4.7348884043909401e-01 -7.0468923561713137e-03 -3.8700528144853429e+01 0 0 0 1

-

-5.8299833844070337e-02 -1.6503717451055444e-02 -9.9816269048890516e-01 1.4148378540711629e+01 4.7332680280499179e-01 -8.8078974970044521e-01 -1.3082605590314988e-02 9.0413107518914870e+00 -8.7895555468985909e-01 -4.7321986870050509e-01 5.9161547874601456e-02 -3.8789240419376505e+01 0 0 0 1

-

-8.4979980073147110e-02 -1.6683135638577984e-02 -9.9624298038783321e-01 1.4699516122250909e+01 4.7270952595543203e-01 -8.8084720356246504e-01 -2.5571625821912747e-02 9.1808704102460972e+00 -8.7711122844127243e-01 -4.7310662324834329e-01 8.2740654945387959e-02 -3.8856594179993905e+01 0 0 0 1

-

-1.1725911953725565e-01 -1.7393499749679409e-02 -9.9294902439742905e-01 1.5315864407239422e+01 4.7135798797682182e-01 -8.8102391915902001e-01 -4.0230598306798371e-02 9.3286771040824021e+00 -8.7411209009816915e-01 -4.7275185883943255e-01 1.1150665409773322e-01 -3.8910116822190808e+01 0 0 0 1

-

-1.4789698420691622e-01 -1.7443624112535000e-02 -9.8884892781471945e-01 1.5972996416364923e+01 4.6977883212176214e-01 -8.8108660298405816e-01 -5.4719712465674072e-02 9.5128446968377336e+00 -8.7030703257690201e-01 -4.7263317490399825e-01 1.3850469677001614e-01 -3.8960720044253030e+01 0 0 0 1

-

1.8427306387817977e-02 -1.9009428930511607e-02 -9.9964947656217196e-01 1.2282089297531048e+01 4.7336727094825842e-01 -8.8049686462525567e-01 2.5469553982982729e-02 8.4840685065204280e+00 -8.8067239151360233e-01 -4.7367067989989597e-01 -7.2267440028415397e-03 -3.8726926708185132e+01 0 0 0 1

-

-1.6572591448868407e-01 -1.7509808637509838e-02 -9.8601639330609903e-01 1.6596080852759563e+01 4.6883549406774638e-01 -8.8102483368780438e-01 -6.3154745883654662e-02 9.7068341443488233e+00 -8.6759910141098051e-01 -4.7274586093043114e-01 1.5421786603375109e-01 -3.8956241159876626e+01 0 0 0 1

-

-1.7464016186475506e-01 -1.7642767918756630e-02 -9.8447424882726997e-01 1.7248600540321714e+01 4.6821734865156256e-01 -8.8104896854727111e-01 -6.7269825653789750e-02 9.9442031883561075e+00 -8.6618319556867029e-01 -4.7269593584243480e-01 1.6212718449566585e-01 -3.8959069785052769e+01 0 0 0 1

-

-1.8036747098013983e-01 -1.7461486317421809e-02 -9.8344429019025537e-01 1.7891056487456009e+01 4.6805565672270522e-01 -8.8090608714739760e-01 -7.0202334979247924e-02 1.0191946965611354e+01 -8.6509622448725643e-01 -4.7296888071230220e-01 1.6705975055544209e-01 -3.8963614429641105e+01 0 0 0 1

-

-1.8500735345441144e-01 -1.7401922658261293e-02 -9.8258305107282895e-01 1.8533422479114858e+01 4.6807918095782219e-01 -8.8070453828837603e-01 -7.2535485054645465e-02 1.0500013638481338e+01 -8.6410309542417951e-01 -4.7334626789069983e-01 1.7108229350899218e-01 -3.8956126753606803e+01 0 0 0 1

-

-1.8822384392004984e-01 -1.6936999958975574e-02 -9.8198010296153670e-01 1.9182907506988109e+01 4.6805490054864629e-01 -8.8055105417856461e-01 -7.4528189682933621e-02 1.0861589210039488e+01 -8.6342133089955453e-01 -4.7364858177493585e-01 1.7366815001673225e-01 -3.8900541196769439e+01 0 0 0 1

-

-1.9079832090194460e-01 -1.3047150465032464e-02 -9.8154254752697390e-01 1.9875706584618570e+01 4.6822358791981872e-01 -8.8004277684905863e-01 -7.9318236435829081e-02 1.1237622163541742e+01 -8.6276455215573766e-01 -4.7471515962789845e-01 1.7401966774755209e-01 -3.8831979147222050e+01 0 0 0 1

-

-1.9329991389229551e-01 -4.5936396620593831e-03 -9.8112896286058415e-01 2.0588866962445604e+01 4.6795826225734805e-01 -8.7935041471648212e-01 -8.8079015225160595e-02 1.1609538679372809e+01 -8.6235155712407296e-01 -4.7615307056933520e-01 1.7212799107954457e-01 -3.8713065273240730e+01 0 0 0 1

-

-1.9555057622239103e-01 6.4352179042383439e-03 -9.8067250400407147e-01 2.1296361860845600e+01 4.6804699410148587e-01 -8.7813016176712100e-01 -9.9093038642547704e-02 1.1996915138530555e+01 -8.6179578987812089e-01 -4.7837851850326085e-01 1.6870687473535539e-01 -3.8571075949428320e+01 0 0 0 1

-

-1.9732492339794871e-01 2.0358845425756333e-02 -9.8012672242875043e-01 2.2037555255448002e+01 4.6842283724839567e-01 -8.7631157338974441e-01 -1.1250809698574421e-01 1.2397913647530737e+01 -8.6118692520854978e-01 -4.8131439180240676e-01 1.6338156595443237e-01 -3.8470429953892229e+01 0 0 0 1

-

-2.0373722695596486e-01 3.7707836748433143e-02 -9.7829916763740910e-01 2.2855023079038226e+01 4.6820834930460931e-01 -8.7382523309199356e-01 -1.3118842804598296e-01 1.2864675924904017e+01 -8.5980933002250393e-01 -4.8477580494438510e-01 1.6037560583448052e-01 -3.8358428361548306e+01 0 0 0 1

-

-2.3000403807991798e-01 5.9042256464015452e-02 -9.7139701174060067e-01 2.3739534153041031e+01 4.6579297860958269e-01 -8.6972326221525220e-01 -1.6315130474400791e-01 1.3438789435694137e+01 -8.5447939913431803e-01 -4.8999536642023123e-01 1.7253839381934261e-01 -3.8288850590686415e+01 0 0 0 1

Rendering Point Cloud Visualizer question

Hey, complete git-hub noob here.

I was looking for a ply.visualizer/renderer pretty long and your addon seems to be amazing!
But i have real troubles to get the rendering engine to work. Honestly only because i'm a ultranoob in working with third-party plugins..
I tried to it like you mention it in the how-to-file but i dont get where i should find that "properties" button
Sorry for my noobish question haha

Demo File

Hello

Thank you for your great plugin. I try to get it to work for blender 2.8. It works all well, but it seems like the ply files are not supported. do you have anywhere an working ply file as an example?
This would help so much

Thank you very much

Regards

Visualize PLY in Blender 2.90

I installed the add-on and was able to load a ply file without issue.
However the point cloud is not visible when doing a render using Cycles. Do you have any idea why ?

I use Blender v2.90 and bpy v0.9.30 on Windows 10.

Render Point Cloud using Render/OpenGL Render Image

Hey,
first of all: thank you for this amazing addon.
Is it possible to use this addon in conjunction with "Render/OpenGL Render Image" or "Render/OpenGL Render Animation"?
Currently, I see the imported point clouds only in the 3D View. When pressing one of the buttons above, my scene is rendered without the point cloud.

system time tracker trigger checkbox

Hello
GREAT, i really need this thing!
Thank you!
Can you more improove this addon? I mean trigger checkbox must be ready at hand, may be at header near blender logo on top.
What do you think?

how to render a ply point cloud with python code

I render point cloud files in blender all right, but when I render in a script with the python command, the command reported an error
For example, "PCVManager.load_ply_to_cache(None, bpy.context)" is used to load ply file.
PCVManager.render( ? )
Is this command used for rendering? if it is, I want to know what the parameters of this command should be.
Thank you!

Problem with render of png

Hi, i have some problems with render, the picture is black and there is nothing on it.
I tried to change the light but nothing worked, i don't know what else to do.
I have the latest official version of blender.

pcv_render_000
image

Some feature/improvements ideas

Hi,

first, thank you for great plugin!

I have some feature/improvements ideas:

  • progress-bar during rendering animation
  • rendering time counter
  • render above 10000x10000 resolution

thanks

render not vissible

Hello,
I am trying to work with your PCV add-on, I have the blender version 2.92. on mac, but from some reason, when I hit render (single image or animation) the outcome png files are only grey (blank), no image shows up - I am a complete beginner with blender, but I followed all instructions I could find (attached the cloud to empty object, set active camera seeing the cloud), created some simple movement of the camera, I can't figure out what I am doing wrong, it must be some stupid mistake :).

Invalid syntax in CARBON_properties class (?)

When I try to activate the carbon_tools.py addon I get this error:
image

I'm not an expert with python. What does the stuff: SomethingProperty(x="yoda", y="ceasar", ) syntax do? Is this something that only works in Python 2.7?

Example scripts for load PLY file and converting to mesh

Hello,

I have a series of several PLY files I'd like to load into Blender using the Point Cloud Viewer and then convert to meshes. Would it be possible to get some hints on how to script this? I saw the example you wrote using PCVOverseer but I wasn't able to get that to read a PLY file.

Thanks!

Possibility to actually generate mesh from point cloud?

Thanks for the updated for Blender 2.8x version, this addon is very powerful and easy to use.

I can see there is a way to generate point cloud from mesh, but I wonder if we can "remesh" from point cloud into surface mesh kind of like MeshLab?

The cloud persist after delete them

Good afternoon! Your add-on Point Cloud Visualizer is amazing but I try animate a presentation of the true models with cloud points references and do the render is a problem, no for the points. The original poly model that I have aligned isn't rendered, neither after delete the empty used for import the point cloud. Any suggestion? Thank you. Apologize for my english.

Import Metashape XML error

Hi, (first, thanks! awesome tools!)

Software:
Win 10 64
Blender: 2.81a
Metashape : 1.5.5
Import Agisoft PhotoScan Cameras : 0.1.3

When importing I get this error:

Traceback (most recent call last):
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 874, in execute
o = PSCXMLImport(**d)
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 674, in init
self._make()
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 697, in _make
self.psc = PSCMakeCameras(self.xml_path, self.matrix, self.camera_draw_size, do_planes, self.chunk_regions, self.correct_principal_point, )
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 372, in init
self._make()
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 377, in _make
self._load_parse_xml()
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 410, in _load_parse_xml
ch = PSCChunk(chunk, "chunk-{0}".format(i))
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 329, in init
sd = PSCSensor(s)
File "C:\Users\Woody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\io_import_photoscan_cameras.py", line 173, in init
self.calibration['type'] = cal.attrib["type"]
UnboundLocalError: local variable 'cal' referenced before assignment

location: :-1

Thanks in advance

Can not import any .ply files

I have just enabled this addon for Blender 2.82, when I open a .ply file from the PCV menu I get error:

too many values to unpack (expected 3)
No vertices loaded from file at C:\Users...\pointcloud.ply

There's no tracback information either, only a single print statement so I can't even begin to debug the error because I have no idea which line or python file to check.

I think my .ply format is correct, but there are no example .ply files in this project to confirm that the addon is even working. Could you please add example color .ply to help new users figure out how this addon works?

Also I have binary .ply files that I can import normally as simple .ply in Blender without issue, but when I try to import same file using this addon I get an error:

'ascii' codec can't decode byte 0xe9 in position 1: ordinal not in range(128)
No vertices loaded from file at C:\Users...\pointcloud_binary.ply

Where is the Import panel?

Hello,
I want to import a .csv file and am unable to find the import sub-panel described in the documentation:
image

Does the PCV version I just downloaded no longer have that ability? I assume there should be an "Import" drop down
image

Thank you!

Can't install addon

I downloaded the zip and installed addon from file as always, but when I try and search for it to activate it I doesn't show up. Other people type Point Cloud Visualizer and when I try that nothing shows up

Render with Point Cloud Visualizer

In Blender 2.80 I get an error when I try to render points with the Point Cloud Visualizer:
'Context' object has no attribute 'evaluated_depsgraph_get'

Loading multiple point clouds into multiple objects

Reading the documentation section on the API seems to only cover loading custom point clouds, rather than from ply files. I am attempting to register many point clouds together and it would be easier to load them all at once, rather than create object, navigate to ply file and add, change display %; for every ply file. Could you possibly add a way to do this, or describe how to automate this process. I can get it to the point were the objects are created and the PLY file is "attached" to each object, but they don't draw the clouds.

`import bpy
import bmesh

for i in range(18):
bpy.ops.mesh.primitive_plane_add(enter_editmode=False, location=(0, 0, 0))
bpy.context.object.name = "cloud." + str(i + 1).zfill(3)

o = bpy.context.object.point_cloud_visualizer
o.load.filepath = "D:\Scan Data\200794_SI\200764_SI." + str(i + 1) + ".ply"
o.display.percentage = 25`

How to create a point cloud ?

Hi,
I read the readme. But it only show how to edit existing point clouds. Is there any way to create point clouds ?

For example at position ( 1,1,1) create a point with color ( 34,123,123) rgb ?

Error Converting a Point Cloud to Objects ver. 0.8.11 in Blender 2.8 2019-05-31

To Whom It May Concern:

I can visualize (i.e., draw) the attached .ply file without problems but I cannot convert it to cubes or ico spheres, etc., without errors:

bpy.ops.object.delete(use_global=False)
Deleted 1 object(s)
bpy.ops.object.empty_add(type='PLAIN_AXES', location=(0, 0, 0))
bpy.context.space_data.recent_folders_active = 1
bpy.context.object.point_cloud_visualizer.mesh_type = 'ICOSPHERE'
Traceback (most recent call last):
File "/Users/wmudge/Library/Application Support/Blender/2.80/scripts/addons/Point Cloud Visualizer.py", line 1732, in execute
instancer = PCMeshInstancer(**d)
File "/Users/wmudge/Library/Application Support/Blender/2.80/scripts/addons/Point Cloud Visualizer.py", line 229, in init
self.mesh.show_double_sided = False
AttributeError: 'Mesh' object has no attribute 'show_double_sided'

location: :-1

FYI: The attached Galaxy file is a public domain project from SketchFab.

Galaxy.zip

Thanks for your attention to this problem.

Enhancement of Blender's OpenGL renderer

I've added a proposal to enhance Blender's OpenGL renderer, such that it renders the full 3D View including points drawn with GPU module to disk.

I'm posting this here, since this feature would be beneficial for users of the Point Cloud Visualizer as well. You can vote for the proposal here. If you think this is the wrong place this information, feel free to close this issue.

Script to load .ply and render using cycles headless

Hi

I want to render a sequence of .plys using cycles (since I want to render other objects in the scene as well). I am using ver. 0.9.x with blender 2.8a. Can you guide me on how to script the following steps using the python api?

  1. Load the colored pointcloud .ply
  2. Convert to mesh using ico-sphere with mesh instance size 0.05
  3. Enable vertex color in Base Color and Emission attributes in material properties of the generated mesh (I am not able to render the per-vertex color without explicitly setting this).

I am new to blender so any help would be appreciated.
Thanks!

Blender 2.80 point cloud visualizer with sequence or animation?

Hi Uhlik, just wondering with Blender 2.80 is almost out of beta, would it be possible to revisit your add-on and add special feature for:

  • Loading sequence of PLY point cloud data
  • Ability to see and pass point cloud data with bpy (for use in Animation Nodes, Sverchok, etc)....

Thanks again!

I am happy to donate for this~

Opaque background to renders from PCV

Hi! Thanks for a great add-on. Newbie question - I have everything working well but my renders export with an opaque grey background as opposed to a transparent PNG. Am I missing something obvious?

Import Agisoft Cameras in Blender 2.93.4

Hi there,

Tried to install your import Agisoft cameras xml addon in Blender 2.93.4m it will enable, but I cannot see it listed in the scene menu?

Is it not compatible above 2.80?

Many thanks.

Can you

Is it possible to map uv with nodes with PCV? Perhaps input the ply file to a node to change the RGB values and finally export to the PCV tool?

Project point color TO target mesh uv texture

Colorize option in project filter works fine with and I'd need to do reverse:
Write the (empty image) texture base on UV Map of a target mesh.
Is it possible to implement or help me do it?

Point Cloud Visualizer questions....

I manage to get the Point Cloud Visualizer addon works great in Blender 2.79 but a couple of questions arise:

  • Can we load a sequence of PLY or .... limited to only one at a time?
  • Is it possible to source and query this loaded PLY data using BPY? I wanted to use it for other purpose.

Thanks!

Conversion missing normals

Converting LAS (Mobile Lidar Scanner) to PLY files (Binary) using cloud compare. Having issues with Missing Vertex Normals when I click Draw....Am I missing something here
blender
?

Addon for Point Cloud Visualizer (Blender 2.80) does not work....

Do I need GPU for this to work? I tested on Blender 2.80 Mac CPU only...

Exception in module register(): /Users/jimmyg/Library/Application Support/Blender/2.80/scripts/addons/view3d_point_cloud_visualizer.py
Traceback (most recent call last):
  File "/Users/jimmyg/Downloads/blender-2.80.0-git20190503.b331515d2e47-x86_64/blender.app/Contents/Resources/2.80/scripts/modules/addon_utils.py", line 384, in enable
    mod.register()
  File "/Users/jimmyg/Library/Application Support/Blender/2.80/scripts/addons/view3d_point_cloud_visualizer.py", line 2150, in register
    bpy.utils.register_class(cls)
RuntimeError: Error: Registering panel class: parent 'PCV_PT_panel' for 'PCV_PT_convert' not found


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.