Possible or Impossible? (or post your favourite jQuery..)
-
@cadfather said:
Q3 - activate the color picker without calling the paint bucket. just like when on pc i click on the icon on the mat browser.
not the same, but have you looked at this
http://sketchucation.com/forums/viewtopic.php?f=180&t=47808#p428608john
-
@cadfather said:
Q3 - activate the color picker without calling the paint bucket. just like when on pc i click on the icon on the mat browser.
Apart from what was suggested here is an alternative that I am currently using for an upcoming plugin done with "jQuery"...
http://www.jswidget.com/lab/canvas-based-color-picker.html
Cheers!
Note: This is limited to people that have internet IE10 or newer installed. Also on html for web-dialog this needs to be put <meta http-equiv="X-UA-Compatible" content="IE=10">
-
-
Here is another just in case...
http://acko.net/blog/farbtastic-jquery-color-picker-plug-in/
Cheers!
-
wow, some good stuff, but just in case it isn't clear, i'm trying to sample 'textures' under the mouse...
i'm sure there is some code hidden somewhere that does this - Fredo has a sampler in his thrupaint, however the code is quite complex to just isolate the block. but in fact, it doesn't have to be the material sampler it could just be 'find the texture under the mouse'.. i've been looking at 'pickhelper' (especially Thom's good 'revolting' posts on it) but it doesn't seems to contain materials in the array (that i could fathom).
didn't know Chris colour picker post, great implementation!
-
Ah! Ok now we're getting at the core of things. This is possible though. You use the PickHelper to get the best picked face - in a custom Tool - where you can then obtain from the face entity (face.material.texture).
-
I know you want to be able to pick from SketchUp models but maybe picking from and image you upload on web-dialog is not that bad of an idea.
Sorry for this sudden spam of jQuery plugins I just discover them and am little too excited.
Demo: http://www.script-tutorials.com/creating-an-html5-canvas-image-color-picker/Script: http://www.script-tutorials.com/creating-an-html5-canvas-image-color-picker/
Cheers!
note: posted before seeing thomthom post and I think his suggestion is way better than mind...cheers!
2nd note: Although don't think that will work with textures...maybe you can get average color of texture but not much else...not 100% sure though
-
Maybe when clicking on a texture where you want to sample color, start by creating a small face on that spot with script so that you can make unique and then use PickHelper to get color.
-
@thomthom said:
Ah! Ok now we're getting at the core of things. This is possible though. You use the PickHelper to get the best picked face - in a custom Tool - where you can then obtain from the face entity (face.material.texture).
ok, so 'best_picked' and then extract the material - i thought i was going to use 'pickhelper.all_picked' to do that, that's a start (how many years testing did you do to write all that stuff in the blog!)
-
Rafael, if you don't stop posting colour pickers, i will have to rename this 'possible or impossible Jqueries'..
really, the sampler idea started when i became tired of having to shift between the paint bucket only to select textures to highlight in vray. then you move around the model and you have the paint bucket active but you don't need it. i thought why not just have a picker directly to do JUST this? (this is actually part of few beta suggestions i'm sending to the Chaos guys).
-
best_picked - or best_face if you want to avoid getting an edge or group or whatnot.
Yea, I've spent a lot of time testing things. The API docs are much better now then in 2007 when I started, but it's still lacking details.
Advertisement