However, I have not been able to change the parameters through the API. The code below is an
attempt to set the parameters. Also shown is the console output from that code. The two blocks
so produced are identical both having the default values.
No not working. Spent another day searching for clues and not getting very far. But thanks for the link, a lot there so it will take a while to sift through it. I’ll definitely post if I get it working.
The attached file demonstrates (I,think) that mat.copy() does create a new instance, not just a reference.
The node_group code is for a helper method that will set the material->Surface input values by stochastics once I find out how to set them through the API. The code that creates and duplicates blocks is not dependent on that code. The script is not an addon yet. When you open the file the Text window should open with the script ready to run. After running the Ashlar Wall Builder panel should appear. Click “Create a new ashlar wall”. When the panel expands click on “Make Unique Stone Block” at the bottom. It should create two blocks (in the same position) at the 3D cursor.
Much thanks
Edit:
The two functions at the bottom are just there for reference while I see if they contain any clues. Theye were copied from the Blender UI
The wall created when you click the “Create a new ashlar wall” is an abstraction that holds data about the wall as a whole. When the script is completed the individual blocks will be joined to the wall to share its origin. At preset it only makes one block at a time and places every block in the same place. As you may have noticed there is no provision for providing any description of the wall’s dimensions. That will come later. I’m just trying to get it to work one little step at a time. The blocks initially present in the scene when you open the file are just artifacts of previous tests.
“why is it so big with only 4 cubes?”
Yes it’s in the execute function. I will later refactor that.
just began looking at your code
and you are using bpy node !
all the example i have use the tree node including the one in the link given for group node
and even for this method some seems to still be buggy
so don’t really have example using bpy …
but it should work
The error is related to an IDE I was trying out. In the text window drop down try deleting “wingdbstub.py”
“one thing when adding a new block it makes a copy of the group node
but it is not unique it is a link material or node!”
I found a bug in the file I uploaded and fixed and re-uploaded. Try down loading it again and see if the problem is corrected.
If you open the Surface panel after selecting Materials in the properties window you will see the input parameters to the selected block. If you modify those only the properties of the selected block change.
I no nothing of the internals but all I need to be unique per block are the inputs to the node _group. I don’t care if it is the same block
of code executing (with different input parameters) for each stone-block.
Oh, … I too had that problem and owe
you my apologies, I made one last little change to a variable name
for the sake of clarity and simply neglected to test it. I do seem
to be a bit more squirrelly as I approach my dotage. I am very
sorry.
But I thank you very much for your assistance. In the
morning I will begin working on the code references provided in your
previous post.
if you search latest SVN in scripts folder section
there is a init.py file with an example for composite nodes but not for cycles
but it shows how to make group and links
look at you link for old castle
and not certain how you want to do your script and what this magik soft is
but have you seen cycles way of doing random material/ texture using info node with random location?
you just have to copy ob and it will make a random mat/text very simple
is this part of a school project ore research project ?
for this project how many individual stones are you talking here?
like 100 or a few 1000’s ?
if more then 1000 it might heavy on render time or memory!
might be easier and much faster to make a wall as one object and use an UV image!
by the way you know there is already a script to make rectangular stones wall
but not with cycles nodes
and if you add like a few 100 stones it gets heavy and sluggish quickly!
No I have not seen the random location. But I will look for that --got a clue word or phrase for me to google? Changing the origin of a procedural texture relative to the mesh origin, if that is what random location is, is, I believe, necessary but not sufficient for my needs.
No I am not a student LOL. I’m an old fart retired and wrinkled. I have had bits of a story involving myths, Minoan culture (~1600 BC), and bull leaping (which is something like this: http://www.youtube.com/watch?v=caWVAJVFbrY) floating around in my head for many years and I’m trying to distill the bits into a coherent story. I’ve arranged to spend a couple of weeks on Crete next spring to research the infrastructure of Knossos and photograph the countryside around the palace/temples of Knossos and Phaistos and to soak up the ambience of the Aegean. Then next summer I will do a story outline and decide how to realize it–thinking about an “audio narrated graphic-novel” experimental kind of thingy. Have no Idea if I will live long enough to complete this–just wanted to start one last journey before age reduces me to a drooling idiot.