Tag Archives: 3D

Using bpy – changing colors .

This tutorial show you a simple example of python scripting into Blender 3D software.
You need to select the window for scripting and to test with python scripting shell.
First you need to add one object : cube.
The default script and most common python script, start with this :

You need to see the print python function because will use python ver. 3.
Also the cube object and cursor vars will take the all you need to use it.
Now , this myvar variable show you hou to deal with python 3.

The next two python script will make editable or not the object : your cube.

… now the next line will change it into Object Mode ( can also use TAB key).

The goal of the edit mode_toggle function can be when you will use vertices.
The changing color of the cube can be done with this functions:

Now the cube will show you with a new diffuse color.

Posted in All, Blender 3D, Programming, Python. Tagged with , , , , , .

Unity 3D – C# script – save and load file.

This is a simple C# script example for a C# class Player.
The class Player come with this content into Player.cs C# script:

To make this C# script for saving the Player into one file I used this C# script named SaveLoadManager.cs:

The script come with two parts for save and load files.
I used Serializable property to save binary file named player.sav.
This script used also the Application.persistentDataPath to take the path of application.
I used a Debug log output but if you want to used into real application then is no need to use.
You can deal with any player settings and make new like: player.magic or player.status.
Take a look at the comments in the script and that script highlights design issues.

Posted in 3D, All, C#, Game engine, Programming, Unity 3D. Tagged with , , , , , , .

Blender 3D – screencast keys addon.

Fist you need to take the python script from here.
The script need to be into Blender script folder to be used.
Open the Blender 3D application, go to the File – User preferences search the word Screencast and enable the addon by check the checkbox.
To use this addon then go to the 3D View, hit Shift+Alt+C keys.
Another way is to press N key to see the right panel and then use the Start Display button.
See the next image:
Blender 3D addon

Posted in 3D, All, Blender 3D. Tagged with , , , , , , , , , , .

Fix error: Blender 2.78 alpha – hardware 3D error.

This is the error  from Blender 3D hardware .
Blender 3D fix error
I got this error with version 2.78 alpha – maybe is the same error with old versions.
Also you will see this under window console this text:
Warning! Using result of ChoosePixelFormat.
Warning! Using result of ChoosePixelFormat.
Warning! Legacy WGL is unable to select between OpenGL versions.

This error will break your Nvidia driver and Blender don’t want to work.
To fix this you need to:
– restart the computer/ laptop;
– open Blender 3D software again;
– very important: change your render hardware settings to your video card.
I used CUDA and the old blend file know about hardware settings and will crash your Blender if you don’t set this again.

Posted in 3D, All, Blender 3D, Errors. Tagged with , , , , .

CGTune – settings on the fly to CGMiner.

This website come with one program how make changes to the CGMiner settings on the fly without shutting down and restarting the application. Just put on CGMiner folder then add  the following command line parameters to CGMiner .bat file  –api-listen –api-allow W:127.0.0.1.
To make settings just open one terminal and use the next commands.
Caution: Some settings permanently affect the operation of the video card.  CGTune requires that all commands parameters use two dashes.

Command Line Parameters

–version
–config
–summary
–pools
–devs
–gpu [a]
–pga [a]
–cpu [a]
–gpucount
–pgacount
–cpucount
–switchpool [a]
–enablepool [a]
–disablepool [a]
–gpu-enable [a]
–gpu-disable [a]
–gpu-restart [a]
–gpu-intensity [a,b]
–gpu-memclock [a,b]
–gpu-engine [a,b]
–gpu-fan [a,b]
–gpu-vddc [a,b]
–quit
–notify
–pgaenable [a]
–pgadisable [a]
–pgaidentify [a]
–devdetails
–restart
–stats
–coin
Display CGMiner and API version information
Display CGMiner configuration settings
Display CGMiner miner summary
Display status of each pool
Display GPU, PGA and CPU with their details
Display GPU [a] information, where a = 0, 1, etc.
Display PGA [a] information, where a = 0, 1, etc.
Display CPU [a] information, where a = 0, 1, etc.
Count number of GPUs
Count number of PGAs
Count number of CPUs
Switches to pool [a]
Enables pool [a]
Disables pool [a]
Enables GPU [a]
Disables GPU [a]
Sends a restart request to GPU [a]
Sets the intensity on GPU [a] at [b] intensity
Sets the memory clock on GPU [a] at [b] MHz
Sets the GPU engine on GPU [a] at [b] MHz
Sets the GPU fan speed on GPU [a] at [b] percentage
Sets the GPU voltage on GPU [a] at [b] volts
Tells CGMiner to shut down
Display last status / history count of each problem
Enables PGA [a]
Disables PGA [a]
Flashes PGA [a] (if supported)
Display device with a list of their static details
Restart CGMiner
Display device and pool statistics
Display coin mining information

 

Posted in 3D, All, Commands, Windows 10. Tagged with , , , , .